diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..3bb3b5ea --- /dev/null +++ b/.gitattributes @@ -0,0 +1,8 @@ +# Auto detect text files and perform LF normalization +* text=auto + +*.java text diff=java +*.html text diff=html +*.css text +*.js text +*.sql text diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..b76b8957 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 00000000..c7f59480 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,2 @@ +_extends: .github +tag-template: plexus-utils-$NEXT_MINOR_VERSION diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000..b0dfc833 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,64 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '16 8 * * 5' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v2.3.4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + 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@v1 + + # ℹ️ 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@v1 diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 00000000..10cbc78e --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,55 @@ +# 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: GitHub CI + +on: [push, pull_request] + +jobs: + build: + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + java: [8, 11, 16, 17-ea] + jdk: [temurin, zulu, adopt-openj9] + fail-fast: false + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + + - name: Set up cache for ~./m2/repository + uses: actions/cache@v2.1.6 + with: + path: ~/.m2/repository + key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }} + restore-keys: | + maven-${{ matrix.os }}-java${{ matrix.java }}- + maven-${{ matrix.os }}- + + - name: Set up JDK + uses: actions/setup-java@v2.3.0 + with: + cache: 'maven' + distribution: ${{ matrix.jdk }} + java-version: ${{ matrix.java }} + + - name: Build with Maven + run: mvn verify javadoc:javadoc -e -B -V diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 00000000..4e2af995 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,12 @@ +name: Release Drafter +on: + push: + branches: + - master +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v5.15.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..f5db0513 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +target/ +.project +.classpath +.settings/ +bin +*.iml +*.ipr +*.iws +*.idea +release.properties +.java-version + diff --git a/README.md b/README.md new file mode 100644 index 00000000..bd2877bf --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +Plexus-Utils +============ + +[![Build Status](https://github.com/codehaus-plexus/plexus-utils/actions/workflows/maven.yml/badge.svg)](https://github.com/codehaus-plexus/plexus-utils/actions) +[![Maven Central](https://img.shields.io/maven-central/v/org.codehaus.plexus/plexus-utils.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.codehaus.plexus/plexus-utils) + +This library is historically used by the Apache Maven project so it's developed and maintained by the same [`bad guys`](http://maven.apache.org/team.html) + +The current master is now at https://github.com/codehaus-plexus/plexus-utils + +For publishing [the site](https://codehaus-plexus.github.io/plexus-utils/) do the following: + +``` +mvn -Preporting verify site site:stage scm-publish:publish-scm +``` + diff --git a/jira/PLXUTILS-1.json b/jira/PLXUTILS-1.json new file mode 100644 index 00000000..448ea7b4 --- /dev/null +++ b/jira/PLXUTILS-1.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"44700","self":"http://jira.codehaus.org/rest/api/latest/issue/44700","key":"PLXUTILS-1","fields":{"progress":{"progress":0,"total":0},"summary":"org.codehaus.plexus.util.FileUtilsTest use of Thread.sleep causes failures on Windows","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-1/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17364","id":"17364","description":"","name":"2.1","archived":false,"released":true,"releaseDate":"2011-06-09"}],"resolutiondate":"2011-05-16T13:17:40.248-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=baerrach","name":"baerrach","emailAddress":"baerrach@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrie Treloar","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["baerrach(baerrach)","brettporter(brettporter)","krosenvold(krosenvold)"],"customfield_10160":null,"updated":"2011-05-16T14:04:59.956-0500","created":"2006-12-10T23:22:40.082-0600","description":"Affects 1.4-SNAPSHOT\n\norg.codehaus.plexus.util.FileUtilsTest will fail intermittently \n\nHere is the error for FileUtils:\n{noformat}\n-------------------------------------------------------------------------------\nTest set: org.codehaus.plexus.util.FileUtilsTest\n-------------------------------------------------------------------------------\nTests run: 34, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 7.813 sec <<< FAILURE!\ntestCopyIfModifiedWhenSourceIsNewer(org.codehaus.plexus.util.FileUtilsTest) Time elapsed: 1 sec <<< FAILURE!\njunit.framework.AssertionFailedError: Failed copy. Target file should have been updated.\n\tat junit.framework.Assert.fail(Assert.java:47)\n\tat junit.framework.Assert.assertTrue(Assert.java:20)\n\tat org.codehaus.plexus.util.FileUtilsTest.testCopyIfModifiedWhenSourceIsNewer(FileUtilsTest.java:351)\n\n{noformat}\n\nwhen it fails this is the time stamps:\n{noformat}\nSource = 1165811250000\nDestination = 1165811250000\n{noformat}\n\nWhen it succeeds:\n{noformat}\nSource = 1165811188000\nDestination = 1165811186000\n{noformat}\n\nThe problem is that the one second sleep in the unit tests does not guarantee that the newer file is actually newer.\n\nPatched the unit test to resolve this issue.\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"115689600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-1/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/24563","id":"24563","filename":"PLX-309-patch.txt","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=baerrach","name":"baerrach","emailAddress":"baerrach@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrie Treloar","active":true},"created":"2006-12-10T23:28:44.499-0600","size":3149,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/24563/PLX-309-patch.txt"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"Windows XP","timeestimate":null,"customfield_10130":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10053","value":"Yes","id":"10053"},"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/44700/comment/83398","id":"83398","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"body":"this patch seems to cause the test to hang on my mac, instead of the normal 7 seconds (I waited abut a minute and they had not completed).","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"created":"2006-12-26T17:27:15.146-0600","updated":"2006-12-26T17:27:15.146-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/44700/comment/267166","id":"267166","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Added the now classic reallySleep method in 2e68f9519147eadb2dc27da3bdfe942529f054d4.\r\n\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2011-05-16T13:17:40.276-0500","updated":"2011-05-16T14:04:59.948-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-10.json b/jira/PLXUTILS-10.json new file mode 100644 index 00000000..218f0850 --- /dev/null +++ b/jira/PLXUTILS-10.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"44676","self":"http://jira.codehaus.org/rest/api/latest/issue/44676","key":"PLXUTILS-10","fields":{"progress":{"progress":0,"total":0},"summary":"FileUtils.copyFile zeros out the file if source file is the same as destination file","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-10/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14032","id":"14032","description":"","name":"1.4.6","archived":false,"released":true,"releaseDate":"2007-09-13"}],"resolutiondate":"2007-08-21T16:02:05.542-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=sni","name":"sni","emailAddress":"stephane.nicoll@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Stéphane Nicoll","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["olamy(olamy)","sni(sni)","wfay(wfay)"],"customfield_10160":null,"updated":"2008-02-02T15:32:37.150-0600","created":"2006-12-10T10:25:02.473-0600","description":"Using copyFile zeros out the file is the source file is the same as destination file.\n\nTo reproduce, runs the following test case:\n\n{code:java}\npublic void testCopyFileOnSameFile()\n throws IOException\n {\n String content= \"ggrgreeeeeeeeeeeeeeeeeeeeeeeoierjgioejrgiojregioejrgufcdxivbsdibgfizgerfyaezgv!zeez\";\n final File theFile = File.createTempFile( \"test\", \".txt\");\n FileUtils.fileAppend( theFile.getAbsolutePath(), content);\n\n assertTrue( theFile.length() > 0);\n // Now copy file over itself\n FileUtils.copyFile( theFile, theFile);\n\n // This should not fail\n assertTrue( theFile.length() > 0);\n }\n{code}\n\nExpected behavior is to do nothing and leave the file as it is.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"15472","self":"http://jira.codehaus.org/rest/api/2/issueLink/15472","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"43867","key":"MEAR-49","self":"http://jira.codehaus.org/rest/api/2/issue/43867","fields":{"summary":"if an artifact in the list of ear modules already exists in the ear, the ear mojo will copy it on top of itself, zeroing out the file","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"233539200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-10/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/29033","id":"29033","filename":"plxutils-10_4.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=wfay","name":"wfay","emailAddress":"waynefay@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Wayne Fay","active":true},"created":"2007-08-20T17:01:44.660-0500","size":1924,"mimeType":"application/octet-stream","content":"http://jira.codehaus.org/secure/attachment/29033/plxutils-10_4.diff"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"plexus-utils 1.0.4","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/44676/comment/105244","id":"105244","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=wfay","name":"wfay","emailAddress":"waynefay@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Wayne Fay","active":true},"body":"Added check to FileUtils.copyFile( final File source, final File destination ) to see if source == destination.\r\n\r\nAdded test to FileUtilsTest named testCopyFileOnSameFile().\r\n\r\nBefore the check was added, the test fails. Afterwards, the test passes.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=wfay","name":"wfay","emailAddress":"waynefay@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Wayne Fay","active":true},"created":"2007-08-20T17:01:44.665-0500","updated":"2007-08-20T17:01:44.665-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/44676/comment/105363","id":"105363","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"Patch applied in rev 6776.\r\nThanks.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-08-21T16:02:05.534-0500","updated":"2007-08-21T16:02:05.534-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-100.json b/jira/PLXUTILS-100.json new file mode 100644 index 00000000..a9945d84 --- /dev/null +++ b/jira/PLXUTILS-100.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"79303","self":"http://jira.codehaus.org/rest/api/latest/issue/79303","key":"PLXUTILS-100","fields":{"progress":{"progress":0,"total":0},"summary":"DirectoryScanner#DEFAULTEXCLUDES should exclude other SCMs like Mercury or GIT","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-100/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2009-01-02T15:24:02.654-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["siveton(siveton)"],"customfield_10160":null,"updated":"2009-01-02T15:24:02.651-0600","created":"2009-01-02T15:22:19.795-0600","description":"Similar to PLXUTILS-81","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"21698","self":"http://jira.codehaus.org/rest/api/2/issueLink/21698","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"70462","key":"PLXUTILS-81","self":"http://jira.codehaus.org/rest/api/2/issue/70462","fields":{"summary":"Exclusion Pattern does not include Serena Dimensions .metadata pattern","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"190339200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-100/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/79303/comment/159749","id":"159749","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"fixed in r7997","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-01-02T15:24:02.648-0600","updated":"2009-01-02T15:24:02.648-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-101.json b/jira/PLXUTILS-101.json new file mode 100644 index 00000000..0654aa2d --- /dev/null +++ b/jira/PLXUTILS-101.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"79503","self":"http://jira.codehaus.org/rest/api/latest/issue/79503","key":"PLXUTILS-101","fields":{"progress":{"progress":0,"total":0},"summary":"Review license","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-101/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2014-11-25T15:38:02.646-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["struberg(struberg)","michael-o(michael-o)","siveton(siveton)"],"customfield_10160":null,"updated":"2014-11-25T15:38:02.679-0600","created":"2009-01-07T06:56:06.876-0600","description":"According http://plexus.codehaus.org/get-involved.html","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-101/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":3,"total":3,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/79503/comment/160243","id":"160243","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"fixed in r8012","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-01-07T07:07:38.637-0600","updated":"2009-01-07T07:07:38.637-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/79503/comment/275817","id":"275817","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=struberg","name":"struberg","emailAddress":"struberg@yahoo.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Mark Struberg","active":true},"body":"folks, this class is almost a 1:1 clone from Maven-1.1 DVSLPathTool, which is itself a fork from Anakia and other jakarta projects. It's just NOT OK to change the license and drop the original credits!","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=struberg","name":"struberg","emailAddress":"struberg@yahoo.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Mark Struberg","active":true},"created":"2011-08-14T13:30:33.310-0500","updated":"2011-08-14T13:30:33.310-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/79503/comment/357803","id":"357803","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.\r\n\r\nAssignee, if you think you can fix this bug anytime soon, please reopen and proceed appropriately.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T15:38:02.672-0600","updated":"2014-11-25T15:38:02.672-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-102.json b/jira/PLXUTILS-102.json new file mode 100644 index 00000000..f06fa106 --- /dev/null +++ b/jira/PLXUTILS-102.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"79706","self":"http://jira.codehaus.org/rest/api/latest/issue/79706","key":"PLXUTILS-102","fields":{"progress":{"progress":0,"total":0},"summary":"Wrong regex pattern in PrettyPrintXMLWriter#escapeXmlAttribute( String text )","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-102/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2009-01-12T17:39:27.871-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["siveton(siveton)"],"customfield_10160":null,"updated":"2009-01-12T17:39:27.867-0600","created":"2009-01-12T17:38:06.686-0600","description":"In PrettyPrintXMLWriter#escapeXmlAttribute( String text ), we have a wrong pattern:\n{noformat}\ntext = text.replaceAll( \"\\n\\r\", \" \" );\n{noformat}","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"189475200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-102/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/79706/comment/160751","id":"160751","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"fixed in r8046","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-01-12T17:39:27.857-0600","updated":"2009-01-12T17:39:27.857-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-103.json b/jira/PLXUTILS-103.json new file mode 100644 index 00000000..8238adfa --- /dev/null +++ b/jira/PLXUTILS-103.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"81058","self":"http://jira.codehaus.org/rest/api/latest/issue/81058","key":"PLXUTILS-103","fields":{"progress":{"progress":0,"total":0},"summary":"Refactor DirectoryScanner to allow custom directory structure traversal","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-103/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[],"resolutiondate":"2009-02-04T14:33:05.622-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["igorfie(igorfie)"],"customfield_10160":null,"updated":"2009-02-04T14:33:05.617-0600","created":"2009-02-04T14:31:09.019-0600","description":"Introduce Scanner interface. This should be technology neutral and allow eclipse IResource-based implementation, for example.\nRefactor includes/excludes matching logic out of DirectoryScanner into AbstractScanner.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"187488000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-103/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/81058/comment/163985","id":"163985","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"body":"implemented.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"created":"2009-02-04T14:33:05.613-0600","updated":"2009-02-04T14:33:05.613-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-104.json b/jira/PLXUTILS-104.json new file mode 100644 index 00000000..e46097b6 --- /dev/null +++ b/jira/PLXUTILS-104.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"81935","self":"http://jira.codehaus.org/rest/api/latest/issue/81935","key":"PLXUTILS-104","fields":{"progress":{"progress":0,"total":0},"summary":"Clonning of Commandline/Shell don't clonning shellCommand that leads to unclear error.","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-104/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T14:30:33.624-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=newfield","name":"newfield","emailAddress":"michael.neifeld@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Neifeld","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["newfield(newfield)","michael-o(michael-o)"],"customfield_10160":null,"updated":"2014-11-25T14:30:33.672-0600","created":"2009-02-19T01:06:55.039-0600","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-104/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"customfield_10170":null,"environment":"Windows XP, Java 5","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/81935/comment/357246","id":"357246","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:30:33.649-0600","updated":"2014-11-25T14:30:33.649-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-105.json b/jira/PLXUTILS-105.json new file mode 100644 index 00000000..17e31dd2 --- /dev/null +++ b/jira/PLXUTILS-105.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"83649","self":"http://jira.codehaus.org/rest/api/latest/issue/83649","key":"PLXUTILS-105","fields":{"progress":{"progress":0,"total":900,"percent":0},"summary":"more NullPointerException's in Xpp3Dom.equals()","timetracking":{"originalEstimate":"15m","remainingEstimate":"15m","originalEstimateSeconds":900,"remainingEstimateSeconds":900},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-105/votes","votes":1,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/3","id":"3","description":"The problem is a duplicate of an existing issue.","name":"Duplicate"},"fixVersions":[],"resolutiondate":"2012-08-01T15:32:31.772-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=rustamabd","name":"rustamabd","emailAddress":"rustamabd@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Rustam Abdullaev","active":true},"aggregatetimeoriginalestimate":900,"customfield_10161":["hboutemy(hboutemy)","krosenvold(krosenvold)","rustamabd(rustamabd)"],"customfield_10160":null,"updated":"2012-08-01T15:35:21.123-0500","created":"2009-03-16T09:10:56.688-0500","description":"Xpp3Dom.java, lines 453 and 457 frequently throw NullPointerExceptions because the test is incorrect:\r\n\r\n\r\n{code}\r\n. . .\r\n\t else if ( attributes == null ? dom.attributes != null : !dom.attributes.equals( attributes ) )\r\n\t {\r\n\t return false;\r\n\t }\r\n\t else if ( childList == null ? dom.childList != null : !dom.childList.equals( childList ) )\r\n\t {\r\n\t return false;\r\n\t }\r\n{code}\r\n\r\nIt should be:\r\n\r\n{code}\r\n. . .\r\n\t else if ( attributes == null ? dom.attributes != null : !attributes.equals( dom.attributes ) )\r\n\t {\r\n\t return false;\r\n\t }\r\n\t else if ( childList == null ? dom.childList != null : !childList.equals( dom.childList ) )\r\n\t {\r\n\t return false;\r\n\t }\r\n{code}\r\n\r\nCurrently this happens inside maven-eclipse-plugin.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"31576","self":"http://jira.codehaus.org/rest/api/2/issueLink/31576","type":{"id":"10000","name":"Duplicate","inward":"is duplicated by","outward":"duplicates","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10000"},"outwardIssue":{"id":"61808","key":"PLXUTILS-63","self":"http://jira.codehaus.org/rest/api/2/issue/61808","fields":{"summary":"plexus-utils: NullPointerException in Xpp3Dom.equals()","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"153360000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-105/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":0,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":900,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14044","id":"14044","description":"","name":"1.0","archived":true,"released":true,"releaseDate":"2005-05-27"},{"self":"http://jira.codehaus.org/rest/api/2/version/14045","id":"14045","description":"","name":"1.0.1","archived":true,"released":true,"releaseDate":"2005-07-10"},{"self":"http://jira.codehaus.org/rest/api/2/version/14046","id":"14046","description":"","name":"1.0.2","archived":true,"released":true,"releaseDate":"2005-09-13"},{"self":"http://jira.codehaus.org/rest/api/2/version/14047","id":"14047","description":"","name":"1.0.3","archived":true,"released":true,"releaseDate":"2005-09-15"},{"self":"http://jira.codehaus.org/rest/api/2/version/14048","id":"14048","description":"","name":"1.0.4","archived":true,"released":true,"releaseDate":"2005-10-11"},{"self":"http://jira.codehaus.org/rest/api/2/version/14049","id":"14049","description":"","name":"1.0.5","archived":true,"released":true,"releaseDate":"2005-12-07"},{"self":"http://jira.codehaus.org/rest/api/2/version/14037","id":"14037","description":"","name":"1.1","archived":true,"released":true,"releaseDate":"2006-01-11"},{"self":"http://jira.codehaus.org/rest/api/2/version/14038","id":"14038","description":"","name":"1.2","archived":false,"released":true,"releaseDate":"2006-04-19"},{"self":"http://jira.codehaus.org/rest/api/2/version/14039","id":"14039","description":"","name":"1.3","archived":false,"released":true,"releaseDate":"2006-09-28"},{"self":"http://jira.codehaus.org/rest/api/2/version/14040","id":"14040","description":"","name":"1.4","archived":false,"released":true,"releaseDate":"2007-01-09"},{"self":"http://jira.codehaus.org/rest/api/2/version/14041","id":"14041","description":"","name":"1.4.1","archived":false,"released":true,"releaseDate":"2007-03-10"},{"self":"http://jira.codehaus.org/rest/api/2/version/14042","id":"14042","description":"","name":"1.4.2","archived":false,"released":true,"releaseDate":"2007-05-20"},{"self":"http://jira.codehaus.org/rest/api/2/version/14029","id":"14029","description":"","name":"1.4.3","archived":false,"released":true,"releaseDate":"2007-07-13"},{"self":"http://jira.codehaus.org/rest/api/2/version/14030","id":"14030","description":"","name":"1.4.4","archived":false,"released":true,"releaseDate":"2007-07-20"},{"self":"http://jira.codehaus.org/rest/api/2/version/14031","id":"14031","description":"","name":"1.4.5","archived":false,"released":true,"releaseDate":"2007-07-31"},{"self":"http://jira.codehaus.org/rest/api/2/version/14032","id":"14032","description":"","name":"1.4.6","archived":false,"released":true,"releaseDate":"2007-09-13"},{"self":"http://jira.codehaus.org/rest/api/2/version/14033","id":"14033","description":"","name":"1.4.7","archived":false,"released":true,"releaseDate":"2007-10-16"},{"self":"http://jira.codehaus.org/rest/api/2/version/14034","id":"14034","description":"","name":"1.4.8","archived":false,"released":true,"releaseDate":"2007-11-27"},{"self":"http://jira.codehaus.org/rest/api/2/version/14035","id":"14035","description":"","name":"1.4.9","archived":false,"released":true,"releaseDate":"2007-12-19"},{"self":"http://jira.codehaus.org/rest/api/2/version/14036","id":"14036","description":"","name":"1.5","archived":false,"released":true,"releaseDate":"2008-02-18"},{"self":"http://jira.codehaus.org/rest/api/2/version/14086","id":"14086","description":"","name":"1.5.1","archived":false,"released":true,"releaseDate":"2008-02-21"},{"self":"http://jira.codehaus.org/rest/api/2/version/14100","id":"14100","description":"","name":"1.5.2","archived":false,"released":true,"releaseDate":"2008-06-13"},{"self":"http://jira.codehaus.org/rest/api/2/version/14383","id":"14383","description":"","name":"1.5.3","archived":false,"released":true,"releaseDate":"2008-06-13"},{"self":"http://jira.codehaus.org/rest/api/2/version/14384","id":"14384","description":"","name":"1.5.4","archived":false,"released":true,"releaseDate":"2008-06-18"},{"self":"http://jira.codehaus.org/rest/api/2/version/14408","id":"14408","description":"","name":"1.5.5","archived":false,"released":true,"releaseDate":"2008-07-03"},{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"customfield_10170":null,"environment":null,"timeestimate":900,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":900,"percent":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/83649/comment/212918","id":"212918","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"body":"do you have a unit test showing such NPEs?\r\ncan you propose a Xpp3DomTest patch, please?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2010-03-06T12:01:37.187-0600","updated":"2010-03-06T12:01:37.187-0600"}]},"timeoriginalestimate":900,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-106.json b/jira/PLXUTILS-106.json new file mode 100644 index 00000000..4330f87b --- /dev/null +++ b/jira/PLXUTILS-106.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"85749","self":"http://jira.codehaus.org/rest/api/latest/issue/85749","key":"PLXUTILS-106","fields":{"progress":{"progress":0,"total":0},"summary":"Distinct CommandLineException when process is killed on timeOut","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-106/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15258","id":"15258","description":"","name":"1.5.9","archived":false,"released":true,"releaseDate":"2009-04-28"}],"resolutiondate":"2009-04-28T16:06:47.525-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ndeloof","name":"ndeloof","emailAddress":"nicolas.deloof@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=ndeloof&avatarId=10411","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=ndeloof&avatarId=10411","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=ndeloof&avatarId=10411","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=ndeloof&avatarId=10411"},"displayName":"nicolas de loof","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["ndeloof(ndeloof)","olamy(olamy)"],"customfield_10160":null,"updated":"2009-04-28T16:06:47.521-0500","created":"2009-04-25T09:09:07.025-0500","description":"When running a forked process with plexus-utils using timeOut, there is no way (only can check the exception getMessage()) to disctinct error from timeOut. A CommandLineException class hierarchy would be great for finest execution check.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"180662400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-106/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-107.json b/jira/PLXUTILS-107.json new file mode 100644 index 00000000..63ca44b1 --- /dev/null +++ b/jira/PLXUTILS-107.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"85750","self":"http://jira.codehaus.org/rest/api/latest/issue/85750","key":"PLXUTILS-107","fields":{"progress":{"progress":0,"total":0},"summary":"Shell implementation to .. not use a shell","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-107/votes","votes":1,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ndeloof","name":"ndeloof","emailAddress":"nicolas.deloof@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=ndeloof&avatarId=10411","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=ndeloof&avatarId=10411","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=ndeloof&avatarId=10411","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=ndeloof&avatarId=10411"},"displayName":"nicolas de loof","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["fj(fj)","ndeloof(ndeloof)"],"customfield_10160":null,"updated":"2011-12-05T00:55:00.371-0600","created":"2009-04-25T09:11:20.231-0500","description":"On windows, running a process using a system Shell introduce the \"command line length limitation\" (~4000 chars on win XP) that can be a blocker when long classpath are used.\n\nRunning same command without a shell, but just using the JVM executable solves this issue. A \"JavaShell\" or an option to NOT use a shell could be usefull in such case.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"98236800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-107/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/85750/comment/284882","id":"284882","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=fj","name":"fj","emailAddress":"Frank.Jakop@tolina.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Frank Jakop","active":true},"body":"Using a shell has another nasty side-effect. Due to the process architecture on Windows the ececuted process is not terminated when hitting ctrl+c.\r\nSee http://jira.codehaus.org/browse/PLXUTILS-40?focusedCommentId=284881&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-284881","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=fj","name":"fj","emailAddress":"Frank.Jakop@tolina.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Frank Jakop","active":true},"created":"2011-12-05T00:55:00.353-0600","updated":"2011-12-05T00:55:00.353-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-108.json b/jira/PLXUTILS-108.json new file mode 100644 index 00000000..ae206289 --- /dev/null +++ b/jira/PLXUTILS-108.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"86410","self":"http://jira.codehaus.org/rest/api/latest/issue/86410","key":"PLXUTILS-108","fields":{"progress":{"progress":0,"total":0},"summary":"Javadoc for org.codehaus.plexus.util.dag package","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-108/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=james.w.dumay","name":"james.w.dumay","emailAddress":"james@atlassian.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"James William Dumay","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["james.w.dumay(james.w.dumay)"],"customfield_10160":null,"updated":"2009-05-10T22:15:12.465-0500","created":"2009-05-10T22:15:12.465-0500","description":"It would be really useful to have more Javadoc for the org.codehaus.plexus.util.dag package in plexus-utils.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"179280000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-108/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15258","id":"15258","description":"","name":"1.5.9","archived":false,"released":true,"releaseDate":"2009-04-28"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-109.json b/jira/PLXUTILS-109.json new file mode 100644 index 00000000..69c913d9 --- /dev/null +++ b/jira/PLXUTILS-109.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"86984","self":"http://jira.codehaus.org/rest/api/latest/issue/86984","key":"PLXUTILS-109","fields":{"progress":{"progress":0,"total":0},"summary":"MXParser doesnt handle all numeric character references like 𒍅","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-109/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15318","id":"15318","description":"","name":"1.5.10","archived":false,"released":true,"releaseDate":"2009-05-29"}],"resolutiondate":"2009-05-28T17:37:23.193-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["siveton(siveton)"],"customfield_10160":null,"updated":"2009-05-28T17:37:23.183-0500","created":"2009-05-20T07:14:37.520-0500","description":"𒍅 is a valid entity which is the char \"\\uD808\\uDF45\" [1] and [2]\n\nThe parser doesn't take care of surrogate char in parseEntityRef()\n\n[1] http://www.fileformat.info/info/unicode/char/12345/index.htm\n[2] http://www.w3.org/TR/REC-xml/#dt-charref","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"177724800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-109/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15258","id":"15258","description":"","name":"1.5.9","archived":false,"released":true,"releaseDate":"2009-04-28"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/86984/comment/177316","id":"177316","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"see http://svn.apache.org/viewvc?rev=776696&view=rev","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-05-20T08:44:17.941-0500","updated":"2009-05-20T08:44:17.941-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/86984/comment/178508","id":"178508","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"merge Doxia code in r8236","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-05-28T17:37:23.180-0500","updated":"2009-05-28T17:37:23.180-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-11.json b/jira/PLXUTILS-11.json new file mode 100644 index 00000000..2d91a9b7 --- /dev/null +++ b/jira/PLXUTILS-11.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"34791","self":"http://jira.codehaus.org/rest/api/latest/issue/34791","key":"PLXUTILS-11","fields":{"progress":{"progress":0,"total":0},"summary":"MXParser can't handle the encoding declaration in XML declaration ","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-11/votes","votes":8,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14030","id":"14030","description":"","name":"1.4.4","archived":false,"released":true,"releaseDate":"2007-07-20"}],"resolutiondate":"2007-07-08T13:55:52.407-0500","customfield_10210":"4.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nose","name":"nose","emailAddress":"nosenaoki@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Naoki Nose","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["carlos(carlos)","hboutemy(hboutemy)","nose(nose)","stefanhuebner(stefanhuebner)"],"customfield_10160":null,"updated":"2008-02-02T15:34:37.648-0600","created":"2006-03-12T10:28:17.181-0600","description":"The xml pull parser in plexus-utils(MXParser.java) can't handle the encoding declaration in XML declaration.\nSo, it's impossible to use an encoding different from system default encoding. This is critical in Japan, because \nthere is two commonly used encodings in Japanese environment(SJIS and EUC-JP).\n\nI think MXParser should handle encoding declaration in xml as described in w3c specification/\nhttp://www.w3.org/TR/REC-xml/#sec-guessing\n\nI tried to fix this problem(see attachment).\nI changed the setInput(InputStream) method to detect encoding in xml declaration.\nFor writing this code, I referred to source code of Apache Xerces.\nUCS-4 and UCS-2 isn't supported in this implementation, because\nthese encoding isn't supported by Sun JDK.\n\nXerces solves this problem by providing original reader for these encodings. I think Xerces's solution is\ntoo complex for plexus-utils.\n\nTo solve this issue, it's not sufficient only to change plexus-utils, because\nDefaultMavenProjectBuilder reads POM by FileReader without specifying encoding.\n\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"15176","self":"http://jira.codehaus.org/rest/api/2/issueLink/15176","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"41132","key":"MEVENIDE-449","self":"http://jira.codehaus.org/rest/api/2/issue/41132","fields":{"summary":"Mevenide plugin stumbels upon non ASCII characters in the path to the .m2 directory","status":{"self":"http://jira.codehaus.org/rest/api/2/status/5","description":"A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/resolved.png","name":"Resolved","id":"5"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"14077","self":"http://jira.codehaus.org/rest/api/2/issueLink/14077","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"28975","key":"MSITE-19","self":"http://jira.codehaus.org/rest/api/2/issue/28975","fields":{"summary":"Various encoding problems with InputStream and XML","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"14049","self":"http://jira.codehaus.org/rest/api/2/issueLink/14049","type":{"id":"10020","name":"Supercedes","inward":"is superceded by","outward":"supercedes","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10020"},"inwardIssue":{"id":"36478","key":"MNG-2255","self":"http://jira.codehaus.org/rest/api/2/issue/36478","fields":{"summary":"Use a external XML Pull parser instead of plexus one","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}},{"id":"14515","self":"http://jira.codehaus.org/rest/api/2/issueLink/14515","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"39201","key":"MANTTASKS-14","self":"http://jira.codehaus.org/rest/api/2/issue/39201","fields":{"summary":"Ant Tasks do not work on the ZOS","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"14099","self":"http://jira.codehaus.org/rest/api/2/issueLink/14099","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"33038","key":"MNG-2025","self":"http://jira.codehaus.org/rest/api/2/issue/33038","fields":{"summary":"POM is still not read using the right encoding","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"17183","self":"http://jira.codehaus.org/rest/api/2/issueLink/17183","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"53774","key":"DOXIA-133","self":"http://jira.codehaus.org/rest/api/2/issue/53774","fields":{"summary":"default XML encoding (UTF-8) or XML encoding set in XML files is ignored: inputEncoding is used instead","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"14098","self":"http://jira.codehaus.org/rest/api/2/issueLink/14098","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"32521","key":"MECLIPSE-56","self":"http://jira.codehaus.org/rest/api/2/issue/32521","fields":{"summary":"Generated .project-file misses encoding declaration","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"14046","self":"http://jira.codehaus.org/rest/api/2/issueLink/14046","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"36477","key":"MNG-2254","self":"http://jira.codehaus.org/rest/api/2/issue/36477","fields":{"summary":"the encoding parameter in xml declaration of POM is ignored ","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"17079","self":"http://jira.codehaus.org/rest/api/2/issueLink/17079","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"53309","key":"MSITE-239","self":"http://jira.codehaus.org/rest/api/2/issue/53309","fields":{"summary":"encoding declaration in site.xml is ignored","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"238377600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-11/watchers","watchCount":7,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/20228","id":"20228","filename":"plexus-utils.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nose","name":"nose","emailAddress":"nosenaoki@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Naoki Nose","active":true},"created":"2006-04-23T02:44:31.383-0500","size":59499,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/20228/plexus-utils.diff"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/20229","id":"20229","filename":"plexus-utils-test-resource.tar.gz","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nose","name":"nose","emailAddress":"nosenaoki@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Naoki Nose","active":true},"created":"2006-04-23T02:48:33.271-0500","size":581,"mimeType":"application/x-gzip","content":"http://jira.codehaus.org/secure/attachment/20229/plexus-utils-test-resource.tar.gz"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/28176","id":"28176","filename":"PLXUTILS-11.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2007-06-26T15:23:49.039-0500","size":34779,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/28176/PLXUTILS-11.diff"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/19563","id":"19563","filename":"src.jar","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nose","name":"nose","emailAddress":"nosenaoki@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Naoki Nose","active":true},"created":"2006-03-12T10:28:17.264-0600","size":49018,"mimeType":"application/x-jar","content":"http://jira.codehaus.org/secure/attachment/19563/src.jar"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":6,"total":6,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/34791/comment/63998","id":"63998","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nose","name":"nose","emailAddress":"nosenaoki@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Naoki Nose","active":true},"body":"patch file for plexus-utils. ","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nose","name":"nose","emailAddress":"nosenaoki@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Naoki Nose","active":true},"created":"2006-04-23T02:44:31.427-0500","updated":"2006-04-23T02:44:31.427-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/34791/comment/63999","id":"63999","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nose","name":"nose","emailAddress":"nosenaoki@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Naoki Nose","active":true},"body":"The test resource files for MXParserTest.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nose","name":"nose","emailAddress":"nosenaoki@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Naoki Nose","active":true},"created":"2006-04-23T02:48:33.314-0500","updated":"2006-04-23T02:48:33.314-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/34791/comment/64002","id":"64002","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nose","name":"nose","emailAddress":"nosenaoki@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Naoki Nose","active":true},"body":"I have attached additional two files, becaulse The format of my first attachment isn't diff format.\r\n\r\nThe file plexus-utils.diff is the patch file for plexus-utils. It contains xml encoding detection code.\r\nThe file plexus-utils-test-resources.tar.gz is the test resource files for MXParserTest.java.\r\nThe format of these resource files is binary, so plexux-utils.diff could'nt contain these files.\r\n\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nose","name":"nose","emailAddress":"nosenaoki@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Naoki Nose","active":true},"created":"2006-04-23T03:23:09.984-0500","updated":"2006-04-23T03:23:09.984-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/34791/comment/64668","id":"64668","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"body":"We'd better switch to an external xml parser, see MNG-2255","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"created":"2006-05-03T11:32:29.624-0500","updated":"2006-05-03T11:32:29.624-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/34791/comment/65077","id":"65077","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=stefanhuebner","name":"stefanhuebner","emailAddress":"sthuebner@googlemail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Stefan Hübner","active":true},"body":"As I just stated in MNG-2255 I think, that ??\"...the parser used to read in maven's model isn't the problem really. It's more likely the way the POM is handed to the parser.\"??\r\n\r\nSee MNG-2255 for full discussion of the issue.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=stefanhuebner","name":"stefanhuebner","emailAddress":"sthuebner@googlemail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Stefan Hübner","active":true},"created":"2006-05-09T17:32:35.406-0500","updated":"2006-05-09T17:32:35.406-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/34791/comment/100636","id":"100636","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"body":"Here is XmlReader class, taken out from Rome:\r\nsee https://rome.dev.java.net/apidocs/0_9/com/sun/syndication/io/XmlReader.html\r\n\r\nWith this class available, encoding detection is not necessary done by the XML parser, but can be handled by the XmlReader used: the parser does not need any complex code for encoding detection.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2007-06-26T15:23:49.047-0500","updated":"2007-06-26T15:23:49.047-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-110.json b/jira/PLXUTILS-110.json new file mode 100644 index 00000000..dec0c785 --- /dev/null +++ b/jira/PLXUTILS-110.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"86987","self":"http://jira.codehaus.org/rest/api/latest/issue/86987","key":"PLXUTILS-110","fields":{"progress":{"progress":0,"total":0},"summary":"Wronf entity replacement in MXParser ","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-110/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15318","id":"15318","description":"","name":"1.5.10","archived":false,"released":true,"releaseDate":"2009-05-29"}],"resolutiondate":"2009-05-28T17:58:03.686-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["siveton(siveton)"],"customfield_10160":null,"updated":"2009-05-28T17:58:03.677-0500","created":"2009-05-20T07:59:45.228-0500","description":"{noformat}\n\n

&myCustom;

\n{noformat}\n\n&myCustom; = &fo; instead of A","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"177724800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-110/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15258","id":"15258","description":"","name":"1.5.9","archived":false,"released":true,"releaseDate":"2009-04-28"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/86987/comment/177317","id":"177317","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"see http://svn.apache.org/viewvc?rev=776696&view=rev","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-05-20T08:44:36.253-0500","updated":"2009-05-20T08:44:36.253-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/86987/comment/178512","id":"178512","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"merge code from doxia in r8237","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-05-28T17:58:03.674-0500","updated":"2009-05-28T17:58:03.674-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-111.json b/jira/PLXUTILS-111.json new file mode 100644 index 00000000..bc0c60bd --- /dev/null +++ b/jira/PLXUTILS-111.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"87173","self":"http://jira.codehaus.org/rest/api/latest/issue/87173","key":"PLXUTILS-111","fields":{"progress":{"progress":0,"total":0},"summary":"Add copy constructor for Xpp3Dom that allows rename","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-111/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15318","id":"15318","description":"","name":"1.5.10","archived":false,"released":true,"releaseDate":"2009-05-29"}],"resolutiondate":"2009-05-24T11:33:30.341-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)"],"customfield_10160":null,"updated":"2009-05-24T11:33:30.336-0500","created":"2009-05-24T11:30:12.498-0500","description":"Given the name is unmodifiable, a copy constructor to specify an alternative name would be handy.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"178070400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-111/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15258","id":"15258","description":"","name":"1.5.9","archived":false,"released":true,"releaseDate":"2009-04-28"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/87173/comment/177857","id":"177857","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Added in [r8215|http://fisheye.codehaus.org/changelog/plexus/?cs=8215].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2009-05-24T11:33:30.333-0500","updated":"2009-05-24T11:33:30.333-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-112.json b/jira/PLXUTILS-112.json new file mode 100644 index 00000000..e4d58a82 --- /dev/null +++ b/jira/PLXUTILS-112.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"50086","self":"http://jira.codehaus.org/rest/api/latest/issue/50086","key":"PLXUTILS-112","fields":{"progress":{"progress":0,"total":0},"summary":"Using plexus in maven2 causes a \"too many open files exception\"","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-112/votes","votes":1,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15318","id":"15318","description":"","name":"1.5.10","archived":false,"released":true,"releaseDate":"2009-05-29"}],"resolutiondate":"2009-05-28T16:45:58.032-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ivovandongen","name":"ivovandongen","emailAddress":"ivovandongen@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Ivo van Dongen","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["evenisse(evenisse)","silas1106(silas1106)","ivovandongen(ivovandongen)","rt15(rt15)"],"customfield_10160":null,"updated":"2009-05-28T23:54:37.470-0500","created":"2007-04-19T10:25:59.942-0500","description":"When building large projects we run into a problem in the last stages of a maven2 build. We've alreadye upped the OS limits on open file handles per proces and in general. I've dropped this on the continuum mailinglist at first but they pointed me in this direction.\n\nThe last part of the maven output is:\n\n[INFO] [war:war]\n[INFO] Exploding webapp...\n[INFO] Copy webapp webResources to /opt/continuum-1.0.3/apps/continuum/working-directory/55/target/ROOT\n[INFO] Copy webapp webResources to /opt/continuum-1.0.3/apps/continuum/working-directory/55/target/ROOT\n[INFO] Assembling webapp tesis in /opt/continuum-1.0.3/apps/continuum/working-directory/55/target/ROOT\n[INFO] Generating war /opt/continuum-1.0.3/apps/continuum/working-directory/55/target/ROOT.war\n[INFO] Building war: /opt/continuum-1.0.3/apps/continuum/working-directory/55/target/ROOT.war\n[INFO] ------------------------------------------------------------------------\n[ERROR] BUILD ERROR\n[INFO] ------------------------------------------------------------------------\n[INFO] Error assembling WAR: Problem creating war: /opt/continuum-1.0.3/apps/continuum/working-directory/55/target/ROOT/WEB-INF/lib/XmlSchema-1.1.jar (Too many open files)\n\n[INFO] ------------------------------------------------------------------------\n[INFO] Trace\norg.apache.maven.lifecycle.LifecycleExecutionException: Error assembling WAR: Problem creating war: /opt/continuum-1.0.3/apps/continuum/working-directory/55/target/ROOT/WEB-INF/lib/XmlSchema-1.1.jar (Too many open files)\nat org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)\nat org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)\nat org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)\nat org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)\nat org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)\nat org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)\nat org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)\nat org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)\nat org.apache.maven.cli.MavenCli.main(MavenCli.java:256)\nat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\nat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\nat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\nat java.lang.reflect.Method.invoke(Method.java:585)\nat org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)\nat org.codehaus.classworlds.Launcher.launch(Launcher.java:255)\nat org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)\nat org.codehaus.classworlds.Launcher.main(Launcher.java:375)\nCaused by: org.apache.maven.plugin.MojoExecutionException: Error assembling WAR: Problem creating war: /opt/continuum-1.0.3/apps/continuum/working-directory/55/target/ROOT/WEB-INF/lib/XmlSchema-1.1.jar (Too many open files)\nat org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:149)\nat org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)\nat org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)\n... 16 more\nCaused by: org.codehaus.plexus.archiver.ArchiverException: Problem creating war: /opt/continuum-1.0.3/apps/continuum/working-directory/55/target/ROOT/WEB-INF/lib/XmlSchema-1.1.jar (Too many open files)\nat org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:403)\nat org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchive(AbstractZipArchiver.java:229)\nat org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:332)\nat org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:183)\nat org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:133)\n... 18 more\nCaused by: java.io.FileNotFoundException: /opt/continuum-1.0.3/apps/continuum/working-directory/55/target/ROOT/WEB-INF/lib/XmlSchema-1.1.jar (Too many open files)\nat java.io.FileInputStream.open(Native Method)\nat java.io.FileInputStream.(FileInputStream.java:106)\nat org.codehaus.plexus.archiver.zip.AbstractZipArchiver.zipFile(AbstractZipArchiver.java:679)\nat org.codehaus.plexus.archiver.zip.AbstractZipArchiver.addResources(AbstractZipArchiver.java:492)\nat org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:330)\n... 22 more\n[INFO] ------------------------------------------------------------------------\n[INFO] Total time: 3 minutes 54 seconds\n[INFO] Finished at: Thu Apr 19 14:26:45 CEST 2007\n[INFO] Final Memory: 106M/209M\n[INFO] --","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"177724800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-112/watchers","watchCount":4,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/41385","id":"41385","filename":"Main.java","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=rt15","name":"rt15","emailAddress":"rt15@voila.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"rt15","active":true},"created":"2009-04-16T07:43:54.401-0500","size":1864,"mimeType":"java/*","content":"http://jira.codehaus.org/secure/attachment/41385/Main.java"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"debian stable","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":4,"total":4,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/50086/comment/125646","id":"125646","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=silas1106","name":"silas1106","emailAddress":"silas1106@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Eping","active":true},"body":"Getting the same exception, but not from using the archiver:\r\n\r\n77237724 [pool-1-thread-1] INFO org.apache.maven.continuum.buildcontroller.BuildController:default - Initializing build\r\n77237736 [pool-1-thread-1] INFO org.apache.maven.continuum.buildcontroller.BuildController:default - Starting build of Smartplanner\r\n77237885 [pool-1-thread-1] INFO org.apache.maven.continuum.buildcontroller.BuildController:default - Updating working dir\r\n77237886 [pool-1-thread-1] INFO org.apache.maven.continuum.buildcontroller.BuildController:default - Performing action check-working-directory\r\n77237887 [pool-1-thread-1] INFO org.apache.maven.continuum.buildcontroller.BuildController:default - Performing action update-working-directory-from-scm\r\n77237914 [pool-1-thread-1] INFO org.apache.maven.continuum.scm.ContinuumScm:default - Updating project: id: '6', name 'aProject'.\r\n77238021 [pool-1-thread-1] INFO org.apache.maven.scm.manager.ScmManager:default - Executing: /bin/sh -c \"cd /home/build/continuum-1.1/apps/continuum/webapp/WEB-INF/working-directory/6 && svn --username build\r\ns --non-interactive update\"\r\n77238022 [pool-1-thread-1] INFO org.apache.maven.scm.manager.ScmManager:default - Working directory: /home/build/continuum-1.1/apps/continuum/webapp/WEB-INF/working-directory/6\r\n77238372 [pool-1-thread-1] ERROR org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor:build-project - Error executing task\r\norg.codehaus.plexus.taskqueue.execution.TaskExecutionException: SCM error while executing 'update-working-directory-from-scm'\r\n at org.apache.maven.continuum.buildcontroller.DefaultBuildController.performAction(DefaultBuildController.java:430)\r\n at org.apache.maven.continuum.buildcontroller.DefaultBuildController.updateWorkingDirectory(DefaultBuildController.java:380)\r\n at org.apache.maven.continuum.buildcontroller.DefaultBuildController.build(DefaultBuildController.java:112)\r\n at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutor.executeTask(BuildProjectTaskExecutor.java:50)\r\n at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTaskQueueExecutor.java:116)\r\n at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)\r\n at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)\r\n at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)\r\n at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)\r\n at java.lang.Thread.run(Thread.java:595)\r\nCaused by: org.apache.maven.continuum.scm.ContinuumScmException: Error while update sources.\r\n at org.apache.maven.continuum.scm.DefaultContinuumScm.updateProject(DefaultContinuumScm.java:285)\r\n at org.apache.maven.continuum.core.action.UpdateWorkingDirectoryFromScmContinuumAction.execute(UpdateWorkingDirectoryFromScmContinuumAction.java:75)\r\n at org.apache.maven.continuum.buildcontroller.DefaultBuildController.performAction(DefaultBuildController.java:408)\r\n ... 9 more\r\nCaused by: org.apache.maven.scm.ScmException: Exception while executing SCM command.\r\n at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:62)\r\n at org.apache.maven.scm.provider.svn.AbstractSvnScmProvider.executeCommand(AbstractSvnScmProvider.java:371)\r\n at org.apache.maven.scm.provider.svn.AbstractSvnScmProvider.update(AbstractSvnScmProvider.java:362)\r\n at org.apache.maven.scm.provider.AbstractScmProvider.update(AbstractScmProvider.java:931)\r\n at org.apache.maven.scm.provider.AbstractScmProvider.update(AbstractScmProvider.java:906)\r\n at org.apache.maven.scm.provider.AbstractScmProvider.update(AbstractScmProvider.java:878)\r\n at org.apache.maven.continuum.scm.DefaultContinuumScm.updateProject(DefaultContinuumScm.java:255)\r\n ... 11 more\r\nCaused by: org.apache.maven.scm.ScmException: Error while executing command.\r\n at org.apache.maven.scm.provider.svn.svnexe.command.update.SvnUpdateCommand.executeUpdateCommand(SvnUpdateCommand.java:72)\r\n at org.apache.maven.scm.command.update.AbstractUpdateCommand.executeCommand(AbstractUpdateCommand.java:62)\r\n at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:58)\r\n ... 17 more\r\nCaused by: org.codehaus.plexus.util.cli.CommandLineException: Error while executing process.\r\n at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:652)\r\n at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:102)\r\n at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:89)\r\n at org.apache.maven.scm.provider.svn.svnexe.command.SvnCommandLineUtils.execute(SvnCommandLineUtils.java:126)\r\n at org.apache.maven.scm.provider.svn.svnexe.command.update.SvnUpdateCommand.executeUpdateCommand(SvnUpdateCommand.java:68)\r\n ... 19 more\r\nCaused by: java.io.IOException: java.io.IOException: Too many open files\r\n at java.lang.UNIXProcess.(UNIXProcess.java:148)\r\n at java.lang.ProcessImpl.start(ProcessImpl.java:65)\r\n at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)\r\n at java.lang.Runtime.exec(Runtime.java:591)\r\n at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:647)\r\n ... 23 more\r\n\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=silas1106","name":"silas1106","emailAddress":"silas1106@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Eping","active":true},"created":"2008-02-29T12:46:36.207-0600","updated":"2008-02-29T12:46:36.207-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/50086/comment/173149","id":"173149","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=rt15","name":"rt15","emailAddress":"rt15@voila.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"rt15","active":true},"body":"Hi (And sorry for my horrible english),\r\n\r\nI also get this error...\r\n\r\nIt seems that it is linked to a well known issue :\r\nhttp://stuffthathappens.com/blog/2007/11/28/crash-boom-too-many-open-files/\r\nhttp://dlinsin.blogspot.com/2007/02/javas-runtimeexec-openes-too-many-files.html\r\nhttp://bytes.com/groups/java/18019-java-io-exception-too-many-open-files-sun-os-5-6-a\r\n\r\nI reproduced with following code, which look likes ArchiveEntryUtils.chmod (Decompiled) :\r\n\r\nimport org.codehaus.plexus.util.cli.*;\r\n \r\npublic class Main\r\n{\r\n \r\n public static void chmod()\r\n throws Exception\r\n {\r\n try\r\n {\r\n Commandline commandline = new Commandline();\r\n commandline.setExecutable(\"netstat\");\r\n org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer stderr = new org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer();\r\n org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer stdout = new org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer();\r\n int exitCode = CommandLineUtils.executeCommandLine(commandline, stderr, stdout);\r\n if(exitCode != 0)\r\n {\r\n System.out.println(\"-------------------------------\");\r\n System.out.println(\"Standard error:\");\r\n System.out.println(\"-------------------------------\");\r\n System.out.println(stderr.getOutput());\r\n System.out.println(\"-------------------------------\");\r\n System.out.println(\"Standard output:\");\r\n System.out.println(\"-------------------------------\");\r\n System.out.println(stdout.getOutput());\r\n System.out.println(\"-------------------------------\");\r\n throw new Exception(\"chmod exit code was: \" + exitCode);\r\n }\r\n }\r\n catch(CommandLineException e)\r\n {\r\n throw new Exception(\"Error while executing chmod.\", e);\r\n }\r\n }\r\n \r\n /**\r\n * @param args\r\n */\r\n public static void main(String[] args)\r\n {\r\n int i = 0;\r\n try\r\n {\r\n while (true)\r\n {\r\n chmod();\r\n Thread.sleep(1);\r\n System.out.println(i);\r\n i++;\r\n } \r\n }\r\n catch (Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }\r\n}\r\n\r\nHere is the error message, on a 32 bit linux with an 1.5.0 jre (Not reproduced on XP) :\r\n\r\n9411\r\n9412\r\n9413\r\n9414\r\n9415\r\njava.lang.Exception: Error while executing chmod.\r\n at Main.chmod(Main.java:32)\r\n at Main.main(Main.java:46)\r\nCaused by: org.codehaus.plexus.util.cli.CommandLineException: Error while executing process.\r\n at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:658)\r\n at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:118)\r\n at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:93)\r\n at Main.chmod(Main.java:15)\r\n ... 1 more\r\nCaused by: java.io.IOException: java.io.IOException: Too many open files\r\n at java.lang.UNIXProcess.(UNIXProcess.java:148)\r\n at java.lang.ProcessImpl.start(ProcessImpl.java:65)\r\n at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)\r\n at java.lang.Runtime.exec(Runtime.java:591)\r\n at java.lang.Runtime.exec(Runtime.java:507)\r\n at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:638)\r\n ... 4 more\r\n\r\nWith lsof Linux command, I see that there are more and more openned pipes :\r\n\r\njava 12154 brbo 0u CHR 136,11 13 /dev/pts/11\r\njava 12154 brbo 1u CHR 136,11 13 /dev/pts/11\r\njava 12154 brbo 2u CHR 136,11 13 /dev/pts/11\r\njava 12154 brbo 4w FIFO 0,5 284090336 pipe\r\njava 12154 brbo 5w FIFO 0,5 284090372 pipe\r\njava 12154 brbo 6r FIFO 0,5 284090373 pipe\r\njava 12154 brbo 7w FIFO 0,5 284090377 pipe\r\njava 12154 brbo 8r FIFO 0,5 284090374 pipe\r\njava 12154 brbo 9w FIFO 0,5 284090415 pipe\r\njava 12154 brbo 10r FIFO 0,5 284090416 pipe\r\njava 12154 brbo 11w FIFO 0,5 284090420 pipe\r\njava 12154 brbo 12r FIFO 0,5 284090417 pipe\r\njava 12154 brbo 13w FIFO 0,5 284090457 pipe\r\njava 12154 brbo 14r FIFO 0,5 284090458 pipe\r\n...\r\njava 12154 brbo 528r FIFO 0,5 284089024 pipe\r\njava 12154 brbo 530r FIFO 0,5 284089025 pipe\r\njava 12154 brbo 531w FIFO 0,5 284090330 pipe\r\njava 12154 brbo 532r FIFO 0,5 284090331 pipe\r\njava 12154 brbo 534r FIFO 0,5 284090332 pipe\r\n\r\nI think the problem is in CommandLineUtils.execute.\r\nHere is the creation :\r\n\r\n Process p = cl.execute();\r\n processes.put(new Long(cl.getPid()), p);\r\n StreamFeeder inputFeeder = null;\r\n if(systemIn != null)\r\n inputFeeder = new StreamFeeder(systemIn, p.getOutputStream());\r\n StreamPumper outputPumper = new StreamPumper(p.getInputStream(), systemOut);\r\n StreamPumper errorPumper = new StreamPumper(p.getErrorStream(), systemErr);\r\n\r\n(See the strange Input <-> Output peers...)\r\n\r\nFrom my links above, following streams must be closed :\r\np.getInputStream()\r\np.getOutputStream()\r\np.getErrorStream()\r\n\r\n(Perhaps p.destroy() do this job).\r\n\r\nBut at the end of execute method, there is :\r\n\r\n finally\r\n {\r\n if(inputFeeder != null)\r\n inputFeeder.close();\r\n outputPumper.close();\r\n errorPumper.close();\r\n }\r\n\r\n(StreamPumper and StreamFeeder close the associated streams)\r\nIf systemIn is null (Which is the case with my example above), p.getOutputStream() is never closed.\r\nMaybe it is the bug.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=rt15","name":"rt15","emailAddress":"rt15@voila.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"rt15","active":true},"created":"2009-04-16T07:41:02.083-0500","updated":"2009-04-16T07:41:02.083-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/50086/comment/173151","id":"173151","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=rt15","name":"rt15","emailAddress":"rt15@voila.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"rt15","active":true},"body":"Sorry for the badly formatted code in my previous post. See the attached file.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=rt15","name":"rt15","emailAddress":"rt15@voila.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"rt15","active":true},"created":"2009-04-16T07:43:54.410-0500","updated":"2009-04-16T07:43:54.410-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/50086/comment/178499","id":"178499","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"body":"Fixed in r.8235","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"created":"2009-05-28T16:45:58.005-0500","updated":"2009-05-28T16:45:58.005-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-113.json b/jira/PLXUTILS-113.json new file mode 100644 index 00000000..3d84166a --- /dev/null +++ b/jira/PLXUTILS-113.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"88779","self":"http://jira.codehaus.org/rest/api/latest/issue/88779","key":"PLXUTILS-113","fields":{"progress":{"progress":0,"total":0},"summary":"Error in command line generation with BourneShell","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-113/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/6","id":"6","description":"The issue is not a bug","name":"Not A Bug"},"fixVersions":[],"resolutiondate":"2009-07-15T03:26:53.535-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=grzes","name":"grzes","emailAddress":"grzegorz.grzybek@winuel.com.pl","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Grzegorz Grzybek","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["grzes(grzes)"],"customfield_10160":null,"updated":"2009-07-15T03:26:53.530-0500","created":"2009-06-26T07:30:32.494-0500","description":"The path is:\n* Hudson runs Maven2 build\n* M2 build uses buildnumber-maven-plugin\n* which then uses svn info to get revision number\n\ntracing down the execution, Maven invokes:\nbq. /bin/sh -c cd /var/java/.hudson/jobs/com.winuel.pwi-trunk/workspace/trunk/com.winuel.pwi && svn --non-interactive info\ninstead of\nbq. /bin/sh -c 'cd /var/java/.hudson/jobs/com.winuel.pwi-trunk/workspace/trunk/com.winuel.pwi && svn --non-interactive info'\n\nthe former does not change the working directory for *svn --non-interactive info*\n\nI don't know why it doesn't work - even if Runtime.exec() is called with working dir argument...\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"173664000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-113/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"Debian GNU Linux, /bin/sh = /bin/bash (version 3.2-5)","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/88779/comment/181620","id":"181620","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=grzes","name":"grzes","emailAddress":"grzegorz.grzybek@winuel.com.pl","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Grzegorz Grzybek","active":true},"body":"The problem is:\r\n{noformat}\r\n[INFO] Storing buildNumber: null at timestamp: 20090626.1342\r\n\r\n[INFO] ------------------------------------------------------------------------\r\n[ERROR] FATAL ERROR\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] null\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Trace\r\njava.lang.NullPointerException\r\n\tat java.util.Hashtable.put(Hashtable.java:394)\r\n\tat org.codehaus.mojo.build.CreateMojo.execute(CreateMojo.java:442)\r\n\tat org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)\r\n\tat hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)\r\n\tat org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)\r\n\tat org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)\r\n\tat org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)\r\n ...\r\n{noformat}","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=grzes","name":"grzes","emailAddress":"grzegorz.grzybek@winuel.com.pl","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Grzegorz Grzybek","active":true},"created":"2009-06-26T07:32:16.114-0500","updated":"2009-06-26T07:32:16.114-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/88779/comment/183621","id":"183621","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=grzes","name":"grzes","emailAddress":"grzegorz.grzybek@winuel.com.pl","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Grzegorz Grzybek","active":true},"body":"The problem was that {{svn}} command was executed in Polish LOCALE and {{org.apache.maven.scm.provider.svn.svnexe.command.info.SvnInfoConsumer}} expected English labels for {{svn info}}....\r\n\r\nSo I'm closing the issue.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=grzes","name":"grzes","emailAddress":"grzegorz.grzybek@winuel.com.pl","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Grzegorz Grzybek","active":true},"created":"2009-07-15T03:26:53.520-0500","updated":"2009-07-15T03:26:53.520-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-114.json b/jira/PLXUTILS-114.json new file mode 100644 index 00000000..e024bb9b --- /dev/null +++ b/jira/PLXUTILS-114.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"89982","self":"http://jira.codehaus.org/rest/api/latest/issue/89982","key":"PLXUTILS-114","fields":{"progress":{"progress":0,"total":0},"summary":"DirectoryScanner includes/excluses does not honour cross-platform file separators","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-114/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15598","id":"15598","description":"","name":"2.0.0","archived":false,"released":true,"releaseDate":"2009-09-22"}],"resolutiondate":"2009-07-21T11:53:38.024-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["igorfie(igorfie)","jdcasey(jdcasey)"],"customfield_10160":null,"updated":"2009-10-18T14:18:09.505-0500","created":"2009-07-21T10:46:54.585-0500","description":"DirectoryScanner#setIncluders and #setExcluders does not work for file path separator characters non-native to the system it runs on. This is despite the following statement in javadoc for the two methods\n\nbq. All '/' and '\\' characters are replaced by File.separatorChar, so the separator used need not match File.separatorChar.\n\nAttached is a unit test that demonstrates the problem.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"173059200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-114/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/43329","id":"43329","filename":"file-separators.zip","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"created":"2009-07-21T10:46:54.608-0500","size":3105,"mimeType":"application/x-zip","content":"http://jira.codehaus.org/secure/attachment/43329/file-separators.zip"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15515","id":"15515","description":"","name":"1.5.15","archived":false,"released":true,"releaseDate":"2009-06-05"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/89982/comment/184344","id":"184344","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"body":"fixed for 1.5.16","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"created":"2009-07-21T11:53:38.015-0500","updated":"2009-07-21T11:53:38.015-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-116.json b/jira/PLXUTILS-116.json new file mode 100644 index 00000000..da03b638 --- /dev/null +++ b/jira/PLXUTILS-116.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"91429","self":"http://jira.codehaus.org/rest/api/latest/issue/91429","key":"PLXUTILS-116","fields":{"progress":{"progress":0,"total":0},"summary":"PathTool.getRelativeFilePath gives different results on Windows and Linux","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-116/votes","votes":1,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T14:48:14.251-0600","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lukas","name":"lukas","emailAddress":"ltheussl@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Lukas Theussl","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["lukas(lukas)","michael-o(michael-o)"],"customfield_10160":null,"updated":"2014-11-25T14:48:14.289-0600","created":"2009-07-26T08:00:18.184-0500","description":"On windows, {noformat}PathTool.getRelativeFilePath( \"index.html\", \"c:\\\\bin\" );{noformat} returns null, on Linux, {noformat}PathTool.getRelativeFilePath( \"index.html\", \"/bin\" );{noformat} returns \"../bin\".\n\nI guess it's probably not a valid use case since both paths are supposed to be absolute, however, the fact that different results are returned has caused me much grief: MSITE-404.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"23762","self":"http://jira.codehaus.org/rest/api/2/issueLink/23762","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"91460","key":"DOXIASITETOOLS-29","self":"http://jira.codehaus.org/rest/api/2/issue/91460","fields":{"summary":"PathUtils.getRelativePath returns different results on Windows and Linux","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-116/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/43419","id":"43419","filename":"PLXUTILS-116-test.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lukas","name":"lukas","emailAddress":"ltheussl@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Lukas Theussl","active":true},"created":"2009-07-26T08:02:02.106-0500","size":1147,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/43419/PLXUTILS-116-test.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15515","id":"15515","description":"","name":"1.5.15","archived":false,"released":true,"releaseDate":"2009-06-05"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":3,"total":3,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/91429/comment/184916","id":"184916","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lukas","name":"lukas","emailAddress":"ltheussl@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Lukas Theussl","active":true},"body":"See attached patch for test case.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lukas","name":"lukas","emailAddress":"ltheussl@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Lukas Theussl","active":true},"created":"2009-07-26T08:02:02.114-0500","updated":"2009-07-26T08:02:02.114-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/91429/comment/251465","id":"251465","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lukas","name":"lukas","emailAddress":"ltheussl@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Lukas Theussl","active":true},"body":"Just got bitten by this again, there is another difference even if both paths are absolute:\r\n{noformat}PathTool.getRelativeFilePath( \"http://maven.apache.org/doxia/\", \"http://maven.apache.org/\");{noformat}\r\nreturns \"../\" on Linux but \"..\" on windows. The missing slash is important if the result is subsequently used in a URI constructor.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lukas","name":"lukas","emailAddress":"ltheussl@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Lukas Theussl","active":true},"created":"2011-01-13T08:08:05.101-0600","updated":"2011-01-13T08:08:05.101-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/91429/comment/357576","id":"357576","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:48:14.276-0600","updated":"2014-11-25T14:48:14.276-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-117.json b/jira/PLXUTILS-117.json new file mode 100644 index 00000000..accecf86 --- /dev/null +++ b/jira/PLXUTILS-117.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"96365","self":"http://jira.codehaus.org/rest/api/latest/issue/96365","key":"PLXUTILS-117","fields":{"progress":{"progress":0,"total":0},"summary":"The classes from org.codehaus.plexus.utils.interpolation are not self-contained","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-117/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2009-09-11T16:40:02.679-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","siveton(siveton)"],"customfield_10160":null,"updated":"2009-09-11T16:40:37.321-0500","created":"2009-08-22T10:41:22.197-0500","description":"[r8255|http://fisheye.codehaus.org/changelog/plexus/?cs=8255] caused exclusion of the plexus-interpolation classes from the plexus-utils JAR. This in turn makes usage of the {{org.codehaus.plexus.utils.intepolation.*}} classes from a standalone plexus-utils JAR impossible as their super classes can't be resolved. See the attached demo project that fails upon \"mvn clean compile\".\n\nNote sure whether the change in the above commit was actually necessary given that previous plexus-utils versions like 1.5.12 apparently shipped with a [dependency reduced POM|http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.5.12/plexus-utils-1.5.12.pom] that already declared plexus-interpolation as provided.\n\nDeclaring plexus-interpolation as provided in the original POM causes the dependency to be ignored by the Shade Plugin because that uses {{@requiresDependencyResolution runtime}} but provided dependencies are not resolved for this resolution scope...","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"24158","self":"http://jira.codehaus.org/rest/api/2/issueLink/24158","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"97362","key":"PLXUTILS-118","self":"http://jira.codehaus.org/rest/api/2/issue/97362","fields":{"summary":"Remove deprecated interpolation classes","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false}}}}],"customfield_10163":"168566400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-117/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/43963","id":"43963","filename":"pu-vs-pi.zip","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2009-08-22T10:41:22.222-0500","size":1077,"mimeType":"application/zip","content":"http://jira.codehaus.org/secure/attachment/43963/pu-vs-pi.zip"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15593","id":"15593","description":"","name":"1.5.13","archived":false,"released":true,"releaseDate":"2009-06-05"},{"self":"http://jira.codehaus.org/rest/api/2/version/15594","id":"15594","description":"","name":"1.5.14","archived":false,"released":true,"releaseDate":"2009-06-05"},{"self":"http://jira.codehaus.org/rest/api/2/version/15515","id":"15515","description":"","name":"1.5.15","archived":false,"released":true,"releaseDate":"2009-06-05"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/96365/comment/188179","id":"188179","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"For the log, it is related to:\r\n[Using latest Plexus Utils in javadoc-plugin|http://maven.markmail.org/message/4ebuh6i2qfdrxbs5]","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-08-23T05:35:33.868-0500","updated":"2009-08-23T05:35:33.868-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/96365/comment/190664","id":"190664","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"The interpolation classes have been removed from newer versions (PLXUTILS-118), plugins will simply need to use plexus-interpolation instead.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2009-09-11T16:40:02.665-0500","updated":"2009-09-11T16:40:02.665-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-118.json b/jira/PLXUTILS-118.json new file mode 100644 index 00000000..9b6d65c3 --- /dev/null +++ b/jira/PLXUTILS-118.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"97362","self":"http://jira.codehaus.org/rest/api/latest/issue/97362","key":"PLXUTILS-118","fields":{"progress":{"progress":0,"total":0},"summary":"Remove deprecated interpolation classes","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-118/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15598","id":"15598","description":"","name":"2.0.0","archived":false,"released":true,"releaseDate":"2009-09-22"}],"resolutiondate":"2009-09-11T16:38:04.123-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)"],"customfield_10160":null,"updated":"2009-09-11T16:40:37.294-0500","created":"2009-09-11T16:36:34.586-0500","description":"plexus-interpolation has been long around and also considering the issues we had with the shading it's time to move forward.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[{"id":"24158","self":"http://jira.codehaus.org/rest/api/2/issueLink/24158","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"96365","key":"PLXUTILS-117","self":"http://jira.codehaus.org/rest/api/2/issue/96365","fields":{"summary":"The classes from org.codehaus.plexus.utils.interpolation are not self-contained","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"168566400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-118/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/97362/comment/190663","id":"190663","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Done in [r8377|http://fisheye.codehaus.org/changelog/plexus/?cs=8377].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2009-09-11T16:38:04.112-0500","updated":"2009-09-11T16:38:04.112-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-119.json b/jira/PLXUTILS-119.json new file mode 100644 index 00000000..4be817cf --- /dev/null +++ b/jira/PLXUTILS-119.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"98424","self":"http://jira.codehaus.org/rest/api/latest/issue/98424","key":"PLXUTILS-119","fields":{"progress":{"progress":0,"total":86400,"percent":0},"summary":"org/codehaus/plexus/archiver/ArchiverException missing in plexus-archiver plugin","timetracking":{"originalEstimate":"1d","remainingEstimate":"1d","originalEstimateSeconds":86400,"remainingEstimateSeconds":86400},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-119/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/5","id":"5","description":"All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.","name":"Cannot Reproduce"},"fixVersions":[],"resolutiondate":"2010-10-28T17:54:07.082-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mgainty","name":"mgainty","emailAddress":"mgainty@hotmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Martin Gainty","active":true},"aggregatetimeoriginalestimate":86400,"customfield_10161":["bentmann(bentmann)","mgainty(mgainty)"],"customfield_10160":null,"updated":"2010-10-28T17:54:07.164-0500","created":"2009-09-30T13:19:30.739-0500","description":"[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-dependency-plugin:2.1:resolve-plugins': \nUnable to load the mojo 'org.apache.maven.plugins:maven-dependency-plugin:2.1:resolve-plugins' in the plugin\n'org.apache.maven.plugins:maven-dependency-plugin'. \nA required class is missing:\n org/codehaus/plexus/archiver/ArchiverException\n\nlocate org.codehaus.plexus.archiver.ArchiverException.java\ncompile ArchiverException.java\n\n\n \n]>\n\n 3\n.....\n \n \n \n Marit Finne J&OSlash;rgensen\n mfj\n marit ... \n\n\n\nThis works with maven 1.0. In order to use the project xml file with maven 1.1, the &OSlash; symbols must be replaced with their real letter 'ø', otherwise the plexus pullparser throws exceptionon the entity. \n\nWhile not supporting 'ø' actually could be considered a bug in all the other xml parsers, the Entity workaround is legal XML and should be parsable with all parsers.\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-12/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/26682/comment/128366","id":"128366","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Why bother with entity declarations if you can insert the character literally? The XML declaration allows you to select your favorite encoding, e.g. use UTF-8 and happily write quite any character around the world. All JVMs must support UTF-8 and all proper text editors support it.\r\n\r\nIf you really want to write ASCII-only, you could still use numeric entities like \"&\\#xuuuu;\" which XML parsers understand out-of-the-box.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-03-24T05:23:00.294-0500","updated":"2008-03-24T05:23:00.294-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/26682/comment/357364","id":"357364","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:31:04.723-0600","updated":"2014-11-25T14:31:04.723-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-120.json b/jira/PLXUTILS-120.json new file mode 100644 index 00000000..430d5be9 --- /dev/null +++ b/jira/PLXUTILS-120.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"99512","self":"http://jira.codehaus.org/rest/api/latest/issue/99512","key":"PLXUTILS-120","fields":{"progress":{"progress":0,"total":0},"summary":"DirectoryScanner misinterprets regex patterns with slash inside character class","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-120/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15870","id":"15870","description":"","name":"2.0.1","archived":false,"released":true,"releaseDate":"2009-10-19"}],"resolutiondate":"2009-10-18T14:12:10.236-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)"],"customfield_10160":null,"updated":"2009-10-20T16:27:54.441-0500","created":"2009-10-18T14:00:35.365-0500","description":"This code snippet says it all:\n\n{code:java}\n// test with user-provided pattern, yields expected result, i.e. false\nSystem.out.println( \"src-contains-output-dir-name-child1/src/main/java/target\".matches( \n \"(?!((?!target/)[^/]+/)*src/).*target.*\" ) );\n\n// internally employed pattern by DirectoryScanner, note the broken character class [^[\\\\\\\\/]], yields true\nSystem.out.println( \"src-contains-output-dir-name-child1/src/main/java/target\".matches( \n \"(?!((?!target[\\\\\\\\/])[^[\\\\\\\\/]]+[\\\\\\\\/])*src[\\\\\\\\/]).*target.*\" ) );\n{code}\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"24597","self":"http://jira.codehaus.org/rest/api/2/issueLink/24597","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"97499","key":"MASSEMBLY-446","self":"http://jira.codehaus.org/rest/api/2/issue/97499","fields":{"summary":"apache-source-release-assembly DOES NOT exclude target/** in maven-remote-resources-plugin build","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"165369600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-120/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15598","id":"15598","description":"","name":"2.0.0","archived":false,"released":true,"releaseDate":"2009-09-22"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/99512/comment/195191","id":"195191","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Fixed in [r8482|http://fisheye.codehaus.org/changelog/plexus/?cs=8482].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2009-10-18T14:12:10.199-0500","updated":"2009-10-18T14:12:10.199-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-121.json b/jira/PLXUTILS-121.json new file mode 100644 index 00000000..d093fa12 --- /dev/null +++ b/jira/PLXUTILS-121.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"100965","self":"http://jira.codehaus.org/rest/api/latest/issue/100965","key":"PLXUTILS-121","fields":{"progress":{"progress":0,"total":0},"summary":"AbstractScanner DEFAULT_EXCLUDES miss MKS pattern","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-121/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17364","id":"17364","description":"","name":"2.1","archived":false,"released":true,"releaseDate":"2011-06-09"}],"resolutiondate":"2011-05-16T14:04:23.794-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jbousque","name":"jbousque","emailAddress":"jeremie.bousquet@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jeremie BOUSQUET","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["jbousque(jbousque)","krosenvold(krosenvold)"],"customfield_10160":null,"updated":"2011-05-16T14:04:23.837-0500","created":"2009-11-16T08:24:50.070-0600","description":"Directory Scanner does not exclude by default files from SCM tool \"MKS\".\nThese files are named \"project.pj\" and located in every folder in workspace.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"115689600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-121/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"},{"self":"http://jira.codehaus.org/rest/api/2/version/15263","id":"15263","description":"","name":"1.5.8","archived":false,"released":true,"releaseDate":"2009-02-09"},{"self":"http://jira.codehaus.org/rest/api/2/version/15258","id":"15258","description":"","name":"1.5.9","archived":false,"released":true,"releaseDate":"2009-04-28"},{"self":"http://jira.codehaus.org/rest/api/2/version/15318","id":"15318","description":"","name":"1.5.10","archived":false,"released":true,"releaseDate":"2009-05-29"},{"self":"http://jira.codehaus.org/rest/api/2/version/15591","id":"15591","description":"","name":"1.5.11","archived":false,"released":true,"releaseDate":"2009-05-29"},{"self":"http://jira.codehaus.org/rest/api/2/version/15592","id":"15592","description":"","name":"1.5.12","archived":false,"released":true,"releaseDate":"2009-05-29"},{"self":"http://jira.codehaus.org/rest/api/2/version/15593","id":"15593","description":"","name":"1.5.13","archived":false,"released":true,"releaseDate":"2009-06-05"},{"self":"http://jira.codehaus.org/rest/api/2/version/15594","id":"15594","description":"","name":"1.5.14","archived":false,"released":true,"releaseDate":"2009-06-05"},{"self":"http://jira.codehaus.org/rest/api/2/version/15515","id":"15515","description":"","name":"1.5.15","archived":false,"released":true,"releaseDate":"2009-06-05"},{"self":"http://jira.codehaus.org/rest/api/2/version/15598","id":"15598","description":"","name":"2.0.0","archived":false,"released":true,"releaseDate":"2009-09-22"}],"customfield_10170":null,"environment":"N/A","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/100965/comment/267170","id":"267170","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Fixed in 3b455498e62f8bd72fa1f82b022b206de7c983e9","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2011-05-16T14:04:23.832-0500","updated":"2011-05-16T14:04:23.832-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-122.json b/jira/PLXUTILS-122.json new file mode 100644 index 00000000..70b5f4c0 --- /dev/null +++ b/jira/PLXUTILS-122.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"102870","self":"http://jira.codehaus.org/rest/api/latest/issue/102870","key":"PLXUTILS-122","fields":{"progress":{"progress":0,"total":0},"summary":"Extra Quotes in CommandLine arguments is causing failure to execute Maven-SCM in Linux","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-122/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T14:30:04.803-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=subirs","name":"subirs","emailAddress":"subir.sasikumar@wipro.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Subir S","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["michael-o(michael-o)","subirs(subirs)"],"customfield_10160":null,"updated":"2014-11-25T14:30:04.885-0600","created":"2009-12-17T03:21:37.606-0600","description":"While executing scm:update command in 'Linux', there is a single quote which appears in the start and end of the argument. This causes the already existing arguments to have wrong syntax.\n \nmvn scm:update -Dusername=user -Dpassword=pass -X shows the following output:\n \n[DEBUG] STDERR :\n[DEBUG] Synergy : Entering getWorkingProject method [DEBUG] Executing: /bin/sh -c ccm query -u -f %objectname {color:red} \n--> additonal start single quote '{color}\"owner='user' and status='working' and type='project' and has_predecessor('sm-3.3:project:inhytest#1')\"{color:red}'--> Additional end single quote{color}\n[DEBUG] Exit code :1\n[DEBUG] STDOUT : unavailable\n[DEBUG] STDERR :Warning: Syntax error in query request: \"owner=user and status=working and type=project and has_predecessor(sm-3.3:project:inhytest#1)\" {color:red} \n--> Note that now the single quotes after interpretation by the shell are removed.{color}\n\nThis works fine in 'Windows' platform.\n \nCorrect output should be: /bin/sh -c ccm query -u -f %objectname \"owner='user' and status='working' and type='project' and has_predecessor('sm-3.3:project:inhytest#1')\" {color:red} -->No single quotes, but double quotes and inner single quotes not modified then.{color}\n \nHow to get this working? I have seens some changes to plexus-utils on these quotes, but could not understand how to workaround this. Please help.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-122/watchers","watchCount":2,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":"http://jira.codehaus.org/browse/SCM-514","aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"customfield_10170":null,"environment":"Platform OS: RHEL 5\nJava: 1.6.0_17\nMaven: 2.1.0\nMaven SCM: 1.3-SNAPSHOT\nSCM: CM/Synergy 7.0","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/102870/comment/203774","id":"203774","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=subirs","name":"subirs","emailAddress":"subir.sasikumar@wipro.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Subir S","active":true},"body":"I have tried using 1.5.15 plexus-utils. \r\n\r\nIt now replaces double quotes with single quotes. Shell used in Bash.\r\n\r\nAre there any work arounds to make this like the argument is enclosed in double quotes irrespective of the shell in use??\r\n\r\nRelated issue in SCM is [SCM-514|http://jira.codehaus.org/browse/SCM-514]","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=subirs","name":"subirs","emailAddress":"subir.sasikumar@wipro.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Subir S","active":true},"created":"2009-12-22T00:39:21.006-0600","updated":"2009-12-22T00:39:21.006-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/102870/comment/357164","id":"357164","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:30:04.858-0600","updated":"2014-11-25T14:30:04.858-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-123.json b/jira/PLXUTILS-123.json new file mode 100644 index 00000000..8d9abfae --- /dev/null +++ b/jira/PLXUTILS-123.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"104675","self":"http://jira.codehaus.org/rest/api/latest/issue/104675","key":"PLXUTILS-123","fields":{"progress":{"progress":0,"total":0},"summary":"Shell uses doubleQuotedExecutableEscaped instead of doubleQuotedArgumentEscaped ","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-123/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/18702","id":"18702","name":"3.0.3","archived":false,"released":true,"releaseDate":"2012-08-01"}],"resolutiondate":"2012-09-15T05:46:14.188-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ndeloof","name":"ndeloof","emailAddress":"nicolas.deloof@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=ndeloof&avatarId=10411","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=ndeloof&avatarId=10411","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=ndeloof&avatarId=10411","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=ndeloof&avatarId=10411"},"displayName":"nicolas de loof","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["krosenvold(krosenvold)","ndeloof(ndeloof)"],"customfield_10160":null,"updated":"2012-09-15T05:46:14.230-0500","created":"2010-01-26T04:44:05.652-0600","description":"Shell defines properties to setup how executable and argument may be quote-escaped\n private boolean doubleQuotedArgumentEscaped = false;\n private boolean singleQuotedArgumentEscaped = false;\n private boolean doubleQuotedExecutableEscaped = false;\n private boolean singleQuotedExecutableEscaped = false;\n\nBut when arguments are processed (getRawCommandLine) the \"executable\" properties are used where \"argument\" ones should.\n\nAlso, setter beeing protected, there is no way to tweak a Shell for custom use","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/5","iconUrl":"http://jira.codehaus.org/images/icons/priorities/trivial.png","name":"Trivial","id":"5"},"duedate":null,"issuelinks":[{"id":"31578","self":"http://jira.codehaus.org/rest/api/2/issueLink/31578","type":{"id":"10000","name":"Duplicate","inward":"is duplicated by","outward":"duplicates","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10000"},"outwardIssue":{"id":"139308","key":"PLXUTILS-152","self":"http://jira.codehaus.org/rest/api/2/issue/139308","fields":{"summary":"Shell fails to escape quotes in arguments","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"25216","self":"http://jira.codehaus.org/rest/api/2/issueLink/25216","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"104674","key":"MGWT-161","self":"http://jira.codehaus.org/rest/api/2/issue/104674","fields":{"summary":"gwt-maven-plugin does not work with spaces in project location on Linux","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"156816000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-123/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-124.json b/jira/PLXUTILS-124.json new file mode 100644 index 00000000..647a3cd6 --- /dev/null +++ b/jira/PLXUTILS-124.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"106311","self":"http://jira.codehaus.org/rest/api/latest/issue/106311","key":"PLXUTILS-124","fields":{"progress":{"progress":0,"total":0},"summary":"CommandLine enviroment variables are broken ( bad encoding )","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-124/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16267","id":"16267","description":"","name":"2.0.2","archived":false,"released":true,"releaseDate":"2010-03-29"}],"resolutiondate":"2010-03-05T15:05:40.111-0600","customfield_10210":"3.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=msk","name":"msk","emailAddress":"msk.conf@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dusan Zatkovsky","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["msk(msk)","hboutemy(hboutemy)"],"customfield_10160":null,"updated":"2010-03-27T17:33:40.958-0500","created":"2010-03-03T07:19:51.600-0600","description":"\"CommandLine\" plexus-utils class on non-us windows xp uses wrong environment variables values.\n\nTo see this bug, you need to use non-us windows xp.\n\n( Maybe it should be possible to reproduce it on US windows by setting some environment variable value using non-us charracters [ I haven't tested this possibility ] ).\n\nTake a look at following code:\n\n Commandline commandLine = new Commandline();\n String plexus_appdata = commandLine.getSystemEnvVars().getProperty(\"APPDATA\");\n String real_appdata = System.getenv(\"APPDATA\");\n\n PrintWriter w = new PrintWriter(System.out);\n w.println(plexus_appdata);\n w.println(real_appdata);\n w.println(plexus_appdata.equals(real_appdata));\n\nCode is getting \"APPDATA\" environment variable from System and from CommandLine instance.\nReal value of this env.variable is \"C:\\Documents and Settings\\admin\\Data aplikací\".\n\nBut output of my code is:\nC:\\Documents and Settings\\admin\\Data aplikacˇ\nC:\\Documents and Settings\\admin\\Data aplikací\nfalse\n\nPlexus CommandLine class uses WRONG value ( seems to be encoding problem ).\nI have found this bug using maven exec plugin on czech windows xp ( see http://jira.codehaus.org/browse/MEXEC-75 ), but because nobody cares about it I have\nstarted investigating this problem deeper and found problem in CommandLine.\n\nIt is a reason of big troubles developing java apps on non-us windows, because there are different env.variables when developing app and in final release.\n\nI have attached example maven project with simple run.bat script which runs it.\nDo not use Netbeans or other IDE to run this code, because it (should) use maven-exec-plugin which uses this buggy class.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"25663","self":"http://jira.codehaus.org/rest/api/2/issueLink/25663","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"107575","key":"PLXUTILS-127","self":"http://jira.codehaus.org/rest/api/2/issue/107575","fields":{"summary":"Plexus utils fork an external process to get env var even when running jdk 1.5+","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}},{"id":"25483","self":"http://jira.codehaus.org/rest/api/2/issueLink/25483","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"105658","key":"MEXEC-75","self":"http://jira.codehaus.org/rest/api/2/issue/105658","fields":{"summary":"Strange encoding of environment variables when using exec plugin","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"25494","self":"http://jira.codehaus.org/rest/api/2/issueLink/25494","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"106450","key":"PLXUTILS-125","self":"http://jira.codehaus.org/rest/api/2/issue/106450","fields":{"summary":"use System.getenv() API for Java 5+ instead of CommandLineUtils.getSystemEnvVars() Java 1.4- workaround","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}}],"customfield_10163":"153446400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-124/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/47774","id":"47774","filename":"appdata.JPG","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=msk","name":"msk","emailAddress":"msk.conf@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dusan Zatkovsky","active":true},"created":"2010-03-04T03:06:28.244-0600","size":180917,"mimeType":"image/jpeg","content":"http://jira.codehaus.org/secure/attachment/47774/appdata.JPG","thumbnail":"http://jira.codehaus.org/secure/thumbnail/47774/_thumb_47774.png"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/47775","id":"47775","filename":"env.txt","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=msk","name":"msk","emailAddress":"msk.conf@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dusan Zatkovsky","active":true},"created":"2010-03-04T03:06:28.248-0600","size":1280,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/47775/env.txt"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/47759","id":"47759","filename":"plexusEnvVarBug.zip","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=msk","name":"msk","emailAddress":"msk.conf@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dusan Zatkovsky","active":true},"created":"2010-03-03T07:19:51.662-0600","size":3716,"mimeType":"application/x-sdlc","content":"http://jira.codehaus.org/secure/attachment/47759/plexusEnvVarBug.zip"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15598","id":"15598","description":"","name":"2.0.0","archived":false,"released":true,"releaseDate":"2009-09-22"}],"customfield_10170":null,"environment":"Windows XP Czech, Sun JDK 6","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":8,"total":8,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/106311/comment/212330","id":"212330","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"body":"strange\r\n\r\nsee CommandLineUtils.getSystemEnvVars( boolean ) in plexus-utils sources\r\n\r\nplease try and report results of following tests:\r\n- \"cmd.exe /c set\"\r\n- System.getProperty( \"file.encoding\" );\r\n- reader.getEncoding(); where reader = new InputStreamReader( p.getInputStream() )\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2010-03-03T15:33:57.414-0600","updated":"2010-03-03T15:33:57.414-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/106311/comment/212378","id":"212378","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=msk","name":"msk","emailAddress":"msk.conf@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dusan Zatkovsky","active":true},"body":"- \"cmd.exe /c set\"\r\n\r\nseems to be ok in console ( see appdata.jpg )\r\n\r\n- \"cmd.exe /c set > env.txt\"\r\n\r\nseems to be BAD ( see env.txt )\r\n\r\n\r\n- System.getProperty( \"file.encoding\" );\r\n\r\nCp1250\r\n\r\n- reader.getEncoding(); where reader = new InputStreamReader( p.getInputStream() )\r\n\r\nCp1250\r\n\r\n\r\nSo problem seems to be somewhere in windows pipes maybe ...\r\nHow to deal with it? Any idea?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=msk","name":"msk","emailAddress":"msk.conf@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dusan Zatkovsky","active":true},"created":"2010-03-04T03:06:01.688-0600","updated":"2010-03-04T03:06:01.688-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/106311/comment/212381","id":"212381","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=msk","name":"msk","emailAddress":"msk.conf@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dusan Zatkovsky","active":true},"body":"My collegue told me he have an idea.\r\n\r\nThe output of \"cmd /c set\" seems not to use cp1250, but:\r\n\r\nC:\\>chcp\r\nAktivní znaková stránka: 852\r\n( Active codepage : 852 )\r\n\r\nHe thing that solution is to use \"cmd /U /c set\" and read it as \"UTF-16LE\".\r\n\r\nOther way you could use is to call \"chcp\" and parse its output to get codepage of cmd, but this should cause later problems.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=msk","name":"msk","emailAddress":"msk.conf@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dusan Zatkovsky","active":true},"created":"2010-03-04T03:46:17.639-0600","updated":"2010-03-04T03:46:17.639-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/106311/comment/212762","id":"212762","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"body":"ok, I'm starting to understand: \"cmd.exe /c set\" outputs 0xA1 in [CP-852|http://en.wikipedia.org/wiki/Code_page_852], then java code reads this byte in [CP-1250|http://en.wikipedia.org/wiki/Windows-1250], which is another character\r\n\r\n\r\nFirst, I think that the best solution is to use System.getenv() API when using JDK 1.5+: actual CommandLineUtils.getSystemEnvVars( boolean ) implementation has been done because this API didn't exist before.\r\n\r\nThen for JDK 1.4-, yes, using \"cmd /U /c set\" and read the stream as UTF-16LE seems to be the solution","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2010-03-04T17:26:34.409-0600","updated":"2010-03-04T17:26:34.409-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/106311/comment/212803","id":"212803","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=msk","name":"msk","emailAddress":"msk.conf@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dusan Zatkovsky","active":true},"body":"Exactly. Will you fix this? Thanks.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=msk","name":"msk","emailAddress":"msk.conf@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dusan Zatkovsky","active":true},"created":"2010-03-05T02:37:40.450-0600","updated":"2010-03-05T02:37:40.450-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/106311/comment/212814","id":"212814","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"body":"code fixed in [r8656|http://fisheye.codehaus.org/changelog/plexus?cs=8656]\r\nI'll create another Jira issue later to use System.getenv() API when available instead of the old JDK 1.4- hack\r\n\r\ncan you try and confirm it is ok?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2010-03-05T04:27:55.517-0600","updated":"2010-03-05T04:27:55.517-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/106311/comment/212815","id":"212815","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=msk","name":"msk","emailAddress":"msk.conf@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dusan Zatkovsky","active":true},"body":"It seems to be fixed on Czech WinXP now :)\r\n\r\nI'll wait until new release will come an inform the author of exec maven plugin to use it asap.\r\n\r\nThanks for fast response, great job.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=msk","name":"msk","emailAddress":"msk.conf@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dusan Zatkovsky","active":true},"created":"2010-03-05T04:56:42.812-0600","updated":"2010-03-05T04:56:42.812-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/106311/comment/212867","id":"212867","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"body":"ok, thank you for your great report and help to fix the issue: such attitude helps a lot OSS projects, even more than direct code\r\n\r\nFYI, you can override dependency version of a plugin in your pom, so you don't need to wait for exec plugin release","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2010-03-05T15:05:40.150-0600","updated":"2010-03-05T15:05:40.150-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-125.json b/jira/PLXUTILS-125.json new file mode 100644 index 00000000..e30ff475 --- /dev/null +++ b/jira/PLXUTILS-125.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"106450","self":"http://jira.codehaus.org/rest/api/latest/issue/106450","key":"PLXUTILS-125","fields":{"progress":{"progress":0,"total":0},"summary":"use System.getenv() API for Java 5+ instead of CommandLineUtils.getSystemEnvVars() Java 1.4- workaround","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-125/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/3","id":"3","description":"The problem is a duplicate of an existing issue.","name":"Duplicate"},"fixVersions":[],"resolutiondate":"2010-03-27T17:33:59.660-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["hboutemy(hboutemy)"],"customfield_10160":null,"updated":"2010-03-27T17:33:59.681-0500","created":"2010-03-05T15:08:58.385-0600","description":"the new JDK API is simpler to use, more efficient (avoids executing a shell), and won't have bug like PLXUTILS-124","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"25662","self":"http://jira.codehaus.org/rest/api/2/issueLink/25662","type":{"id":"10000","name":"Duplicate","inward":"is duplicated by","outward":"duplicates","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10000"},"inwardIssue":{"id":"107575","key":"PLXUTILS-127","self":"http://jira.codehaus.org/rest/api/2/issue/107575","fields":{"summary":"Plexus utils fork an external process to get env var even when running jdk 1.5+","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}},{"id":"25494","self":"http://jira.codehaus.org/rest/api/2/issueLink/25494","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"outwardIssue":{"id":"106311","key":"PLXUTILS-124","self":"http://jira.codehaus.org/rest/api/2/issue/106311","fields":{"summary":"CommandLine enviroment variables are broken ( bad encoding )","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"153446400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-125/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15870","id":"15870","description":"","name":"2.0.1","archived":false,"released":true,"releaseDate":"2009-10-19"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-126.json b/jira/PLXUTILS-126.json new file mode 100644 index 00000000..5e974d83 --- /dev/null +++ b/jira/PLXUTILS-126.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"95873","self":"http://jira.codehaus.org/rest/api/latest/issue/95873","key":"PLXUTILS-126","fields":{"progress":{"progress":0,"total":0},"summary":"mvn help:evaluate does not return an entry in a LinkedHashMap, even though the item is present","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-126/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T14:49:15.396-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ccaraivan","name":"ccaraivan","emailAddress":"ccaraivan@axway.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Costin Caraivan","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["brettporter(brettporter)","ccaraivan(ccaraivan)","michael-o(michael-o)"],"customfield_10160":null,"updated":"2014-11-25T14:49:15.425-0600","created":"2009-08-13T09:35:53.088-0500","description":"[INFO] Enter the Maven expression i.e. ${project.groupId} or 0 to exit?:\n${project.build.pluginsAsMap}\n\n\n[Content erased for brevity]\n\n \n org.apache.maven.plugins:maven-help-plugin\n \n true\n org.apache.maven.plugins\n maven-help-plugin\n 2.1\n false\n \n \n org.apache.maven.plugins:maven-help-plugin\n \n \n\n\nBut:\n\n[INFO] Enter the Maven expression i.e. ${project.groupId} or 0 to exit?:\n${project.build.pluginsAsMap(org.apache.maven.plugins:maven-help-plugin)}\n[INFO]\nnull object or invalid expression\n\nAm I doing something wrong? I'm using the key, as described here: http://jira.codehaus.org/browse/PLXUTILS-37","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-126/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15870","id":"15870","description":"","name":"2.0.1","archived":false,"released":true,"releaseDate":"2009-10-19"}],"customfield_10170":null,"environment":"Windows XP SP3, Maven 2.1.0, Java 1.5","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/95873/comment/214755","id":"214755","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"body":"This is a bug in the implementation in PLXUTILS-37 - it doesn't support key's that contain '.' due to the way they are tokenized.\r\n\r\nAt first I thought this was a problem with Maven using the less-featured plexus-interpolation version, but it seems to be correct as it will work with a plugin test:test-mojo.\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"created":"2010-03-21T23:47:34.072-0500","updated":"2010-03-21T23:47:34.072-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/95873/comment/357742","id":"357742","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:49:15.422-0600","updated":"2014-11-25T14:49:15.422-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-127.json b/jira/PLXUTILS-127.json new file mode 100644 index 00000000..64a41bd0 --- /dev/null +++ b/jira/PLXUTILS-127.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"107575","self":"http://jira.codehaus.org/rest/api/latest/issue/107575","key":"PLXUTILS-127","fields":{"progress":{"progress":0,"total":0},"summary":"Plexus utils fork an external process to get env var even when running jdk 1.5+","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-127/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16267","id":"16267","description":"","name":"2.0.2","archived":false,"released":true,"releaseDate":"2010-03-29"}],"resolutiondate":"2010-03-27T17:31:01.178-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["olamy(olamy)"],"customfield_10160":null,"updated":"2010-03-27T17:33:40.953-0500","created":"2010-03-27T17:25:36.788-0500","description":"Currently p-u always forks an external process even when running on a 1.6 vm which has System.getenv().\nAnd forking a process is time and memory consuming.\nSo to preserve 1.4 we can use reflection to check if the method is available or not.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"25662","self":"http://jira.codehaus.org/rest/api/2/issueLink/25662","type":{"id":"10000","name":"Duplicate","inward":"is duplicated by","outward":"duplicates","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10000"},"outwardIssue":{"id":"106450","key":"PLXUTILS-125","self":"http://jira.codehaus.org/rest/api/2/issue/106450","fields":{"summary":"use System.getenv() API for Java 5+ instead of CommandLineUtils.getSystemEnvVars() Java 1.4- workaround","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}},{"id":"25663","self":"http://jira.codehaus.org/rest/api/2/issueLink/25663","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"106311","key":"PLXUTILS-124","self":"http://jira.codehaus.org/rest/api/2/issue/106311","fields":{"summary":"CommandLine enviroment variables are broken ( bad encoding )","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"151545600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-127/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/107575/comment/215678","id":"215678","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"fixed [rev 8665|http://fisheye.codehaus.org/changelog/plexus/?cs=8665]","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2010-03-27T17:31:01.191-0500","updated":"2010-03-27T17:31:01.191-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-128.json b/jira/PLXUTILS-128.json new file mode 100644 index 00000000..e157331d --- /dev/null +++ b/jira/PLXUTILS-128.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"107744","self":"http://jira.codehaus.org/rest/api/latest/issue/107744","key":"PLXUTILS-128","fields":{"progress":{"progress":0,"total":0},"summary":"Extend ReaderFactory to allow for creation of readers that do strict validation of encoding","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-128/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)"],"customfield_10160":null,"updated":"2010-03-31T07:19:19.136-0500","created":"2010-03-31T07:18:45.378-0500","description":"Right now, the XML/input readers simply ignore byte sequences that don't match the specified file encoding. There should be a strict mode that ensure errors like reported in MNG-2187 show up in all cases such that the user gets immediately aware of the issue and can fix the file.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"151286400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-128/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16267","id":"16267","description":"","name":"2.0.2","archived":false,"released":true,"releaseDate":"2010-03-29"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-129.json b/jira/PLXUTILS-129.json new file mode 100644 index 00000000..4a20c97e --- /dev/null +++ b/jira/PLXUTILS-129.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"107983","self":"http://jira.codehaus.org/rest/api/latest/issue/107983","key":"PLXUTILS-129","fields":{"progress":{"progress":0,"total":0},"summary":"Xpp3Dom.merge() produces wrong result upon merging two equal input DOMs","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-129/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16325","id":"16325","description":"","name":"2.0.3","archived":false,"released":true,"releaseDate":"2010-04-06"}],"resolutiondate":"2010-04-06T15:06:35.927-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)"],"customfield_10160":null,"updated":"2010-04-06T15:06:35.998-0500","created":"2010-04-06T15:03:10.027-0500","description":"Merging the DOM\n{code:xml}\n\n \n test\n \n\n{code}\nwith itself yields\n{code:xml}\n\n \n test\n test\n\n{code}\ninstead of just the unchanged input.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"25745","self":"http://jira.codehaus.org/rest/api/2/issueLink/25745","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"81122","key":"MNG-4022","self":"http://jira.codehaus.org/rest/api/2/issue/81122","fields":{"summary":"Incorrect merge behavior using profile driven plugin configuration","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"150681600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-129/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16267","id":"16267","description":"","name":"2.0.2","archived":false,"released":true,"releaseDate":"2010-03-29"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/107983/comment/216892","id":"216892","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Fixed in [r8680|http://fisheye.codehaus.org/changelog/plexus/?cs=8680].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2010-04-06T15:06:35.995-0500","updated":"2010-04-06T15:06:35.995-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-13.json b/jira/PLXUTILS-13.json new file mode 100644 index 00000000..4990eb1f --- /dev/null +++ b/jira/PLXUTILS-13.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"35684","self":"http://jira.codehaus.org/rest/api/latest/issue/35684","key":"PLXUTILS-13","fields":{"progress":{"progress":0,"total":0},"summary":"FileUtils does not support encodings","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-13/votes","votes":2,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14042","id":"14042","description":"","name":"1.4.2","archived":false,"released":true,"releaseDate":"2007-05-20"}],"resolutiondate":"2007-05-01T19:31:11.522-0500","customfield_10210":"2.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nekop","name":"nekop","emailAddress":"nekop@jajakarta.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Takayoshi Kimura","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["carlos(carlos)","jochenw(jochenw)","nekop(nekop)"],"customfield_10160":null,"updated":"2008-02-02T15:37:41.456-0600","created":"2006-04-05T21:13:33.275-0500","description":"FileUtils uses String#getBytes, new String(bytes), FileReader and FileWriter with no encoding parameter. We cannot make encoding aware code with this class.\n\nFileUtils#fileRead() method contains a bug. This method cannot handle multi-byte characters properly.\n\nAttached patch is against trunk/plexus-utils.\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"243216000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-13/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/19996","id":"19996","filename":"FileUtils.java.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nekop","name":"nekop","emailAddress":"nekop@jajakarta.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Takayoshi Kimura","active":true},"created":"2006-04-05T21:13:33.373-0500","size":3955,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/19996/FileUtils.java.patch"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/19998","id":"19998","filename":"fixed-FileUtils.java.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nekop","name":"nekop","emailAddress":"nekop@jajakarta.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Takayoshi Kimura","active":true},"created":"2006-04-06T02:00:38.917-0500","size":9734,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/19998/fixed-FileUtils.java.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":3,"total":3,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/35684/comment/62944","id":"62944","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"body":"Thanks for the patch, but I can't apply it without unit tests. If you could provide them it'd be great, if not it will have to wait until somebody has the time to do it.\r\nAfter a first overview I already see a bug\r\n\r\n if ( encoding != null )\r\n {\r\n reader =\r\n new InputStreamReader(\r\n new FileInputStream( file ));\r\n }\r\n else\r\n {\r\n reader =\r\n new InputStreamReader(\r\n new FileInputStream( file ), encoding ); //encoding is null\r\n }\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"created":"2006-04-05T22:10:54.605-0500","updated":"2006-04-05T22:10:54.605-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/35684/comment/62956","id":"62956","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nekop","name":"nekop","emailAddress":"nekop@jajakarta.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Takayoshi Kimura","active":true},"body":"Sorry for bug in the patch. I have uploaded my old version :-(\r\n\r\nAttached patch is fixed the bug, with complete testcases.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nekop","name":"nekop","emailAddress":"nekop@jajakarta.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Takayoshi Kimura","active":true},"created":"2006-04-06T02:00:38.960-0500","updated":"2006-04-06T02:00:38.960-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/35684/comment/94735","id":"94735","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jochenw","name":"jochenw","emailAddress":"jochen.wiedmann@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jochen Wiedmann","active":true},"body":"Applied, with minor changes. (Formatting, added an ISO-8859-1 character, code simplifications)\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jochenw","name":"jochenw","emailAddress":"jochen.wiedmann@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jochen Wiedmann","active":true},"created":"2007-05-01T19:31:11.516-0500","updated":"2007-05-01T19:31:11.516-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-130.json b/jira/PLXUTILS-130.json new file mode 100644 index 00000000..bd23415a --- /dev/null +++ b/jira/PLXUTILS-130.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"108632","self":"http://jira.codehaus.org/rest/api/latest/issue/108632","key":"PLXUTILS-130","fields":{"progress":{"progress":0,"total":0},"summary":"executeCommandLine can deadlock","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-130/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16348","id":"16348","description":"","name":"2.0.4","archived":false,"released":true,"releaseDate":"2010-04-22"}],"resolutiondate":"2010-04-20T13:39:21.205-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","krosenvold(krosenvold)"],"customfield_10160":null,"updated":"2010-08-09T10:51:44.137-0500","created":"2010-04-20T13:26:38.553-0500","description":"As part of locating concurrency issue in plexus-io, this unsafe publication issue was discovered. Although it has not been specifically observed, there is little doubt that this memory model violation can (and will) result in deadlocks/hangs every now and then, especially on 64 jvms and servers.\r\n \r\nI also reviewed the rest of plexus-utils for similar iussues and believe this patch covers all threading issues.\r\n\r\nThe supplied patch also updates the javadoc on executeCommandLine to indicate the required thread-safe constraint in client-supplied objects.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"25932","self":"http://jira.codehaus.org/rest/api/2/issueLink/25932","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"108924","key":"MSHARED-148","self":"http://jira.codehaus.org/rest/api/2/issue/108924","fields":{"summary":"Avoid possible corruption issues and deadlocks by upgrading plexus components","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"26813","self":"http://jira.codehaus.org/rest/api/2/issueLink/26813","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"113578","key":"SUREFIRE-633","self":"http://jira.codehaus.org/rest/api/2/issue/113578","fields":{"summary":"Upgrade plexus-utils to avoid potential deadlocks in versions prior to 2.0.5","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"25963","self":"http://jira.codehaus.org/rest/api/2/issueLink/25963","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"109088","key":"MINVOKER-103","self":"http://jira.codehaus.org/rest/api/2/issue/109088","fields":{"summary":"Update to plexus-utils:2.0.4+ to eliminate deadlock potential during forked Maven executions","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/5","iconUrl":"http://jira.codehaus.org/images/icons/priorities/trivial.png","name":"Trivial","id":"5"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false}}}}],"customfield_10163":"145670400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-130/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/48601","id":"48601","filename":"plexus-util.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2010-04-20T13:26:39.134-0500","size":2906,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/48601/plexus-util.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16325","id":"16325","description":"","name":"2.0.3","archived":false,"released":true,"releaseDate":"2010-04-06"}],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/108632/comment/218376","id":"218376","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Applied in [r8695|http://fisheye.codehaus.org/changelog/plexus/?cs=8695], thanks!","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2010-04-20T13:39:21.235-0500","updated":"2010-04-20T13:39:21.235-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/108632/comment/223980","id":"223980","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"For future reference: the issue applies to all the executeCommandLine overloads and has been verified to happen \"in the wild\".","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2010-06-03T15:31:41.410-0500","updated":"2010-06-03T15:31:41.410-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-131.json b/jira/PLXUTILS-131.json new file mode 100644 index 00000000..c4a5c486 --- /dev/null +++ b/jira/PLXUTILS-131.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"108818","self":"http://jira.codehaus.org/rest/api/latest/issue/108818","key":"PLXUTILS-131","fields":{"progress":{"progress":0,"total":0},"summary":"Improper exception handling in executeCommandLine","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-131/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16410","id":"16410","description":"","name":"2.0.5","archived":false,"released":true,"releaseDate":"2010-04-25"}],"resolutiondate":"2010-04-24T07:11:54.223-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","krosenvold(krosenvold)"],"customfield_10160":null,"updated":"2011-03-04T00:42:32.531-0600","created":"2010-04-23T16:03:04.652-0500","description":"If the StreamConsumer throws an exception, it is swallowed quietly. ","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"28365","self":"http://jira.codehaus.org/rest/api/2/issueLink/28365","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"122630","key":"PLXUTILS-138","self":"http://jira.codehaus.org/rest/api/2/issue/122630","fields":{"summary":"executeCommandLine with timeout leaves StreamPumpers pumping data to client after method is returned","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"26902","self":"http://jira.codehaus.org/rest/api/2/issueLink/26902","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"114031","key":"SUREFIRE-640","self":"http://jira.codehaus.org/rest/api/2/issue/114031","fields":{"summary":"org.apache.maven.surefire.booter.shade.org.codehaus.plexus.util.cli.CommandLineException: Error inside systemErr parser","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"25933","self":"http://jira.codehaus.org/rest/api/2/issueLink/25933","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"108924","key":"MSHARED-148","self":"http://jira.codehaus.org/rest/api/2/issue/108924","fields":{"summary":"Avoid possible corruption issues and deadlocks by upgrading plexus components","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"27738","self":"http://jira.codehaus.org/rest/api/2/issueLink/27738","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"119168","key":"SUREFIRE-665","self":"http://jira.codehaus.org/rest/api/2/issue/119168","fields":{"summary":"Output to file stops after a while","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"149212800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-131/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/48660","id":"48660","filename":"dontSwallowException.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2010-04-23T16:03:04.937-0500","size":4172,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/48660/dontSwallowException.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16348","id":"16348","description":"","name":"2.0.4","archived":false,"released":true,"releaseDate":"2010-04-22"}],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/108818/comment/218829","id":"218829","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Applied in [r8699|http://fisheye.codehaus.org/changelog/plexus/?cs=8699], thanks!","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2010-04-24T07:11:54.282-0500","updated":"2010-04-24T07:11:54.282-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-132.json b/jira/PLXUTILS-132.json new file mode 100644 index 00000000..ca54dd62 --- /dev/null +++ b/jira/PLXUTILS-132.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"108979","self":"http://jira.codehaus.org/rest/api/latest/issue/108979","key":"PLXUTILS-132","fields":{"progress":{"progress":0,"total":0},"summary":"XmlPullParserException to use generic getCause() method for access to detail exception","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-132/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16412","id":"16412","description":"","name":"2.0.6","archived":false,"released":true,"releaseDate":"2011-02-09"}],"resolutiondate":"2010-04-28T06:57:34.801-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mkleint","name":"mkleint","emailAddress":"mkleint@codehaus.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Milos Kleint","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["mkleint(mkleint)"],"customfield_10160":null,"updated":"2010-04-28T06:57:34.823-0500","created":"2010-04-28T06:51:37.730-0500","description":"XmlPullParserException to use generic getCause() method for access to detail exception. solution is to use the Exception(string, Throwable) parameter available since 1.4 jdk. \r\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"148867200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-132/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mkleint","name":"mkleint","emailAddress":"mkleint@codehaus.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Milos Kleint","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/108979/comment/219232","id":"219232","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mkleint","name":"mkleint","emailAddress":"mkleint@codehaus.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Milos Kleint","active":true},"body":"revision 8722.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mkleint","name":"mkleint","emailAddress":"mkleint@codehaus.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Milos Kleint","active":true},"created":"2010-04-28T06:57:34.820-0500","updated":"2010-04-28T06:57:34.820-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-133.json b/jira/PLXUTILS-133.json new file mode 100644 index 00000000..bd228ea2 --- /dev/null +++ b/jira/PLXUTILS-133.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"115123","self":"http://jira.codehaus.org/rest/api/latest/issue/115123","key":"PLXUTILS-133","fields":{"progress":{"progress":0,"total":0},"summary":"add FileUtils.fileWrite(File) API to existing fileWrite(String)","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-133/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16412","id":"16412","description":"","name":"2.0.6","archived":false,"released":true,"releaseDate":"2011-02-09"}],"resolutiondate":"2010-09-14T23:02:35.763-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["hboutemy(hboutemy)"],"customfield_10160":null,"updated":"2010-09-14T23:02:35.894-0500","created":"2010-09-14T23:01:20.978-0500","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"136771200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-133/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16410","id":"16410","description":"","name":"2.0.5","archived":false,"released":true,"releaseDate":"2010-04-25"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/115123/comment/235292","id":"235292","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"body":"done in r8746","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2010-09-14T23:02:35.892-0500","updated":"2010-09-14T23:02:35.892-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-134.json b/jira/PLXUTILS-134.json new file mode 100644 index 00000000..fb65df21 --- /dev/null +++ b/jira/PLXUTILS-134.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"116065","self":"http://jira.codehaus.org/rest/api/latest/issue/116065","key":"PLXUTILS-134","fields":{"progress":{"progress":0,"total":0},"summary":"Incorrect Xpp3Dom.mergeXpp3Dom","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-134/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/6","id":"6","description":"The issue is not a bug","name":"Not A Bug"},"fixVersions":[],"resolutiondate":"2010-10-06T14:23:32.089-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["olamy(olamy)"],"customfield_10160":null,"updated":"2010-10-06T14:23:32.122-0500","created":"2010-10-06T12:44:26.774-0500","description":"target dominant \r\n{code:xml}\r\n\r\n \r\n \r\n org.apache.maven.plugins\r\n maven-jxr-plugin\r\n 2.1\r\n \r\n \r\n org.apache.maven.plugins\r\n maven-javadoc-plugin\r\n 2.6.1\r\n \r\n ${basedir}/src/main/javadoc/stylesheet.css\r\n \r\n \r\n \r\n \r\n javadoc\r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}\r\nsource recessive \r\n{code:xml}\r\n\r\n \r\n \r\n org.apache.maven.plugins\r\n maven-project-info-reports-plugin\r\n 2.2\r\n \r\n false\r\n \r\n \r\n \r\n \r\n summary\r\n index\r\n cim\r\n issue-tracking\r\n scm\r\n \r\n \r\n \r\n \r\n \r\n org.apache.maven.plugins\r\n maven-javadoc-plugin\r\n 2.6.1\r\n \r\n \r\n \r\n javadoc\r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nResult \r\n{code:xml}\r\n\r\n \r\n \r\n org.apache.maven.plugins\r\n maven-jxr-plugin\r\n 2.1\r\n \r\n false\r\n \r\n \r\n \r\n \r\n summary\r\n index\r\n cim\r\n issue-tracking\r\n scm\r\n \r\n \r\n \r\n \r\n \r\n org.apache.maven.plugins\r\n maven-javadoc-plugin\r\n 2.6.1\r\n \r\n ${basedir}/src/main/javadoc/stylesheet.css\r\n \r\n \r\n \r\n \r\n javadoc\r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"27246","self":"http://jira.codehaus.org/rest/api/2/issueLink/27246","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"116056","key":"MNG-4856","self":"http://jira.codehaus.org/rest/api/2/issue/116056","fields":{"summary":"DefaultReportingConverter create incorrect site plugin configuration","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"134870400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-134/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16410","id":"16410","description":"","name":"2.0.5","archived":false,"released":true,"releaseDate":"2010-04-25"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/116065/comment/237708","id":"237708","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"my bad so Xpp3dom can do nothing here to \"merge\" models.\r\nI will write documentation for users to use combine.children=\"append\"","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2010-10-06T14:23:32.108-0500","updated":"2010-10-06T14:23:32.108-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-135.json b/jira/PLXUTILS-135.json new file mode 100644 index 00000000..d9ba44bc --- /dev/null +++ b/jira/PLXUTILS-135.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"117178","self":"http://jira.codehaus.org/rest/api/latest/issue/117178","key":"PLXUTILS-135","fields":{"progress":{"progress":0,"total":0},"summary":"Apache 1.1 license is still used in some files","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-135/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T14:49:03.039-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ludovicc","name":"ludovicc","emailAddress":"ludovic.claude@laposte.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Ludovic Claude","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["ludovicc(ludovicc)","michael-o(michael-o)"],"customfield_10160":null,"updated":"2014-11-25T14:49:03.078-0600","created":"2010-10-29T16:36:33.130-0500","description":"While packaging plexus-utils for Debian, I found that some files still have an Apache 1.1 license. Is it possible to re-license them to Apache 2.0?\r\n\r\n./src/main/java/org/codehaus/plexus/util/SelectorUtils.java: * The Apache Software License, Version 1.1\r\n./src/main/java/org/codehaus/plexus/util/IOUtil.java: * The Apache Software License, Version 1.1\r\n./src/main/java/org/codehaus/plexus/util/DirectoryScanner.java: * The Apache Software License, Version 1.1\r\n./src/main/java/org/codehaus/plexus/util/InterpolationFilterReader.java: * The Apache Software License, Version 1.1\r\n./src/main/java/org/codehaus/plexus/util/StringInputStream.java: * The Apache Software License, Version 1.1\r\n./src/main/java/org/codehaus/plexus/util/StringUtils.java: * The Apache Software License, Version 1.1\r\n./src/main/java/org/codehaus/plexus/util/FileUtils.java: * The Apache Software License, Version 1.1\r\n./src/main/java/org/codehaus/plexus/util/Expand.java: * The Apache Software License, Version 1.1\r\n./src/main/java/org/codehaus/plexus/util/Os.java: * The Apache Software License, Version 1.1\r\n./src/main/java/org/codehaus/plexus/util/ExceptionUtils.java: * The Apache Software License, Version 1.1\r\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/5","iconUrl":"http://jira.codehaus.org/images/icons/priorities/trivial.png","name":"Trivial","id":"5"},"duedate":null,"issuelinks":[],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-135/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16410","id":"16410","description":"","name":"2.0.5","archived":false,"released":true,"releaseDate":"2010-04-25"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/117178/comment/357704","id":"357704","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:49:03.075-0600","updated":"2014-11-25T14:49:03.075-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-136.json b/jira/PLXUTILS-136.json new file mode 100644 index 00000000..fed22b1c --- /dev/null +++ b/jira/PLXUTILS-136.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"121654","self":"http://jira.codehaus.org/rest/api/latest/issue/121654","key":"PLXUTILS-136","fields":{"progress":{"progress":0,"total":0},"summary":"Make Xpp3Dom serializable","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-136/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16412","id":"16412","description":"","name":"2.0.6","archived":false,"released":true,"releaseDate":"2011-02-09"}],"resolutiondate":"2011-02-09T12:49:34.987-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","igorfie(igorfie)"],"customfield_10160":null,"updated":"2011-02-09T12:49:35.017-0600","created":"2011-02-09T12:48:58.013-0600","description":"It would be useful if {{Xpp3Dom}} would be serializable, say just like the rest of Modello generated model classes.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/5","iconUrl":"http://jira.codehaus.org/images/icons/priorities/trivial.png","name":"Trivial","id":"5"},"duedate":null,"issuelinks":[],"customfield_10163":"123984000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-136/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16410","id":"16410","description":"","name":"2.0.5","archived":false,"released":true,"releaseDate":"2010-04-25"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/121654/comment/255477","id":"255477","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Done in [4a944bf134b9a6dbab78509352b3968f39ddbcd4|https://github.com/sonatype/plexus-utils/commit/4a944bf134b9a6dbab78509352b3968f39ddbcd4].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2011-02-09T12:49:35.014-0600","updated":"2011-02-09T12:49:35.014-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-137.json b/jira/PLXUTILS-137.json new file mode 100644 index 00000000..add540e9 --- /dev/null +++ b/jira/PLXUTILS-137.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"121939","self":"http://jira.codehaus.org/rest/api/latest/issue/121939","key":"PLXUTILS-137","fields":{"progress":{"progress":0,"total":0},"summary":"FileUtils.catPath doesn't work on Windows.","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-137/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T14:47:55.712-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=sjerman","name":"sjerman","emailAddress":"stjerman@cisco.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Steve Jerman","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["michael-o(michael-o)","sjerman(sjerman)"],"customfield_10160":null,"updated":"2014-11-25T14:47:55.772-0600","created":"2011-02-15T15:35:48.449-0600","description":"It's hardcoded to assume \"/\" as the file separator .. works on Mac/Linux.... not Windows:\r\n\r\nCaused by: java.lang.StringIndexOutOfBoundsException: String index out of range:\r\n -1\r\n at java.lang.String.substring(String.java:1937)\r\n at org.codehaus.plexus.util.FileUtils.catPath(FileUtils.java:1198)\r\n at org.eclipse.tigerstripe.maven.generation.TigerstripeGenerationMojo.ex\r\necRuntime(TigerstripeGenerationMojo.java:297)\r\n ... 22 more","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-137/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/121939/comment/357495","id":"357495","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:47:55.754-0600","updated":"2014-11-25T14:47:55.754-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-138.json b/jira/PLXUTILS-138.json new file mode 100644 index 00000000..86f6cef4 --- /dev/null +++ b/jira/PLXUTILS-138.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"122630","self":"http://jira.codehaus.org/rest/api/latest/issue/122630","key":"PLXUTILS-138","fields":{"progress":{"progress":0,"total":0},"summary":"executeCommandLine with timeout leaves StreamPumpers pumping data to client after method is returned","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-138/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17149","id":"17149","description":"","name":"2.0.7","archived":false,"released":true,"releaseDate":"2011-03-03"}],"resolutiondate":"2011-03-02T16:25:34.658-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["krosenvold(krosenvold)"],"customfield_10160":null,"updated":"2011-03-04T00:43:50.447-0600","created":"2011-03-02T16:22:39.679-0600","description":"When the interruptedexception is throw due to process timeout, the StreamPumper is not terminated or disabled in any way. This means the pumper can continue feeding data to the client even after executeCommandLine has returened. This is not a good idea and the caus of SUREFIRE-690","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[{"id":"28365","self":"http://jira.codehaus.org/rest/api/2/issueLink/28365","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"108818","key":"PLXUTILS-131","self":"http://jira.codehaus.org/rest/api/2/issue/108818","fields":{"summary":"Improper exception handling in executeCommandLine","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"28362","self":"http://jira.codehaus.org/rest/api/2/issueLink/28362","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"120984","key":"SUREFIRE-690","self":"http://jira.codehaus.org/rest/api/2/issue/120984","fields":{"summary":"testSetCompleted called before testSetStarting when using m3 parallel builds","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"28363","self":"http://jira.codehaus.org/rest/api/2/issueLink/28363","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"122517","key":"SUREFIRE-707","self":"http://jira.codehaus.org/rest/api/2/issue/122517","fields":{"summary":"NullPointerException in ConcurrentReporterManager on testSkipped (@Ignore on test class)","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"28361","self":"http://jira.codehaus.org/rest/api/2/issueLink/28361","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"122616","key":"SUREFIRE-710","self":"http://jira.codehaus.org/rest/api/2/issue/122616","fields":{"summary":"ConcurrentModificationException in ConcurrentReporterManager","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"122083200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-138/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16412","id":"16412","description":"","name":"2.0.6","archived":false,"released":true,"releaseDate":"2011-02-09"}],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/122630/comment/258259","id":"258259","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Fixed in 401347173783947805458893210afb3d37ade0ae","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2011-03-02T16:25:34.746-0600","updated":"2011-03-02T16:27:55.713-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/122630/comment/258484","id":"258484","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"The root cause of this \"trouble\" is the removal of the empty catch block in PLXUTILS-131, which turned out to be painful but important.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2011-03-04T00:42:32.778-0600","updated":"2011-03-04T00:43:50.435-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-139.json b/jira/PLXUTILS-139.json new file mode 100644 index 00000000..bf39eb84 --- /dev/null +++ b/jira/PLXUTILS-139.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"125181","self":"http://jira.codehaus.org/rest/api/latest/issue/125181","key":"PLXUTILS-139","fields":{"progress":{"progress":0,"total":0},"summary":"FileUtils.copyFile() ignores 'overwrite' when 'wrappers' (FilterWrappers[]) is non-empty","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-139/votes","votes":2,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T14:48:49.681-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=rupigill","name":"rupigill","emailAddress":"rupigill@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Rupinder S. Gill","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["michael-o(michael-o)","rupigill(rupigill)"],"customfield_10160":null,"updated":"2014-12-16T05:55:33.154-0600","created":"2011-05-06T12:19:57.644-0500","description":"maven-resource-plugin is copying a resource even if it is unchanged and 'overwrite' is false. See http://stackoverflow.com/questions/3970157/is-there-a-way-to-force-maven-to-copy-resource-folder-changes-incrementally/5914467#5914467\r\n\r\nI chased the problem down to org.codehaus.plexus.util.FileUtils.copyFile() method. It is this method that is called by the maven-resource-plugin to ultimately copy the resource; the copyFile() method takes an 'overwrite' parameter, which the resource-plugin does pass in (and the default is indeed false), BUT...\r\n\r\nThe copyFile() method ignores the 'overwrite' parameter if the list of filter-wrappers passed is non-empty! And if you have filtering set to true for your resources, this list is indeed non-empty.\r\n\r\nI can understand the reasoning behind copyFile() ignoring the 'overwrite': just because the destination file is newer does not mean that new filtered-file will be the same (i.e. the values for the variables in your resource file may have been changed since the last filtering). \r\nIgnoring the 'overwrite' flag is \"convenient\" for the FileUtils implementor. But this comes at a great price; a single resource file unnecessarily updated can trigger off time-consuming but redundant processes (i.e. rebuilding a jar-with-dependencies in my case). This may only be a few seconds but can be enough to disrupt the flow of an intensive code-compile-test cycle.\r\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"36320","self":"http://jira.codehaus.org/rest/api/2/issueLink/36320","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"158513","key":"PLXUTILS-173","self":"http://jira.codehaus.org/rest/api/2/issue/158513","fields":{"summary":"CLONE - FileUtils.copyFile() ignores 'overwrite' when 'wrappers' (FilterWrappers[]) is non-empty","status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-139/watchers","watchCount":3,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17149","id":"17149","description":"","name":"2.0.7","archived":false,"released":true,"releaseDate":"2011-03-03"}],"customfield_10170":null,"environment":"Windows","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/125181/comment/357671","id":"357671","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:48:49.716-0600","updated":"2014-11-25T14:48:49.716-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-14.json b/jira/PLXUTILS-14.json new file mode 100644 index 00000000..32577215 --- /dev/null +++ b/jira/PLXUTILS-14.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"34123","self":"http://jira.codehaus.org/rest/api/latest/issue/34123","key":"PLXUTILS-14","fields":{"progress":{"progress":0,"total":0},"summary":"Xpp3Dom allows null attribute name or value, failing later in toString","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-14/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14038","id":"14038","description":"","name":"1.2","archived":false,"released":true,"releaseDate":"2006-04-19"}],"resolutiondate":"2006-02-22T18:00:30.824-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["carlos(carlos)"],"customfield_10160":null,"updated":"2008-02-02T15:58:30.855-0600","created":"2006-02-22T17:45:12.169-0600","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"13640","self":"http://jira.codehaus.org/rest/api/2/issueLink/13640","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"34131","key":"SUREFIRE-32","self":"http://jira.codehaus.org/rest/api/2/issue/34131","fields":{"summary":"When a system property value is null, resulting xml reports are cropped","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"280627200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-14/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/34123/comment/59263","id":"59263","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"body":"java.lang.NullPointerException\r\n\tat java.io.PrintWriter.write(PrintWriter.java:401)\r\n\tat org.codehaus.plexus.util.xml.PrettyPrintXMLWriter.write(PrettyPrintXMLWriter.java:180)\r\n\tat org.codehaus.plexus.util.xml.PrettyPrintXMLWriter.addAttribute(PrettyPrintXMLWriter.java:145)\r\n\tat org.codehaus.plexus.util.xml.Xpp3DomWriter.write(Xpp3DomWriter.java:31)\r\n\tat org.codehaus.plexus.util.xml.Xpp3DomWriter.write(Xpp3DomWriter.java:20)\r\n\tat org.codehaus.plexus.util.xml.Xpp3Dom.toString(Xpp3Dom.java:460)\r\n\tat org.codehaus.plexus.util.xml.Xpp3DomTest.testNullAttributeNameOrValue(Xpp3DomTest.java:139)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat java.lang.reflect.Method.invoke(Method.java:585)\r\n\tat junit.framework.TestCase.runTest(TestCase.java:154)\r\n\tat junit.framework.TestCase.runBare(TestCase.java:127)\r\n\tat junit.framework.TestResult$1.protect(TestResult.java:106)\r\n\tat junit.framework.TestResult.runProtected(TestResult.java:124)\r\n\tat junit.framework.TestResult.run(TestResult.java:109)\r\n\tat junit.framework.TestCase.run(TestCase.java:118)\r\n\tat junit.framework.TestSuite.runTest(TestSuite.java:208)\r\n\tat junit.framework.TestSuite.run(TestSuite.java:203)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)\r\n\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"created":"2006-02-22T17:52:44.958-0600","updated":"2006-02-22T17:52:44.958-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-140.json b/jira/PLXUTILS-140.json new file mode 100644 index 00000000..e7b3f417 --- /dev/null +++ b/jira/PLXUTILS-140.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"128148","self":"http://jira.codehaus.org/rest/api/latest/issue/128148","key":"PLXUTILS-140","fields":{"progress":{"progress":0,"total":0},"summary":"default excludes of scanner should include .gitignore and .gitattributes","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-140/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17517","id":"17517","description":"","name":"3.0.1","archived":false,"released":true,"releaseDate":"2012-04-03"}],"resolutiondate":"2011-08-05T14:54:55.695-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)"],"customfield_10160":null,"updated":"2011-08-05T14:54:55.742-0500","created":"2011-08-05T14:49:47.576-0500","description":"{{.gitattributes}} and {{.gitignore}} are two more entirely Git-related metadata files that should be ignored when scanning directories.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/5","iconUrl":"http://jira.codehaus.org/images/icons/priorities/trivial.png","name":"Trivial","id":"5"},"duedate":null,"issuelinks":[],"customfield_10163":"108691200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-140/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17516","id":"17516","description":"","name":"3.0","archived":false,"released":true,"releaseDate":"2011-06-23"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/128148/comment/275123","id":"275123","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Added in [dc2af9ae0dd58b8be58bee29cd52d7a75ccab047|https://github.com/sonatype/plexus-utils/commit/dc2af9ae0dd58b8be58bee29cd52d7a75ccab047].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2011-08-05T14:54:55.738-0500","updated":"2011-08-05T14:54:55.738-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-141.json b/jira/PLXUTILS-141.json new file mode 100644 index 00000000..3d686417 --- /dev/null +++ b/jira/PLXUTILS-141.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"128167","self":"http://jira.codehaus.org/rest/api/latest/issue/128167","key":"PLXUTILS-141","fields":{"progress":{"progress":0,"total":0},"summary":"More and better? Javadoc","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-141/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17517","id":"17517","description":"","name":"3.0.1","archived":false,"released":true,"releaseDate":"2012-04-03"}],"resolutiondate":"2011-08-07T08:08:08.564-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mwood","name":"mwood","emailAddress":"mwood@IUPUI.Edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Mark Wood","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","mwood(mwood)"],"customfield_10160":null,"updated":"2011-08-07T08:08:08.629-0500","created":"2011-08-06T21:38:33.814-0500","description":"Having found some classes that looked like what I needed, I sought the Javadoc and was not enlightened. Since I wound up studying the code, I wrote down the understanding gained.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"108604800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-141/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/56288","id":"56288","filename":"plexus-common-utilities.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mwood","name":"mwood","emailAddress":"mwood@IUPUI.Edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Mark Wood","active":true},"created":"2011-08-06T21:38:35.781-0500","size":10986,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/56288/plexus-common-utilities.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/128167/comment/275204","id":"275204","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Applied in [808551a59694bab5739d4934b5eb7a1d8d839336|https://github.com/sonatype/plexus-utils/commit/808551a59694bab5739d4934b5eb7a1d8d839336], thanks.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2011-08-07T08:08:08.601-0500","updated":"2011-08-07T08:08:08.601-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-142.json b/jira/PLXUTILS-142.json new file mode 100644 index 00000000..579462a2 --- /dev/null +++ b/jira/PLXUTILS-142.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"128534","self":"http://jira.codehaus.org/rest/api/latest/issue/128534","key":"PLXUTILS-142","fields":{"progress":{"progress":0,"total":0},"summary":"rollback the removal of ASF copyrights","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-142/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T14:49:21.256-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=struberg","name":"struberg","emailAddress":"struberg@yahoo.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Mark Struberg","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["struberg(struberg)","michael-o(michael-o)"],"customfield_10160":null,"updated":"2014-11-25T14:49:21.297-0600","created":"2011-08-17T07:08:29.646-0500","description":"Most of the classes in plexus-utils are forks from Apache projects (Ant, Avalon, Maven-1, Anakia, Commons, ...) and thus since forever had the \"Copyright The Apache Software Foundation\".\r\n\r\nThis only recently (last year or so) got changed to \"Copyright The Codehaus\". \r\nThis change must get reverted in SVN (and all forks from there).\r\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-142/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/128534/comment/357763","id":"357763","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:49:21.294-0600","updated":"2014-11-25T14:49:21.294-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-143.json b/jira/PLXUTILS-143.json new file mode 100644 index 00000000..4753e97b --- /dev/null +++ b/jira/PLXUTILS-143.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"129968","self":"http://jira.codehaus.org/rest/api/latest/issue/129968","key":"PLXUTILS-143","fields":{"progress":{"progress":0,"total":0},"summary":"Xpp3Dom toString() always writes a xml header","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-143/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T14:48:37.814-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lukas","name":"lukas","emailAddress":"ltheussl@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Lukas Theussl","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["lukas(lukas)","michael-o(michael-o)"],"customfield_10160":null,"updated":"2014-11-25T14:48:37.852-0600","created":"2011-09-28T03:24:36.812-0500","description":"There is a comment in the source code [added by Brett| https://github.com/sonatype/plexus-utils/commit/5d71f7d8cd1c0868133b2f44ef01125c7b8a46b7#src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java]. This causes MSITE-551.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"29928","self":"http://jira.codehaus.org/rest/api/2/issueLink/29928","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"121730","key":"MSITE-551","self":"http://jira.codehaus.org/rest/api/2/issue/121730","fields":{"summary":"custom content not returned correctly","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-143/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16410","id":"16410","description":"","name":"2.0.5","archived":false,"released":true,"releaseDate":"2010-04-25"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/129968/comment/357630","id":"357630","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:48:37.848-0600","updated":"2014-11-25T14:48:37.848-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-144.json b/jira/PLXUTILS-144.json new file mode 100644 index 00000000..4915eaba --- /dev/null +++ b/jira/PLXUTILS-144.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"130886","self":"http://jira.codehaus.org/rest/api/latest/issue/130886","key":"PLXUTILS-144","fields":{"progress":{"progress":0,"total":0},"summary":"CLONE - add the ability to preserver parent directories when using copyDirectory(...) and include pattern.","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-144/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/3","id":"3","description":"The problem is a duplicate of an existing issue.","name":"Duplicate"},"fixVersions":[],"resolutiondate":"2011-10-25T10:35:11.977-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=icfantv","name":"icfantv","emailAddress":"adam.n.gordon@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"adam gordon","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["icfantv(icfantv)"],"customfield_10160":null,"updated":"2011-10-25T10:35:12.037-0500","created":"2011-10-25T10:34:08.789-0500","description":"Please note that this issue is somewhat related to http://jira.codehaus.org/browse/PLX-187 but not entirely. \n\nIt seems that with the current plexus-utils v1.3 release only files matching the include pattern are copied but if these files are in sub-directories then their parent directory structure is not preserved. For example, the bellow code will not create a sub-directory in the destination directory if the source directory contains only a sub directories with single files.\n \nFileUtils.copyDirectory(new File(\"c:/temp/copy/src\"), new File(\"c:/temp/copy/dest\"),\"**\", null);\n\nI have created a patch adds a new method called copyDirectory(...) with an extra Boolean parameter that allows one to preserver a files parent directory structure. The following is the new method's signature\n\ncopyDirectory(File sourceDirectory, File destinationDirectory, String includes, String excludes, boolean includeParentdir)\n\nExample:\nFileUtils.copyDirectory(new File(\"c:/temp/copy/src\"), new File(\"c:/temp/copy/dest\"),\"**\", null, true);\n\nThe patch also contains a unite test for the new method. \n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"101779200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-144/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/57454","id":"57454","filename":"plexus-util-r4533.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=icfantv","name":"icfantv","emailAddress":"adam.n.gordon@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"adam gordon","active":true},"created":"2011-10-25T10:34:09.062-0500","size":6521,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/57454/plexus-util-r4533.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"Windows XP, Cygwin, x86, Java 1.4.2","timeestimate":null,"customfield_10130":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10053","value":"Yes","id":"10053"},"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/130886/comment/282038","id":"282038","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=icfantv","name":"icfantv","emailAddress":"adam.n.gordon@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"adam gordon","active":true},"body":"Was hoping to change the type to bug, but apparently JIRA doesn't allow that when cloning.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=icfantv","name":"icfantv","emailAddress":"adam.n.gordon@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"adam gordon","active":true},"created":"2011-10-25T10:35:12.032-0500","updated":"2011-10-25T10:35:12.032-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-145.json b/jira/PLXUTILS-145.json new file mode 100644 index 00000000..4a6880ae --- /dev/null +++ b/jira/PLXUTILS-145.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"132059","self":"http://jira.codehaus.org/rest/api/latest/issue/132059","key":"PLXUTILS-145","fields":{"progress":{"progress":0,"total":0},"summary":"org.codehaus.plexus.util.cli.shell.Shell#getRawCommandLine(String, String[]) passes #is[Single|Double]QuotedExecutableEscaped() to #getEscapeChars() for arguments","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-145/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/18703","id":"18703","name":"3.0.4","archived":false,"released":true,"releaseDate":"2012-08-06"}],"resolutiondate":"2012-09-15T05:43:41.832-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mbenson","name":"mbenson","emailAddress":"gudnabrsam@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Matt Benson","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["krosenvold(krosenvold)","mbenson(mbenson)"],"customfield_10160":null,"updated":"2012-09-15T05:43:41.873-0500","created":"2011-12-01T13:48:10.076-0600","description":"It appears that #is[Single|Double]QuotedArgumentEscaped() were included with the intent of calling them here, but what would appear to be an unfortunate C&P error made things otherwise. I have no idea of the ramifications of fixing the problem at this late date, however.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"31577","self":"http://jira.codehaus.org/rest/api/2/issueLink/31577","type":{"id":"10000","name":"Duplicate","inward":"is duplicated by","outward":"duplicates","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10000"},"outwardIssue":{"id":"139308","key":"PLXUTILS-152","self":"http://jira.codehaus.org/rest/api/2/issue/139308","fields":{"summary":"Shell fails to escape quotes in arguments","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"98496000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-145/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17516","id":"17516","description":"","name":"3.0","archived":false,"released":true,"releaseDate":"2011-06-23"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-146.json b/jira/PLXUTILS-146.json new file mode 100644 index 00000000..5fb113ac --- /dev/null +++ b/jira/PLXUTILS-146.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"133015","self":"http://jira.codehaus.org/rest/api/latest/issue/133015","key":"PLXUTILS-146","fields":{"progress":{"progress":0,"total":0},"summary":"CLI: Quoting for arguments considers 'isSingleQuotedExecutableEscaped' instead of 'isSingleQuotedArgumentEscaped'","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-146/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/3","id":"3","description":"The problem is a duplicate of an existing issue.","name":"Duplicate"},"fixVersions":[],"resolutiondate":"2012-08-01T15:21:35.910-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lcorneliussen","name":"lcorneliussen","emailAddress":"me@lcorneliussen.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Lars Corneliussen","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["krosenvold(krosenvold)","lcorneliussen(lcorneliussen)"],"customfield_10160":null,"updated":"2012-08-01T15:22:19.730-0500","created":"2012-01-04T06:19:14.144-0600","description":"{code:title=org.codehaus.plexus.util.cli.shell.Shell#getRawCommandLine}\r\nif ( isQuotedArgumentsEnabled() )\r\n{\r\n char[] escapeChars = getEscapeChars( isSingleQuotedExecutableEscaped(), isDoubleQuotedExecutableEscaped() );\r\n\r\n sb.append( StringUtils.quoteAndEscape( arguments[i], getArgumentQuoteDelimiter(), escapeChars, getQuotingTriggerChars(), '\\\\', false ) );\r\n]\r\n{code}\r\n\r\nshould be \r\n\r\n{code}\r\nchar[] escapeChars = getEscapeChars( isSingleQuotedArgumentEscaped(), isDoubleQuotedArgumentEscaped() );\r\n{code}","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/5","iconUrl":"http://jira.codehaus.org/images/icons/priorities/trivial.png","name":"Trivial","id":"5"},"duedate":null,"issuelinks":[{"id":"31573","self":"http://jira.codehaus.org/rest/api/2/issueLink/31573","type":{"id":"10000","name":"Duplicate","inward":"is duplicated by","outward":"duplicates","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10000"},"outwardIssue":{"id":"139308","key":"PLXUTILS-152","self":"http://jira.codehaus.org/rest/api/2/issue/139308","fields":{"summary":"Shell fails to escape quotes in arguments","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"95644800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-146/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":["plexus-cli"],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15515","id":"15515","description":"","name":"1.5.15","archived":false,"released":true,"releaseDate":"2009-06-05"}],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-147.json b/jira/PLXUTILS-147.json new file mode 100644 index 00000000..1bc376ee --- /dev/null +++ b/jira/PLXUTILS-147.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"133016","self":"http://jira.codehaus.org/rest/api/latest/issue/133016","key":"PLXUTILS-147","fields":{"progress":{"progress":0,"total":0},"summary":"Support custom quoting strategies in Plexus CLI","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-147/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lcorneliussen","name":"lcorneliussen","emailAddress":"me@lcorneliussen.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Lars Corneliussen","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["lcorneliussen(lcorneliussen)"],"customfield_10160":null,"updated":"2012-01-04T06:30:51.545-0600","created":"2012-01-04T06:30:51.545-0600","description":"I need to change the quoting of an argument from \"/x:a b c\" to /x:\"a b c\".\r\n\r\nCurrently this is quite complicated to achieve using Plexus Utils.\r\n\r\nIf {{StringUtils.quoteAndEscape}} in {{org.codehaus.plexus.util.cli.shell.Shell#getRawCommandLine}} was exchangable with a custom implementation through an interface, that would be wonderfully possible, without much hassle.\r\n\r\nWhat do you think? I'd be happy to provide a patch, if it had a chance to be applied.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"95644800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-147/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15591","id":"15591","description":"","name":"1.5.11","archived":false,"released":true,"releaseDate":"2009-05-29"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-148.json b/jira/PLXUTILS-148.json new file mode 100644 index 00000000..abbf888f --- /dev/null +++ b/jira/PLXUTILS-148.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"135353","self":"http://jira.codehaus.org/rest/api/latest/issue/135353","key":"PLXCOMP-208","fields":{"progress":{"progress":0,"total":0},"summary":"Infinite loop in archiver.AbstractArchiver$1.hasNext","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-208/votes","votes":4,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/18295","id":"18295","name":"plexus-archiver-2.2","archived":false,"released":true,"releaseDate":"2012-09-19"}],"resolutiondate":"2012-09-19T10:45:58.840-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=thezuck","name":"thezuck","emailAddress":"thezuck@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Amir Zucker","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["thezuck(thezuck)","hitesh_22(hitesh_22)","ebann(ebann)","krosenvold(krosenvold)","muji(muji)","plushnikov(plushnikov)","selliott@paml.com(selliott@paml.com)"],"customfield_10160":null,"updated":"2012-09-24T08:26:52.532-0500","created":"2012-03-19T04:39:32.121-0500","description":"Maven (3) install, not sure which phase this happened in\r\nHappened consistently (every time)\r\n\r\n{noformat}Exception in thread \"main\" java.lang.StackOverflowError\r\n\tat sun.nio.cs.SingleByteEncoder.encodeArrayLoop(SingleByteEncoder.java:91)\r\n\tat sun.nio.cs.SingleByteEncoder.encodeLoop(SingleByteEncoder.java:130)\r\n\tat java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:544)\r\n\tat sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:252)\r\n\tat sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)\r\n\tat java.io.OutputStreamWriter.write(OutputStreamWriter.java:190)\r\n\tat java.io.BufferedWriter.flushBuffer(BufferedWriter.java:111)\r\n\tat java.io.PrintStream.write(PrintStream.java:476)\r\n\tat java.io.PrintStream.print(PrintStream.java:619)\r\n\tat org.apache.maven.cli.PrintStreamLogger.info(PrintStreamLogger.java:110)\r\n\tat org.codehaus.plexus.logging.AbstractLogger.info(AbstractLogger.java:51)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:464)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:430)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:453)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n{noformat}","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"duedate":null,"issuelinks":[{"id":"31805","self":"http://jira.codehaus.org/rest/api/2/issueLink/31805","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"122878","key":"MASSEMBLY-549","self":"http://jira.codehaus.org/rest/api/2/issue/122878","fields":{"summary":"StackOverflowError while creating assembly","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"31804","self":"http://jira.codehaus.org/rest/api/2/issueLink/31804","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"135373","key":"MASSEMBLY-602","self":"http://jira.codehaus.org/rest/api/2/issue/135373","fields":{"summary":"Multiple Assemblies Causes Infinite Loop\\Recursion","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"72835200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-208/watchers","watchCount":5,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":["exception"],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/59257","id":"59257","filename":"exception.txt","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=thezuck","name":"thezuck","emailAddress":"thezuck@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Amir Zucker","active":true},"created":"2012-03-19T04:39:33.154-0500","size":89936,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/59257/exception.txt"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"constituent[17]: file:/T:/apache-maven/lib/plexus-cipher-1.7.jar\r\nconstituent[18]: file:/T:/apache-maven/lib/plexus-component-annotations-1.5.5.jar\r\nconstituent[19]: file:/T:/apache-maven/lib/plexus-interpolation-1.14.jar\r\nconstituent[20]: file:/T:/apache-maven/lib/plexus-sec-dispatcher-1.3.jar\r\nconstituent[21]: file:/T:/apache-maven/lib/plexus-utils-2.0.6.jar\r\n","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/12540","id":"12540","name":"plexus-archiver"}],"comment":{"startAt":0,"maxResults":9,"total":9,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/135353/comment/294527","id":"294527","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=selliott%40paml.com","name":"selliott@paml.com","emailAddress":"javamonkey79@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Shaun","active":true},"body":"I am also getting this error when running the assembly plugin in maven 3.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=selliott%40paml.com","name":"selliott@paml.com","emailAddress":"javamonkey79@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Shaun","active":true},"created":"2012-03-19T12:36:48.693-0500","updated":"2012-03-19T12:36:48.693-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/135353/comment/297887","id":"297887","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=muji","name":"muji","emailAddress":"muji_mu@hotmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Matthew Eash","active":true},"body":"Same for me, using maven-assembly-plugin 2.3 in maven 3.0.4\r\n\r\n[INFO] --- maven-assembly-plugin:2.3:single (package-jar-with-dependencies) @ wsi ---\r\n[WARNING] Artifact: com.test:wsi:jar:1.0-SNAPSHOT references the same file as the assembly destination file. Moving it to a temporary location for inclusion.\r\n[INFO] META-INF/ already added, skipping\r\n... REPEAT \"already added, skipping\" for every file\r\n with exception & dump that matches original submitter's\r\n\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=muji","name":"muji","emailAddress":"muji_mu@hotmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Matthew Eash","active":true},"created":"2012-05-04T13:15:22.438-0500","updated":"2012-05-04T13:15:22.438-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/135353/comment/299814","id":"299814","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=plushnikov","name":"plushnikov","emailAddress":"plushnikov@web.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Plushnikov","active":true},"body":"Same for me:\r\nException in thread \"main\" java.lang.StackOverflowError\r\n\tat sun.nio.cs.UTF_8.updatePositions(UTF_8.java:58)\r\n\tat sun.nio.cs.UTF_8$Encoder.encodeArrayLoop(UTF_8.java:392)\r\n\tat sun.nio.cs.UTF_8$Encoder.encodeLoop(UTF_8.java:447)\r\n\tat java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:544)\r\n\tat sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:252)\r\n\tat sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)\r\n\tat java.io.OutputStreamWriter.write(OutputStreamWriter.java:190)\r\n\tat java.io.BufferedWriter.flushBuffer(BufferedWriter.java:111)\r\n\tat java.io.PrintStream.write(PrintStream.java:476)\r\n\tat java.io.PrintStream.print(PrintStream.java:619)\r\n\tat org.apache.maven.cli.PrintStreamLogger.info(PrintStreamLogger.java:110)\r\n\tat org.codehaus.plexus.logging.AbstractLogger.info(AbstractLogger.java:55)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:464)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n\tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:467)\r\n....","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=plushnikov","name":"plushnikov","emailAddress":"plushnikov@web.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Plushnikov","active":true},"created":"2012-05-27T11:37:32.161-0500","updated":"2012-05-27T11:37:32.161-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/135353/comment/308060","id":"308060","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hitesh_22","name":"hitesh_22","emailAddress":"hitesh.h.patel@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Hitesh Patel","active":true},"body":"https://github.com/okamototk/KanonProject/issues/1\r\n\r\nDoing this fixed the problem for me: setting MAVEN_OPTS=\"-Xmx512m -Xms128m -Xss2m\" \r\n\r\n\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hitesh_22","name":"hitesh_22","emailAddress":"hitesh.h.patel@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Hitesh Patel","active":true},"created":"2012-09-09T16:04:07.204-0500","updated":"2012-09-09T16:04:07.204-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/135353/comment/308956","id":"308956","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ebann","name":"ebann","emailAddress":"ivan.boelle@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Ivan","active":true},"body":"Reproduced too when using \"mvn clean install site-deploy\" on a big multimodules project:\r\n\r\n21:15:49 \tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n21:15:49 \tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n21:15:49 \tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n21:15:49 \tat java.lang.reflect.Method.invoke(Method.java:601)\r\n21:15:49 \tat org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)\r\n21:15:49 \tat org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)\r\n21:15:49 \tat org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)\r\n21:15:49 \tat hudson.maven.Maven3Builder.call(Maven3Builder.java:121)\r\n21:15:49 \tat hudson.maven.Maven3Builder.call(Maven3Builder.java:73)\r\n21:15:49 \tat hudson.remoting.UserRequest.perform(UserRequest.java:118)\r\n21:15:49 \tat hudson.remoting.UserRequest.perform(UserRequest.java:48)\r\n21:15:49 \tat hudson.remoting.Request$2.run(Request.java:287)\r\n21:15:49 \tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)\r\n21:15:49 \tat java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)\r\n21:15:49 \tat java.util.concurrent.FutureTask.run(FutureTask.java:166)\r\n21:15:49 \tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)\r\n21:15:49 \tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)\r\n21:15:49 \tat java.lang.Thread.run(Thread.java:722)\r\n21:15:49 Caused by: java.lang.StackOverflowError\r\n21:15:49 \tat sun.nio.cs.UTF_8.updatePositions(UTF_8.java:77)\r\n21:15:49 \tat sun.nio.cs.UTF_8$Encoder.encodeArrayLoop(UTF_8.java:564)\r\n21:15:49 \tat sun.nio.cs.UTF_8$Encoder.encodeLoop(UTF_8.java:619)\r\n21:15:49 \tat java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:561)\r\n21:15:49 \tat sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:271)\r\n21:15:49 \tat sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)\r\n21:15:49 \tat java.io.OutputStreamWriter.write(OutputStreamWriter.java:207)\r\n21:15:49 \tat java.io.BufferedWriter.flushBuffer(BufferedWriter.java:129)\r\n21:15:49 \tat java.io.PrintStream.write(PrintStream.java:526)\r\n21:15:49 \tat java.io.PrintStream.print(PrintStream.java:669)\r\n21:15:49 \tat java.io.PrintStream.println(PrintStream.java:806)\r\n21:15:49 \tat org.apache.maven.cli.PrintStreamLogger.info(PrintStreamLogger.java:111)\r\n21:15:49 \tat org.codehaus.plexus.logging.AbstractLogger.info(AbstractLogger.java:51)\r\n21:15:49 \tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:500)\r\n21:15:49 \tat org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:504)\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ebann","name":"ebann","emailAddress":"ivan.boelle@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Ivan","active":true},"created":"2012-09-19T02:25:30.616-0500","updated":"2012-09-19T02:25:30.616-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/135353/comment/309095","id":"309095","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Fixed with unit test in 4ff67988ddb736fc51bd0848a3ea39998dca40c8","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2012-09-19T10:45:58.891-0500","updated":"2012-09-19T10:45:58.891-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/135353/comment/309567","id":"309567","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ebann","name":"ebann","emailAddress":"ivan.boelle@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Ivan","active":true},"body":"Where can I found a fixed version of plexus-archiver ?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ebann","name":"ebann","emailAddress":"ivan.boelle@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Ivan","active":true},"created":"2012-09-24T02:39:29.437-0500","updated":"2012-09-24T02:39:29.437-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/135353/comment/309571","id":"309571","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"As the \"fix version\" says, version 2.2 or higher from maven central","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2012-09-24T03:14:29.843-0500","updated":"2012-09-24T03:14:29.843-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/135353/comment/309596","id":"309596","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ebann","name":"ebann","emailAddress":"ivan.boelle@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Ivan","active":true},"body":"Sorry, my maven-proxy was not updating the central-repository correctly.\r\n\r\nThank you !","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ebann","name":"ebann","emailAddress":"ivan.boelle@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Ivan","active":true},"created":"2012-09-24T08:26:52.439-0500","updated":"2012-09-24T08:26:52.439-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-149.json b/jira/PLXUTILS-149.json new file mode 100644 index 00000000..86ff2fd3 --- /dev/null +++ b/jira/PLXUTILS-149.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"136447","self":"http://jira.codehaus.org/rest/api/latest/issue/136447","key":"PLXUTILS-149","fields":{"progress":{"progress":0,"total":0},"summary":"CLONE - Copying resources with no modication date silently is ignored","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-149/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=rfscholte","name":"rfscholte","emailAddress":"codehaus@sourcegrounds.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=rfscholte&avatarId=10919","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=rfscholte&avatarId=10919","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=rfscholte&avatarId=10919","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=rfscholte&avatarId=10919"},"displayName":"Robert Scholte","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["rfscholte(rfscholte)"],"customfield_10160":null,"updated":"2012-04-27T17:07:21.360-0500","created":"2012-04-27T17:06:01.342-0500","description":"If a file has no last modified date (File.lastModified() == 0), then the plugin just ignore it. This line in the file FileUtils.java of plexus-utils(2.0.5) is wrong:\r\n\r\n{{if ( to.lastModified() < from.lastModified() || overwrite )}}\r\n\r\nIt will be evaluated to {{false}} always if {{overwrite}} flag is not set.\r\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"31013","self":"http://jira.codehaus.org/rest/api/2/issueLink/31013","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"125233","key":"MRESOURCES-145","self":"http://jira.codehaus.org/rest/api/2/issue/125233","fields":{"summary":"Copying resources with no modication date silently is ignored","status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"85708800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-149/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17516","id":"17516","description":"","name":"3.0","archived":false,"released":true,"releaseDate":"2011-06-23"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-15.json b/jira/PLXUTILS-15.json new file mode 100644 index 00000000..1c726246 --- /dev/null +++ b/jira/PLXUTILS-15.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"25025","self":"http://jira.codehaus.org/rest/api/latest/issue/25025","key":"PLXUTILS-15","fields":{"progress":{"progress":0,"total":0},"summary":"MXParser is not able to read some XML document since PLX-126","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-15/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14045","id":"14045","description":"","name":"1.0.1","archived":true,"released":true,"releaseDate":"2005-07-10"}],"resolutiondate":"2005-06-22T11:03:49.920-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=sni","name":"sni","emailAddress":"stephane.nicoll@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Stéphane Nicoll","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["evenisse(evenisse)","sni(sni)"],"customfield_10160":null,"updated":"2008-02-02T15:58:58.570-0600","created":"2005-06-21T16:19:57.769-0500","description":"PLX-126 has introduced a bug which is fixed by the attached patch. Explication of the problem follows.\n\nAS described in PLX-126, the idea is to add an encoding and a doctype declaration support for the XMLWriter interface. Unfortunately, this interface is used in two different ways. PrettyPrintXMLWriter is an helper class to output a given XML document to a writer, SerializerXMLWriter might be used to output a document but also a single element.\n\nThe patch applied was assuming that SerialierXMLWriter is ALWAYS managing a whole document. This is not the case since the serializer is given in the constructor. the documentStarted boolean could NOT fulfill its contract.\n\nThe attached patch fixes this problem.\n\n- PrettyPrintXMLWriter is not impacted ; it works properly (provided that one uses it always to ouput a whole document and not a single element)\n- SerializerWMLWriter is impacted, it works as before ; setEnconding throws an IllegalStateEXception as the encoding should be set on the serializer\n\nPlease not that this might require a smal refactoring of the XMLWriter interface ; a mandatory startDocument method could solve all those issues.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"301881600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-15/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/15696","id":"15696","filename":"fix-mxparser.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=sni","name":"sni","emailAddress":"stephane.nicoll@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Stéphane Nicoll","active":true},"created":"2005-06-21T16:19:57.874-0500","size":1732,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/15696/fix-mxparser.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/25025/comment/41846","id":"41846","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=sni","name":"sni","emailAddress":"stephane.nicoll@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Stéphane Nicoll","active":true},"body":"Important note: if you guys consider that the XMLWriter interface is used *BOTH* for a whole document and a single element which will be incorporated in a document; the patch should not be applied.\r\n\r\nInstead I think we should remove the thing which has been applied in PLX-126 because it does not make sense. In this case, please let me know how I can write complete XML document with encoding and docType: I need this to finalize the m2 EAR plugin.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=sni","name":"sni","emailAddress":"stephane.nicoll@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Stéphane Nicoll","active":true},"created":"2005-06-22T02:15:40.724-0500","updated":"2005-06-22T02:15:40.724-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/25025/comment/41882","id":"41882","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"body":"o Rollback PLX-126 changes\r\no you can set encoding and doctype in PrettyPrintXMLWriter constructor","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"created":"2005-06-22T11:03:49.859-0500","updated":"2005-06-22T11:03:49.859-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-150.json b/jira/PLXUTILS-150.json new file mode 100644 index 00000000..b69730af --- /dev/null +++ b/jira/PLXUTILS-150.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"136640","self":"http://jira.codehaus.org/rest/api/latest/issue/136640","key":"PLXUTILS-150","fields":{"progress":{"progress":0,"total":0},"summary":"XMLReader may be fail to load XML containing non-Latin characters in IBM's J9 JVM","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-150/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/6","id":"6","description":"The issue is not a bug","name":"Not A Bug"},"fixVersions":[],"resolutiondate":"2012-06-28T20:27:02.875-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=tan9","name":"tan9","emailAddress":"tangtheone@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10225","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10225","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10225","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10225"},"displayName":"Pei-Tang Huang","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["tan9(tan9)"],"customfield_10160":null,"updated":"2012-06-28T20:27:03.462-0500","created":"2012-05-06T22:30:52.877-0500","description":"org.codehaus.plexus.util.xml.XmlReader.getXmlProlog() may be fail to handle XML containing multibyte character located across the 4096-th byte.\r\n\r\nDue to the strange behavior of IBM J9's\r\n\r\n String(byte[] data, int start, int length, String encoding)\r\n\r\nconstructor implementation. If the length parameter fall on the middle of any multibyte character (Chinese, Japanese, Korean, etc.) The newly created String in IBM's J9 JVM will be length 1, and the numeric value of the only character is -1.\r\n\r\n\r\n\r\nRun \"mvn\" on J9 to the attached pom.xml can reproduce this problem.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"80352000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-150/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":["ibm","j9","jvm","xml"],"workratio":-1,"assignee":null,"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/59819","id":"59819","filename":"pom.xml","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=tan9","name":"tan9","emailAddress":"tangtheone@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10225","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10225","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10225","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10225"},"displayName":"Pei-Tang Huang","active":true},"created":"2012-05-06T22:30:53.749-0500","size":4555,"mimeType":"text/xml","content":"http://jira.codehaus.org/secure/attachment/59819/pom.xml"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/16412","id":"16412","description":"","name":"2.0.6","archived":false,"released":true,"releaseDate":"2011-02-09"},{"self":"http://jira.codehaus.org/rest/api/2/version/17149","id":"17149","description":"","name":"2.0.7","archived":false,"released":true,"releaseDate":"2011-03-03"},{"self":"http://jira.codehaus.org/rest/api/2/version/17364","id":"17364","description":"","name":"2.1","archived":false,"released":true,"releaseDate":"2011-06-09"},{"self":"http://jira.codehaus.org/rest/api/2/version/17516","id":"17516","description":"","name":"3.0","archived":false,"released":true,"releaseDate":"2011-06-23"}],"customfield_10170":null,"environment":"IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows 7 amd64-64 jvmwa6460sr9-20110726_87724 (JIT enabled, AOT enabled)","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/136640/comment/302154","id":"302154","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=tan9","name":"tan9","emailAddress":"tangtheone@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10225","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10225","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10225","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10225"},"displayName":"Pei-Tang Huang","active":true},"body":"I can confirm that this problem is gone under IBM's J9 build pwa6460sr10fp1-20120321_01(SR10 FP1).","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=tan9","name":"tan9","emailAddress":"tangtheone@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10225","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10225","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10225","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10225"},"displayName":"Pei-Tang Huang","active":true},"created":"2012-06-28T20:26:25.964-0500","updated":"2012-06-28T20:26:25.964-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/136640/comment/302155","id":"302155","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=tan9","name":"tan9","emailAddress":"tangtheone@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10225","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10225","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10225","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10225"},"displayName":"Pei-Tang Huang","active":true},"body":"IBM's J9 fixed.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=tan9","name":"tan9","emailAddress":"tangtheone@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10225","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10225","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10225","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10225"},"displayName":"Pei-Tang Huang","active":true},"created":"2012-06-28T20:27:03.301-0500","updated":"2012-06-28T20:27:03.301-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-151.json b/jira/PLXUTILS-151.json new file mode 100644 index 00000000..1806cd19 --- /dev/null +++ b/jira/PLXUTILS-151.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"137589","self":"http://jira.codehaus.org/rest/api/latest/issue/137589","key":"PLXUTILS-151","fields":{"progress":{"progress":0,"total":0},"summary":"FileUtils.deleteDirectory() attempts to traverse symlinks, then fails when it encounters a file it can't delete","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-151/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/18570","id":"18570","name":"3.0.2","archived":false,"released":true,"releaseDate":"2012-07-09"}],"resolutiondate":"2012-06-05T17:56:20.682-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=minfrin","name":"minfrin","emailAddress":"minfrin@sharp.fm","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Graham Leggett","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["minfrin(minfrin)","olamy(olamy)"],"customfield_10160":null,"updated":"2012-06-05T17:57:44.973-0500","created":"2012-06-05T16:39:38.299-0500","description":"When deleteDirectory() walks the tree in an attempt to delete directories, it follows symbolic links. If the symlink points somewhere read only, the attempt to delete fails.\r\n\r\nThis renders it impossible to use symlinks with the rpm-maven-plugin when the symlinks point at the filesystem outside the build in http://jira.codehaus.org/browse/MRPM-115.\r\n\r\nThe fix is to attempt to delete the directory before attempting to delete children, and bypass the children walk if the delete succeeded. This removes symlinks safely without traversing them accidentally.\r\n\r\n{code}\r\nIndex: src/main/java/org/codehaus/plexus/util/FileUtils.java\r\n===================================================================\r\n--- src/main/java/org/codehaus/plexus/util/FileUtils.java\t(revision 8799)\r\n+++ src/main/java/org/codehaus/plexus/util/FileUtils.java\t(working copy)\r\n@@ -1567,6 +1567,14 @@\r\n return;\r\n }\r\n \r\n+ /* try delete the directory before its contents, which will take\r\n+ * care of any directories that are really symbolic links.\r\n+ */\r\n+ if ( directory.delete() )\r\n+ {\r\n+ \treturn;\r\n+ }\r\n+\r\n cleanDirectory( directory );\r\n if ( !directory.delete() )\r\n {\r\n{code}\r\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"82339200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-151/watchers","watchCount":2,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17516","id":"17516","description":"","name":"3.0","archived":false,"released":true,"releaseDate":"2011-06-23"}],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":"java version \"1.6.0_06\"\r\nJava(TM) SE Runtime Environment (build 1.6.0_06-b02)\r\nJava HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)\r\n","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":4,"total":4,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/137589/comment/300451","id":"300451","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"note sources are now hosted here: github.com/sonatype/plexus-utils\r\nSo you can play with a pull request","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2012-06-05T17:33:49.636-0500","updated":"2012-06-05T17:33:49.636-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/137589/comment/300452","id":"300452","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=minfrin","name":"minfrin","emailAddress":"minfrin@sharp.fm","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Graham Leggett","active":true},"body":"The patch applied cleanly to the git clone that I created and all tests still passed. I need to reread the git docs yet again to figure out how pull requests work, sigh.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=minfrin","name":"minfrin","emailAddress":"minfrin@sharp.fm","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Graham Leggett","active":true},"created":"2012-06-05T17:40:51.222-0500","updated":"2012-06-05T17:40:51.222-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/137589/comment/300454","id":"300454","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"ok NP I will use that.\r\nBut take a look on how fork a project :P","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2012-06-05T17:49:49.468-0500","updated":"2012-06-05T17:49:49.468-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/137589/comment/300456","id":"300456","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"fixed https://github.com/sonatype/plexus-utils/commit/4305d47b13c97bfddbef11d684e882261a292e3a","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2012-06-05T17:56:20.825-0500","updated":"2012-06-05T17:56:20.825-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-152.json b/jira/PLXUTILS-152.json new file mode 100644 index 00000000..5e01e5c7 --- /dev/null +++ b/jira/PLXUTILS-152.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"139308","self":"http://jira.codehaus.org/rest/api/latest/issue/139308","key":"PLXUTILS-152","fields":{"progress":{"progress":0,"total":0},"summary":"Shell fails to escape quotes in arguments","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-152/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/18702","id":"18702","name":"3.0.3","archived":false,"released":true,"releaseDate":"2012-08-01"},{"self":"http://jira.codehaus.org/rest/api/2/version/18703","id":"18703","name":"3.0.4","archived":false,"released":true,"releaseDate":"2012-08-06"}],"resolutiondate":"2012-08-10T09:57:41.241-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mahoney266","name":"mahoney266","emailAddress":"rob@lidalia.org.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Rob Elliot","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["krosenvold(krosenvold)","mahoney266(mahoney266)"],"customfield_10160":null,"updated":"2012-08-10T09:57:41.327-0500","created":"2012-07-31T18:23:01.986-0500","description":"The function getRawCommandLine incorrectly uses the escaping settings for the *executable* rather than the *arguments* when deciding what characters to escape in an argument. In the bourne shell this results in quotes within an argument not being escaped when the argument is quoted.\r\n\r\nThis is preventing me using the Maven release plugin as I need to pass a gpg passphrase containing single quotes.\r\n\r\nSee git hub pull request https://github.com/sonatype/plexus-utils/pull/5 which contains a unit test demonstrating the issue & a fix.\r\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"31577","self":"http://jira.codehaus.org/rest/api/2/issueLink/31577","type":{"id":"10000","name":"Duplicate","inward":"is duplicated by","outward":"duplicates","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10000"},"inwardIssue":{"id":"132059","key":"PLXUTILS-145","self":"http://jira.codehaus.org/rest/api/2/issue/132059","fields":{"summary":"org.codehaus.plexus.util.cli.shell.Shell#getRawCommandLine(String, String[]) passes #is[Single|Double]QuotedExecutableEscaped() to #getEscapeChars() for arguments","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"31578","self":"http://jira.codehaus.org/rest/api/2/issueLink/31578","type":{"id":"10000","name":"Duplicate","inward":"is duplicated by","outward":"duplicates","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10000"},"inwardIssue":{"id":"104675","key":"PLXUTILS-123","self":"http://jira.codehaus.org/rest/api/2/issue/104675","fields":{"summary":"Shell uses doubleQuotedExecutableEscaped instead of doubleQuotedArgumentEscaped ","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/5","iconUrl":"http://jira.codehaus.org/images/icons/priorities/trivial.png","name":"Trivial","id":"5"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"31573","self":"http://jira.codehaus.org/rest/api/2/issueLink/31573","type":{"id":"10000","name":"Duplicate","inward":"is duplicated by","outward":"duplicates","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10000"},"inwardIssue":{"id":"133015","key":"PLXUTILS-146","self":"http://jira.codehaus.org/rest/api/2/issue/133015","fields":{"summary":"CLI: Quoting for arguments considers 'isSingleQuotedExecutableEscaped' instead of 'isSingleQuotedArgumentEscaped'","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/5","iconUrl":"http://jira.codehaus.org/images/icons/priorities/trivial.png","name":"Trivial","id":"5"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"31581","self":"http://jira.codehaus.org/rest/api/2/issueLink/31581","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"139309","key":"MRELEASE-785","self":"http://jira.codehaus.org/rest/api/2/issue/139309","fields":{"summary":"Arguments containing spaces and quotes cause the forked maven process to fail","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"77328000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-152/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17516","id":"17516","description":"","name":"3.0","archived":false,"released":true,"releaseDate":"2011-06-23"},{"self":"http://jira.codehaus.org/rest/api/2/version/17517","id":"17517","description":"","name":"3.0.1","archived":false,"released":true,"releaseDate":"2012-04-03"}],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":"All","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":6,"total":6,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/139308/comment/305127","id":"305127","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Fixed in ef26d83d3b6638ebfc0ac550e413c89ab98723ff, thanks for the patch!","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2012-08-01T02:22:19.615-0500","updated":"2012-08-01T02:22:19.615-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/139308/comment/305198","id":"305198","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mahoney266","name":"mahoney266","emailAddress":"rob@lidalia.org.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Rob Elliot","active":true},"body":"Fantastic, thanks. Is it possible to give an estimate on when a fixed version might be released to maven central?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mahoney266","name":"mahoney266","emailAddress":"rob@lidalia.org.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Rob Elliot","active":true},"created":"2012-08-01T13:13:36.482-0500","updated":"2012-08-01T13:13:36.482-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/139308/comment/305214","id":"305214","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"3.0.3 is estimated to be visible in central in 4 hours or less.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2012-08-01T16:19:59.638-0500","updated":"2012-08-01T16:19:59.638-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/139308/comment/305270","id":"305270","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mahoney266","name":"mahoney266","emailAddress":"rob@lidalia.org.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Rob Elliot","active":true},"body":"Unfortunately the quote mechanism is insufficient even when invoked. For a bourne shell it now escapes:\r\n\r\necho 'here's my string'\r\n\r\nas\r\n\r\necho 'here\\'s my string'\r\n\r\nThis is incorrect - it should be\r\n\r\necho 'here'\\''s my string'\r\n\r\nSee http://wiki.bash-hackers.org/syntax/quoting#strong_quoting\r\n\r\nApologies, I should have given this a proper end to end test before submitting the pull request rather than just a unit test.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mahoney266","name":"mahoney266","emailAddress":"rob@lidalia.org.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Rob Elliot","active":true},"created":"2012-08-02T03:42:57.493-0500","updated":"2012-08-02T03:42:57.493-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/139308/comment/305280","id":"305280","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Want to submit another pull request ?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2012-08-02T05:00:33.239-0500","updated":"2012-08-02T05:00:33.239-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/139308/comment/305404","id":"305404","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mahoney266","name":"mahoney266","emailAddress":"rob@lidalia.org.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Rob Elliot","active":true},"body":"Done - https://github.com/sonatype/plexus-utils/pull/6. I have also tested this one and it works as expected.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mahoney266","name":"mahoney266","emailAddress":"rob@lidalia.org.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Rob Elliot","active":true},"created":"2012-08-02T18:40:31.550-0500","updated":"2012-08-02T18:40:31.550-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-153.json b/jira/PLXUTILS-153.json new file mode 100644 index 00000000..3412f224 --- /dev/null +++ b/jira/PLXUTILS-153.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"140485","self":"http://jira.codehaus.org/rest/api/latest/issue/140485","key":"PLXUTILS-153","fields":{"progress":{"progress":0,"total":0},"summary":"Use Java NIO for FileUtils.copyFile","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-153/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/18787","id":"18787","name":"3.0.6","archived":false,"released":true,"releaseDate":"2012-09-15"},{"self":"http://jira.codehaus.org/rest/api/2/version/18788","id":"18788","name":"3.0.7","archived":false,"released":true,"releaseDate":"2012-09-16"}],"resolutiondate":"2012-09-15T05:40:23.349-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=usultis","name":"usultis","emailAddress":"usultis@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Ryszard Perkowski","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["krosenvold(krosenvold)","usultis(usultis)"],"customfield_10160":null,"updated":"2012-09-17T05:01:57.960-0500","created":"2012-09-14T16:35:55.320-0500","description":"Copying files could be made more efficient and less cpu intensive with Java NIO. Changes have been already made in commons-io and it would be beneficial to follow the same path in Plexus Utils.\r\n\r\nIt makes a difference especially with maven-war-plugin and similar maven plugins where large number of files copy operation is involved.\r\n\r\nBenefits are described here:\r\nhttp://java.dzone.com/articles/file-copy-java-%E2%80%93-benchmark\r\nhttp://www.javalobby.org/java/forums/t17036.html?start=0\r\n\r\nI'm also in favour of syncing with commons-io (PLXUTILS-21) but if it's a big task, in the meantime I would like this problem to be addressed as it saves time during maven builds.\r\n\r\nPatch contains changes merged from latest release of commons-io","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"73612800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-153/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":["copy","cpu","file","nio","performance"],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/61273","id":"61273","filename":"fileUtils-copy-nio.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=usultis","name":"usultis","emailAddress":"usultis@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Ryszard Perkowski","active":true},"created":"2012-09-14T16:35:55.495-0500","size":114868,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/61273/fileUtils-copy-nio.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/140485/comment/308570","id":"308570","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Fixed in a5b09677d9fdb82512edfb80e14f53ae03025e83, thanks for the patch!","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2012-09-15T05:40:23.395-0500","updated":"2012-09-15T05:40:23.395-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-154.json b/jira/PLXUTILS-154.json new file mode 100644 index 00000000..46266ea6 --- /dev/null +++ b/jira/PLXUTILS-154.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"142151","self":"http://jira.codehaus.org/rest/api/latest/issue/142151","key":"PLXUTILS-154","fields":{"progress":{"progress":0,"total":0},"summary":"Xpp3DomBuilder should support xml:space=\"preserve\"","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-154/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/18878","id":"18878","name":"3.0.9","archived":false,"released":true,"releaseDate":"2012-11-18"}],"resolutiondate":"2012-11-18T06:13:50.653-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["hboutemy(hboutemy)"],"customfield_10160":null,"updated":"2012-11-18T06:13:50.823-0600","created":"2012-11-18T06:00:27.968-0600","description":"required for MODELLO-263","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"32215","self":"http://jira.codehaus.org/rest/api/2/issueLink/32215","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"142150","key":"MODELLO-263","self":"http://jira.codehaus.org/rest/api/2/issue/142150","fields":{"summary":"support xml:space=\"preserve\" for DOM fields","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}}],"customfield_10163":"68083200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-154/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/18877","id":"18877","name":"3.0.8","archived":false,"released":true,"releaseDate":"2012-09-20"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/142151/comment/313821","id":"313821","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"body":"done in [d7b3c8ae2bd8947f5fce395c87324030d3d0497c|https://github.com/sonatype/plexus-utils/commit/d7b3c8ae2bd8947f5fce395c87324030d3d0497c]","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2012-11-18T06:13:50.821-0600","updated":"2012-11-18T06:13:50.821-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-155.json b/jira/PLXUTILS-155.json new file mode 100644 index 00000000..f3d18615 --- /dev/null +++ b/jira/PLXUTILS-155.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"142383","self":"http://jira.codehaus.org/rest/api/latest/issue/142383","key":"PLXUTILS-155","fields":{"progress":{"progress":0,"total":0},"summary":"CommandLineUtils.getSystemEnvVars does not preopely handle process streams","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-155/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17518","id":"17518","description":"","name":"3.1","archived":false,"released":false}],"resolutiondate":"2012-11-28T04:52:27.653-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["krosenvold(krosenvold)","olamy(olamy)"],"customfield_10160":null,"updated":"2012-11-28T04:54:20.782-0600","created":"2012-11-28T04:40:31.335-0600","description":"The method does not use the established and well-functioning forking code in CommandLine, but instead tries to write its own code. \r\n\r\nThis code does not work, and the method should be updated to use the \"correct\" \r\nexecuteCommandLine implementatiojn instead of trying to reimplement this stuff which is almost impossible to get right ;)\r\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"32261","self":"http://jira.codehaus.org/rest/api/2/issueLink/32261","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"142365","key":"MDEP-391","self":"http://jira.codehaus.org/rest/api/2/issue/142365","fields":{"summary":"Unpack fails on linux with large archives","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"67219200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-155/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/18878","id":"18878","name":"3.0.9","archived":false,"released":true,"releaseDate":"2012-11-18"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/142383/comment/314540","id":"314540","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Fixed in 6a2ad293e18e9ab51d686377be6314d2c5143301 by removing pre-jdk 1.5 logic","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2012-11-28T04:52:28.028-0600","updated":"2012-11-28T04:52:28.028-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/142383/comment/314541","id":"314541","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"AFAIK we test if System.getenv is available so folks with 1.5 or more must not fork a cli to get env vars.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2012-11-28T04:54:20.779-0600","updated":"2012-11-28T04:54:20.779-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-156.json b/jira/PLXUTILS-156.json new file mode 100644 index 00000000..cdc789d8 --- /dev/null +++ b/jira/PLXUTILS-156.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"142924","self":"http://jira.codehaus.org/rest/api/latest/issue/142924","key":"PLXUTILS-156","fields":{"progress":{"progress":0,"total":0},"summary":"Cannot set environment variables under OSX","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-156/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/19006","id":"19006","name":"3.0.10","archived":false,"released":true,"releaseDate":"2012-11-28"}],"resolutiondate":"2012-12-19T23:55:30.320-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=cowwoc","name":"cowwoc","emailAddress":"cowwoc@bbs.darktech.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Gili","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["cowwoc(cowwoc)","krosenvold(krosenvold)"],"customfield_10160":null,"updated":"2012-12-20T01:26:12.573-0600","created":"2012-12-19T23:19:39.329-0600","description":"When I attempt to perform releases under OSX I get the following exception:\r\n\r\n{code}\r\norg.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:perform (default-cli) on project cmake: An error is occurred in the checkout process: Exception while executing SCM command.\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)\r\n\tat org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)\r\n\tat org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)\r\n\tat org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)\r\n\tat org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)\r\n\tat org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)\r\n\tat org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)\r\n\tat org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:601)\r\n\tat org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)\r\n\tat org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)\r\n\tat org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)\r\n\tat hudson.maven.Maven3Builder.call(Maven3Builder.java:98)\r\n\tat hudson.maven.Maven3Builder.call(Maven3Builder.java:64)\r\n\tat hudson.remoting.UserRequest.perform(UserRequest.java:118)\r\n\tat hudson.remoting.UserRequest.perform(UserRequest.java:48)\r\n\tat hudson.remoting.Request$2.run(Request.java:326)\r\n\tat hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)\r\n\tat java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:166)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)\r\n\tat java.lang.Thread.run(Thread.java:722)\r\nCaused by: org.apache.maven.plugin.MojoExecutionException: An error is occurred in the checkout process: Exception while executing SCM command.\r\n\tat org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:136)\r\n\tat org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)\r\n\t... 27 more\r\nCaused by: org.apache.maven.shared.release.ReleaseExecutionException: An error is occurred in the checkout process: Exception while executing SCM command.\r\n\tat org.apache.maven.shared.release.phase.CheckoutProjectFromScm.execute(CheckoutProjectFromScm.java:151)\r\n\tat org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:343)\r\n\tat org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:289)\r\n\tat org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:269)\r\n\tat org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:132)\r\n\t... 29 more\r\nCaused by: org.apache.maven.scm.ScmException: Exception while executing SCM command.\r\n\tat org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:63)\r\n\tat org.apache.maven.scm.provider.hg.HgScmProvider.checkout(HgScmProvider.java:230)\r\n\tat org.apache.maven.scm.provider.AbstractScmProvider.checkOut(AbstractScmProvider.java:426)\r\n\tat org.apache.maven.scm.provider.AbstractScmProvider.checkOut(AbstractScmProvider.java:403)\r\n\tat org.apache.maven.shared.release.phase.CheckoutProjectFromScm.execute(CheckoutProjectFromScm.java:143)\r\n\t... 33 more\r\nCaused by: org.apache.maven.scm.ScmException: Command could not be executed: /bin/sh -c cd /Users/builds/.jenkins/workspace/cmake/target && hg clone -r release-2.8.10-b1 https://cmake-maven-project.googlecode.com/hg/ /Users/builds/.jenkins/workspace/cmake/target/checkout\r\n\tat org.apache.maven.scm.provider.hg.HgUtils.executeCmd(HgUtils.java:163)\r\n\tat org.apache.maven.scm.provider.hg.HgUtils.execute(HgUtils.java:85)\r\n\tat org.apache.maven.scm.provider.hg.command.checkout.HgCheckOutCommand.executeCheckOutCommand(HgCheckOutCommand.java:78)\r\n\tat org.apache.maven.scm.command.checkout.AbstractCheckOutCommand.executeCommand(AbstractCheckOutCommand.java:81)\r\n\tat org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59)\r\n\t... 37 more\r\nCaused by: org.codehaus.plexus.util.cli.CommandLineException: Error setting up environmental variables\r\n\tat org.codehaus.plexus.util.cli.Commandline.getEnvironmentVariables(Commandline.java:468)\r\n\tat org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:630)\r\n\tat org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:118)\r\n\tat org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:93)\r\n\tat org.apache.maven.scm.provider.hg.HgUtils.executeCmd(HgUtils.java:159)\r\n\t... 41 more\r\nCaused by: java.io.IOException: Cannot run program \"env\": error=2, No such file or directory\r\n\tat java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)\r\n\tat java.lang.Runtime.exec(Runtime.java:615)\r\n\tat java.lang.Runtime.exec(Runtime.java:448)\r\n\tat java.lang.Runtime.exec(Runtime.java:345)\r\n\tat org.codehaus.plexus.util.cli.CommandLineUtils.getSystemEnvVars(CommandLineUtils.java:260)\r\n\tat org.codehaus.plexus.util.cli.CommandLineUtils.getSystemEnvVars(CommandLineUtils.java:226)\r\n\tat org.codehaus.plexus.util.cli.Commandline.addSystemEnvironment(Commandline.java:444)\r\n\tat org.codehaus.plexus.util.cli.Commandline.getEnvironmentVariables(Commandline.java:464)\r\n\t... 45 more\r\nCaused by: java.io.IOException: error=2, No such file or directory\r\n\tat java.lang.UNIXProcess.forkAndExec(Native Method)\r\n\tat java.lang.UNIXProcess.(UNIXProcess.java:135)\r\n\tat java.lang.ProcessImpl.start(ProcessImpl.java:130)\r\n\tat java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)\r\n\t... 52 more\r\n{code}\r\n\r\nAs you can see, the release plugin depends on Plexus Utils and it fails trying to set environment variables.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"65318400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-156/watchers","watchCount":2,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/18877","id":"18877","name":"3.0.8","archived":false,"released":true,"releaseDate":"2012-09-20"}],"customfield_10170":null,"environment":"OSX 10.8.2","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":4,"total":4,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/142924/comment/315978","id":"315978","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=cowwoc","name":"cowwoc","emailAddress":"cowwoc@bbs.darktech.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Gili","active":true},"body":"According to http://youtrack.jetbrains.com/issue/IDEA-52448 \"env\" might not in the PATH. In my case, I see it in /usr/bin/env. It *seems* to be on my PATH.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=cowwoc","name":"cowwoc","emailAddress":"cowwoc@bbs.darktech.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Gili","active":true},"created":"2012-12-19T23:49:37.041-0600","updated":"2012-12-19T23:49:37.041-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/142924/comment/315979","id":"315979","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"This issue is already fixed for 3.0.10, you can upgrade the dependency in the plugin","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2012-12-19T23:55:30.596-0600","updated":"2012-12-19T23:55:30.596-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/142924/comment/315980","id":"315980","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=cowwoc","name":"cowwoc","emailAddress":"cowwoc@bbs.darktech.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Gili","active":true},"body":"Hi Kristian,\r\n\r\nThank you for the quick reply. How do I upgrade the dependency in the plugin (seeing as I did not author it)?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=cowwoc","name":"cowwoc","emailAddress":"cowwoc@bbs.darktech.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Gili","active":true},"created":"2012-12-19T23:59:57.982-0600","updated":"2012-12-19T23:59:57.982-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/142924/comment/315982","id":"315982","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=cowwoc","name":"cowwoc","emailAddress":"cowwoc@bbs.darktech.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Gili","active":true},"body":"Here is what worked for me (in case anyone else runs across this bug report). Simply add this to your pom.xml file:\r\n\r\n{code}\r\n \r\n org.apache.maven.plugins\r\n maven-release-plugin\r\n 2.4\r\n \r\n \r\n org.codehaus.plexus\r\n plexus-utils\r\n 3.0.10\r\n \r\n \r\n \r\n{code}","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=cowwoc","name":"cowwoc","emailAddress":"cowwoc@bbs.darktech.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Gili","active":true},"created":"2012-12-20T01:26:12.453-0600","updated":"2012-12-20T01:26:12.453-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-157.json b/jira/PLXUTILS-157.json new file mode 100644 index 00000000..777eed0b --- /dev/null +++ b/jira/PLXUTILS-157.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"143855","self":"http://jira.codehaus.org/rest/api/latest/issue/143855","key":"PLXUTILS-157","fields":{"progress":{"progress":0,"total":0},"summary":"MXParser.getText() creates strings without intern()","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-157/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=j.kubrynski","name":"j.kubrynski","emailAddress":"jkubrynski@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jakub Kubrynski","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["j.kubrynski(j.kubrynski)","krosenvold(krosenvold)","mkleint(mkleint)","mcculls(mcculls)"],"customfield_10160":null,"updated":"2013-03-12T02:53:26.233-0500","created":"2013-01-30T16:46:22.833-0600","description":"As in summary. Creating new string each time the method is executed results in PermGen error.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"58233600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-157/watchers","watchCount":4,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":5,"total":5,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/143855/comment/321780","id":"321780","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Since we love numbers, I quickly instrumented p-u to see which texts were being created in an arbitrary multi-module build. The following list strings which were instantiated;\r\n\r\n(The first few are whitespace combos and do not render well in jira)\r\n\r\n\r\n\t\t\t\t\t\t:324\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n :632\r\n :614\r\n :673\r\n :292\r\n :1494\r\n :1589\r\n :2249\r\n :2822\r\n :3065\r\n :7480\r\n :3608\r\n :1973\r\n :650\r\n${jetty.version}:314\r\n${plexus.utils.version}:210\r\n${project.version}:1136\r\n${spring.version}:405\r\n+1:310\r\n1.0-SNAPSHOT:221\r\n1.0:326\r\n1.1:244\r\n1.3:289\r\n1.4:298\r\n1.5:396\r\n1.7:202\r\n2.1:300\r\n2.2:261\r\n2.3:275\r\n2.4:263\r\n2.5:314\r\n4.0.0:917\r\nASF:248\r\nCommitter:395\r\nDeveloper:327\r\nJava Developer:222\r\nPMC Member:412\r\nString usage report\r\nUTF-8:240\r\nboolean:221\r\ncommons-logging:254\r\ncompile:254\r\ndefault:286\r\nfalse:1681\r\njar:969\r\njava.lang.String:203\r\njunit:794\r\nlog4j:230\r\nmaven-assembly-plugin:282\r\nmaven-compiler-plugin:318\r\nmaven-gpg-plugin:240\r\nmaven-jar-plugin:314\r\nmaven-javadoc-plugin:523\r\nmaven-jxr-plugin:205\r\nmaven-pmd-plugin:202\r\nmaven-release-plugin:275\r\nmaven-site-plugin:349\r\nmaven-source-plugin:308\r\nmaven-surefire-plugin:386\r\norg.apache.maven.doxia:206\r\norg.apache.maven.plugins:4072\r\norg.apache.maven.wagon:318\r\norg.apache.maven:575\r\norg.apache.wicket:360\r\norg.codehaus.mojo:576\r\norg.codehaus.plexus:1047\r\norg.eclipse.jetty:392\r\norg.seleniumhq.selenium:215\r\norg.slf4j:361\r\norg.springframework:638\r\npackage:230\r\nplexus-utils:383\r\npom:427\r\nprovided:383\r\nrepo:213\r\ntest:1049\r\ntrue:3104\r\n\r\n\r\nlargeDuped = 59770 (number of strings that were instantiated > 200 times)\r\ntotalLarge = 764801 (total #chars that were allocated as a consequence (string.length * numallocs)\r\n\r\noverallDuped = 128597 All strings that were instantiated\r\ntotalOverall = 2230676 #total allocated #chars \r\n\r\nI made no attempt to study who was retaining strings, but it seems fairly obvious that groupid and artifactid are retained...\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2013-03-11T12:55:08.704-0500","updated":"2013-03-11T12:59:32.096-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/143855/comment/321781","id":"321781","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Please note there is some interesting history/discussion at https://github.com/sonatype/plexus-utils/pull/9","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2013-03-11T12:57:56.807-0500","updated":"2013-03-11T12:57:56.807-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/143855/comment/321789","id":"321789","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mkleint","name":"mkleint","emailAddress":"mkleint@codehaus.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Milos Kleint","active":true},"body":"no matter what the solution, for IDE embedding would be great if there were a way share the strings across invokations. eg 20 inter-related projects are likely to share quite a deal of strings but each is loaded individually.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mkleint","name":"mkleint","emailAddress":"mkleint@codehaus.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Milos Kleint","active":true},"created":"2013-03-11T15:30:03.526-0500","updated":"2013-03-11T15:30:03.526-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/143855/comment/321794","id":"321794","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mcculls","name":"mcculls","emailAddress":"mcculls@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Stuart McCulloch","active":true},"body":"I think the modello generator is a good candidate - it generates code that uses MXParser to construct in-memory models and it already has a per-element option to trim strings. A similar per-element intern option would let you specify which elements of the model should be interned (such as the groupId) on a case-by-case basis.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mcculls","name":"mcculls","emailAddress":"mcculls@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Stuart McCulloch","active":true},"created":"2013-03-11T16:06:20.581-0500","updated":"2013-03-11T16:06:20.581-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/143855/comment/321802","id":"321802","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"The numbers in my simple test would seem to indicate approximately 5-10mb generated strings for this arbitrary build. As I understand this, interning a portion of these would simply lead to these being gc'ed on the young generation as opposed to growing older, for a slight drop in overall memory usage for a slight incerease in cpu usage for interning. While it is certainly worth looking into, I am somewhat sceptical to the overall gains in terms of performance; I would definitely like to see some real numbers before making any such flag a reality. I am assuming that we keep references to everything in the pom files, which would seem to indicate interning *whitespace* would be the biggest win ;)","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2013-03-12T02:53:26.233-0500","updated":"2013-03-12T02:53:26.233-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-158.json b/jira/PLXUTILS-158.json new file mode 100644 index 00000000..9bde90a2 --- /dev/null +++ b/jira/PLXUTILS-158.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"146568","self":"http://jira.codehaus.org/rest/api/latest/issue/146568","key":"PLXUTILS-158","fields":{"progress":{"progress":0,"total":0},"summary":"maven-plugin-api:3.0.3 uses different version of org.codehaus.plexus:plexus-utils","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-158/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michibk","name":"michibk","emailAddress":"mbiarnes@redhat.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Biarnes","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["michibk(michibk)"],"customfield_10160":null,"updated":"2013-06-06T09:08:23.288-0500","created":"2013-06-06T09:08:23.288-0500","description":"we use the maven-plugin-api 3.0.3 in our project and as you can see this has different versions of transient dependencies of plexus-utils.\r\n\r\n[WARNING] Rule 2: org.apache.maven.plugins.enforcer.RequireUpperBoundDeps failed with message:\r\nFailed while enforcing RequireUpperBoundDeps. The error(s) are [\r\nRequire upper bound dependencies error for org.codehaus.plexus:plexus-utils:2.0.6 paths to dependency are:\r\n+-org.drools:drools-maven-plugin:6.0.0-SNAPSHOT\r\n +-org.apache.maven:maven-plugin-api:3.0.3\r\n +-org.apache.maven:maven-model:3.0.3\r\n +-org.codehaus.plexus:plexus-utils:2.0.6\r\nand\r\n+-org.drools:drools-maven-plugin:6.0.0-SNAPSHOT\r\n +-org.apache.maven:maven-plugin-api:3.0.3\r\n +-org.apache.maven:maven-artifact:3.0.3\r\n +-org.codehaus.plexus:plexus-utils:2.0.6\r\nand\r\n+-org.drools:drools-maven-plugin:6.0.0-SNAPSHOT\r\n +-org.apache.maven:maven-plugin-api:3.0.3\r\n +-org.sonatype.sisu:sisu-inject-plexus:2.1.1\r\n +-org.codehaus.plexus:plexus-utils:2.0.5\r\nand\r\n+-org.drools:drools-maven-plugin:6.0.0-SNAPSHOT\r\n +-org.apache.maven.plugin-testing:maven-plugin-testing-harness:2.1\r\n +-org.codehaus.plexus:plexus-archiver:2.2\r\n +-org.codehaus.plexus:plexus-utils:3.0.7\r\nand\r\n+-org.drools:drools-maven-plugin:6.0.0-SNAPSHOT\r\n +-org.apache.maven.plugin-testing:maven-plugin-testing-harness:2.1\r\n +-org.codehaus.plexus:plexus-archiver:2.2\r\n +-org.codehaus.plexus:plexus-container-default:1.0-alpha-9-stable-1\r\n +-org.codehaus.plexus:plexus-utils:1.0.4\r\nand\r\n+-org.drools:drools-maven-plugin:6.0.0-SNAPSHOT\r\n +-org.apache.maven.plugin-testing:maven-plugin-testing-harness:2.1\r\n +-org.codehaus.plexus:plexus-archiver:2.2\r\n +-org.codehaus.plexus:plexus-io:2.0.4\r\n +-org.codehaus.plexus:plexus-utils:3.0\r\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"50803200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-158/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"lenovo laptop 16G RAM, Fedora 17","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-159.json b/jira/PLXUTILS-159.json new file mode 100644 index 00000000..92c23462 --- /dev/null +++ b/jira/PLXUTILS-159.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"146897","self":"http://jira.codehaus.org/rest/api/latest/issue/146897","key":"PLXUTILS-159","fields":{"progress":{"progress":0,"total":0},"summary":"Verify length of cmdline per OS","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-159/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=rfscholte","name":"rfscholte","emailAddress":"codehaus@sourcegrounds.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=rfscholte&avatarId=10919","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=rfscholte&avatarId=10919","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=rfscholte&avatarId=10919","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=rfscholte&avatarId=10919"},"displayName":"Robert Scholte","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["rfscholte(rfscholte)"],"customfield_10160":null,"updated":"2013-09-26T14:43:52.530-0500","created":"2013-06-20T13:22:46.586-0500","description":"SCM-723 is an interresting issue: the cmdline fails and the first analyse by the user is that there's a quoting issue. In the end it was the length of the commandline.\r\nPer OS the total length of the cmdline is restricted. It would help a lot if the user was warned when the cmdline exceeds the max length.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"41040000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-159/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/19006","id":"19006","name":"3.0.10","archived":false,"released":true,"releaseDate":"2012-11-28"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/146897/comment/333345","id":"333345","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=rfscholte","name":"rfscholte","emailAddress":"codehaus@sourcegrounds.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=rfscholte&avatarId=10919","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=rfscholte&avatarId=10919","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=rfscholte&avatarId=10919","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=rfscholte&avatarId=10919"},"displayName":"Robert Scholte","active":true},"body":"Here's an interesting link: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx\r\n{quote}\r\nMaximum Path Length Limitation\r\n\r\nIn the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character. For example, the maximum path on drive D is \"D:\\some 256-character path string\" where \"\" represents the invisible terminating null character for the current system codepage. (The characters < > are used here for visual clarity and cannot be part of a valid path string.)\r\n\r\nNote File I/O functions in the Windows API convert \"/\" to \"\\\" as part of converting the name to an NT-style name, except when using the \"\\\\?\\\" prefix as detailed in the following sections.\r\n\r\nThe Windows API has many functions that also have Unicode versions to permit an extended-length path for a maximum total path length of 32,767 characters. This type of path is composed of components separated by backslashes, each up to the value returned in the lpMaximumComponentLength parameter of the GetVolumeInformation function (this value is commonly 255 characters). To specify an extended-length path, use the \"\\\\?\\\" prefix. For example, \"\\\\?\\D:\\very long path\".\r\n\r\nNote The maximum path of 32,767 characters is approximate, because the \"\\\\?\\\" prefix may be expanded to a longer string by the system at run time, and this expansion applies to the total length.\r\n{quote}\r\n\r\nThis would mean, that if an absolute path is used on Windows, the path should be prefixed with \\\\?\\ to allow a longer path. Otherwise it would fail anyhow.\r\n\r\nhttp://support.microsoft.com/kb/830473 tells about the max length of the commandline itself.\r\n{quote}\r\nOn computers running Microsoft Windows XP or later, the maximum length of the string that you can use at the command prompt is 8191 characters. On computers running Microsoft Windows 2000 or Windows NT 4.0, the maximum length of the string that you can use at the command prompt is 2047 characters.\r\n{quote}","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=rfscholte","name":"rfscholte","emailAddress":"codehaus@sourcegrounds.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=rfscholte&avatarId=10919","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=rfscholte&avatarId=10919","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=rfscholte&avatarId=10919","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=rfscholte&avatarId=10919"},"displayName":"Robert Scholte","active":true},"created":"2013-09-26T14:43:52.530-0500","updated":"2013-09-26T14:43:52.530-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-16.json b/jira/PLXUTILS-16.json new file mode 100644 index 00000000..5f105b47 --- /dev/null +++ b/jira/PLXUTILS-16.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"33720","self":"http://jira.codehaus.org/rest/api/latest/issue/33720","key":"PLXUTILS-16","fields":{"progress":{"progress":0,"total":0},"summary":"incorporate \"followSymlinks\" functionality in FileUtils API","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-16/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","minfrin(minfrin)","jdcasey(jdcasey)","kenneyw(kenneyw)"],"customfield_10160":null,"updated":"2012-06-05T16:51:35.989-0500","created":"2006-02-14T12:29:58.514-0600","description":"In order to avoid infinite looping when deleting directories in FileUtils, we should add a \"followSymlinks\" flag to the API to allow people to determine which semantics they want. This will allow the maven-clean-plugin to start using FileUtils instead of its homespun version of the directory delete.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[{"id":"13549","self":"http://jira.codehaus.org/rest/api/2/issueLink/13549","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"33547","key":"MCLEAN-5","self":"http://jira.codehaus.org/rest/api/2/issue/33547","fields":{"summary":"Replace removeDirectory() and delete by FileUtils.deleteDirectory()","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false}}}}],"customfield_10163":"82339200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-16/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":3,"total":3,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/33720/comment/98231","id":"98231","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=kenneyw","name":"kenneyw","emailAddress":"kenney@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=kenneyw&avatarId=12410","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=kenneyw&avatarId=12410","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=kenneyw&avatarId=12410","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=kenneyw&avatarId=12410"},"displayName":"Kenney Westerhof","active":true},"body":"Just out of curiosity - is there a way to detect symlinks in java?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=kenneyw","name":"kenneyw","emailAddress":"kenney@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=kenneyw&avatarId=12410","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=kenneyw&avatarId=12410","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=kenneyw&avatarId=12410","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=kenneyw&avatarId=12410"},"displayName":"Kenney Westerhof","active":true},"created":"2007-06-03T17:03:11.922-0500","updated":"2007-06-03T17:03:11.922-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/33720/comment/128365","id":"128365","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"bq. is there a way to detect symlinks in java?\r\nSomehow: As described in the javadoc for {{[File.getCanonicalPath()|http://java.sun.com/javase/6/docs/api/java/io/File.html#getCanonicalPath()]}}, this method resolves symbolic links, unlike {{File.getAbsolutePath()}}. So, if for a given path the return values from {{getCanonicalPath()}} and {{getAbsolutePath()}} differ, this is likely caused by a symlink. See also the docs for the [Ant symlink task|http://ant.apache.org/manual/OptionalTasks/symlink.html] and the implementation of Plexus' {{DirectoryScanner.isSymbolicLink()}}.\r\n\r\nImplementors of this heuristic need to keep in mind the following cases that can cause false positives for the symlink detection:\r\n- {{getCanonicalPath()}} also performs path normalization (e.g. removing \"..\" references), so any non-normalized input path will be errorneously detected as a symlink.\r\n- On Windows, {{getCanonicalPath()}} performs case corrections to deliver the original case-preserved file path (e.g. \"c:\\POM.XML\" might become \"C:\\pom.xml\"). For this reason, symlink detection should not compare canonical and absolute paths literally using {{String.equals()}} but rather using {{File.equals()}} which will automatically perform a case-insensitive comparison on Windows.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-03-24T05:11:24.245-0500","updated":"2008-03-24T05:11:24.245-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/33720/comment/300445","id":"300445","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=minfrin","name":"minfrin","emailAddress":"minfrin@sharp.fm","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Graham Leggett","active":true},"body":"In theory, this patch should fix this:\r\n\r\nhttp://jira.codehaus.org/browse/PLXUTILS-151","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=minfrin","name":"minfrin","emailAddress":"minfrin@sharp.fm","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Graham Leggett","active":true},"created":"2012-06-05T16:51:35.859-0500","updated":"2012-06-05T16:51:35.859-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-160.json b/jira/PLXUTILS-160.json new file mode 100644 index 00000000..8dddd92b --- /dev/null +++ b/jira/PLXUTILS-160.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"107280","self":"http://jira.codehaus.org/rest/api/latest/issue/107280","key":"PLXUTILS-160","fields":{"progress":{"progress":0,"total":0},"summary":"NullPointerException in directory scanner in case the directory permissions are too restrictive","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-160/votes","votes":1,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=dma_k","name":"dma_k","emailAddress":"dma_k@mail.ru","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dmitry Katsubo","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["dma_k(dma_k)"],"customfield_10160":null,"updated":"2013-08-15T15:47:26.266-0500","created":"2010-03-22T15:58:03.183-0500","description":"Maven fails to perform {{mvn clean}} if directory permissions are too strict. Expected: more descriptive error message.\n\n{code}\n$ ls -ld target\n\nd--x--x--x 2 tavernag tavernag 4096 Mar 15 21:07 target\n{code}\n\n{code}\njava.lang.NullPointerException\n at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:677)\n at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:593)\n at org.apache.maven.shared.model.fileset.util.FileSetManager.scan(FileSetManager.java:659)\n at org.apache.maven.shared.model.fileset.util.FileSetManager.findDeletableDirectories(FileSetManager.java:378)\n at org.apache.maven.shared.model.fileset.util.FileSetManager.findDeletablePaths(FileSetManager.java:365)\n at org.apache.maven.shared.model.fileset.util.FileSetManager.delete(FileSetManager.java:284)\n at org.apache.maven.plugin.clean.CleanMojo.removeDirectory(CleanMojo.java:261)\n at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:173)\n at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)\n at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)\n at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)\n at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)\n at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n at java.lang.reflect.Method.invoke(Method.java:597)\n at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)\n at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)\n at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)\n at org.codehaus.classworlds.Launcher.main(Launcher.java:375)\n{code}","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"151977600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-160/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/19534","id":"19534","name":"3.0.14","archived":false,"released":true,"releaseDate":"2013-08-06"}],"customfield_10170":null,"environment":"Linux Debian 2.6.9, Apache Maven 2.2.1","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-161.json b/jira/PLXUTILS-161.json new file mode 100644 index 00000000..3e8173e0 --- /dev/null +++ b/jira/PLXUTILS-161.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"148945","self":"http://jira.codehaus.org/rest/api/latest/issue/148945","key":"PLXUTILS-161","fields":{"progress":{"progress":0,"total":0},"summary":"Commandline class shell injection vulnerabilities","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-161/votes","votes":1,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/19579","id":"19579","name":"3.0.16","archived":false,"released":true,"releaseDate":"2013-12-21"}],"resolutiondate":"2013-10-23T12:56:05.086-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["charles@dyfis.net(charles@dyfis.net)","gdomjan(gdomjan)","krosenvold(krosenvold)","mizdebsk(mizdebsk)"],"customfield_10160":null,"updated":"2014-01-27T13:47:22.700-0600","created":"2013-09-26T15:36:11.492-0500","description":"The Commandline class in plexus-utils does not correctly quote the contents of double-quoted strings.\r\n\r\nFrankly, it makes more sense to stop using a shell altogether than to try to improve the shell code-generation logic. A patch to do the same is provided.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"30412800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-161/watchers","watchCount":4,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/64134","id":"64134","filename":"use-no-shell-r2.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"created":"2013-09-27T14:51:14.194-0500","size":21555,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/64134/use-no-shell-r2.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/19535","id":"19535","name":"3.0.15","archived":false,"released":true,"releaseDate":"2013-08-19"}],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":19,"total":19,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/333392","id":"333392","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mizdebsk","name":"mizdebsk","emailAddress":"mizdebsk@redhat.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Mikolaj Izdebski","active":true},"body":"Related to a bug in Red Hat bugzilla:\r\nhttps://bugzilla.redhat.com/show_bug.cgi?id=958733","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mizdebsk","name":"mizdebsk","emailAddress":"mizdebsk@redhat.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Mikolaj Izdebski","active":true},"created":"2013-09-27T12:45:04.116-0500","updated":"2013-09-27T12:45:04.116-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/333393","id":"333393","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"body":"Discussion in the Red Hat bugzilla indicates that shell-generation code is explicitly and intentionally used for remote invocations over SSH, and that the given patch bypassing the problem is thus insufficient.\r\n\r\nI do hold that this patch is necessary, but no longer, given this discussion, that it is sufficient.\r\n\r\nI wrote a secure implementation of shell quoting for Rundeck a while back under the Apache 2.0 license -- it's available at https://github.com/charles-dyfis-net/rundeck/commit/093c9d21666d4d56318646924840fa4a7c0e6377. It may be appropriate to adopt that here.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"created":"2013-09-27T13:26:58.306-0500","updated":"2013-09-27T13:26:58.306-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/333395","id":"333395","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"body":"Updated version still avoids shell use for local execution -- but also correctly quotes contents for remote execution, using an extremely conservative (and thus safe) mechanism.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"created":"2013-09-27T14:51:14.204-0500","updated":"2013-09-27T14:51:14.204-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/333576","id":"333576","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"body":"A few comments on why it's safer to use single-quotes everywhere --\r\n\r\nWhile all modern operating systems provide a /bin/sh which complies with POSIX rules, shells are welcome to add new syntax above and beyond what POSIX mandates, and few are rigorously tested to ensure that all of this is completely disabled when invoked as /bin/sh (as is traditionally done for POSIX compatibility mode). bash, zsh and kin add substantial new expansion syntax beyond both POSIX and bash.\r\n\r\nWhile double-quotes allow internal expansions (which can, by nature, include additional expansions added by the local shell above and beyond those mandated by POSIX), single-quotes do not; one cannot have any form of expansion within single-quotes while remaining a POSIX-compatible shell.\r\n\r\nThus, transforming foo to 'foo' is the Right Thing to use in an environment where one trusts that the available shell will be a superset of POSIX, but does not trust it to implement only behavior mandated by POSIX sh proper.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"created":"2013-10-03T13:14:41.915-0500","updated":"2013-10-03T13:14:41.915-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/333975","id":"333975","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"I have reviewed this patch and it looks good to me. I will claim mostly ignorance shell escaping issues, and I just need convincing/explanation of this one thing before I apply the patch:\r\n\r\nHow can we be sure that we're not loosing side effects of the shell startup if we move from wrapping the process in a shell an just using runtime exec directly. Feel free to tell me that I am an idiot to not understand the all the escaping business is about avoiding exactly that. I just need this with a very small spoon....","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2013-10-11T03:06:04.832-0500","updated":"2013-10-11T03:06:04.832-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/334499","id":"334499","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"body":"Apologies about the lag -- wedding and honeymoon intervened.\r\n\r\nAnd yes -- the purpose of the escaping is to prevent side effects from the shell, which using Runtime.exec will similarly (but more efficiently) accomplish.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"created":"2013-10-21T15:10:29.816-0500","updated":"2013-10-21T15:10:29.816-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/334500","id":"334500","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"body":"...well. To be _entirely_ clear, there are other potential side effects from the invocation of a non-interactive, non-login shell, but a lot of them are things that fall under the aegis of \"bugs\", when they're noticed / noticable at all.\r\n\r\nFor instance, environment variables not complying with POSIX standards for allowed shell variable names will be filtered from the environment by some shells, but not others; using Runtime.exec() will suppress this effect, passing the current (or desired) environment through verbatim.\r\n\r\nFor another, having a shell in place can cause signal delivery to be disrupted -- signals intended for the command being run can be eaten by the shell, preventing the command from receiving them. (Suppressing this properly when using sh -c '...' would require sh -c 'exec ...' to be used instead, which would provide behavior closer to Runtime.exec()'s).\r\n\r\nIf ENV or shell-specific analogs such as BASH_ENV are set in the environment, they may specify a file whose commands are sourced by the new shell prior to execution of the desired command. (This is an XSI extension to POSIX, and not guaranteed to be honored on all POSIX systems, so relying on this behavior is generally an undesirable practice).","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"created":"2013-10-21T15:22:04.143-0500","updated":"2013-10-21T15:22:04.143-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/334578","id":"334578","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Applied in b38a1b3a4352303e4312b2bb601a0d7ec6e28f41\r\n\r\nNow for the interesting part;\r\n\r\nThis code is actually forked in various versions, and this is not the \"original\". We have a duplicate under maven-shared-utils http://jira.codehaus.org/browse/MSHARED/component/15606\r\n\r\nIdeally I would like you to reapply thia patch there too; since we are migrating from this version to the maven-shared-utils version (the packages are different, but I suppose most of the actual diff is identical). Alternately you can just submit the existing diff as a patch to a MSHARED issue, and I'll see if I can apply it. But we need a clear record of submission to MSHARED, I can't just move your patch.\r\n\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2013-10-23T12:56:05.183-0500","updated":"2013-10-23T12:56:05.183-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/334579","id":"334579","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"And yeah, thanks for the patch!","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2013-10-23T13:09:39.063-0500","updated":"2013-10-23T13:09:39.063-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/334589","id":"334589","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"body":"Hmm. maven-utils has the addition of translateCommandline(), which doesn't exactly match POSIX shell behavior, but I don't think that any of its divergences are exploitable.\r\n\r\nIts BourneShell implementation, on the other hand, looks to be an exact match for the one where this issue applied.\r\n\r\nNot sure when I'll have a chance to port this patch over -- a bit swamped right now. I'll submit an MSHARED issue immediately, and do the port if it's still incomplete at such time as opportunity permits.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"created":"2013-10-23T15:44:19.464-0500","updated":"2013-10-23T15:44:19.464-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/334591","id":"334591","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"body":"Created MSHARED-297","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"created":"2013-10-23T15:50:07.127-0500","updated":"2013-10-23T15:50:07.127-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/339948","id":"339948","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=gdomjan","name":"gdomjan","emailAddress":"gorf4673@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Greg Domjan","active":true},"body":"3.0.16 appears to have cause regression, command line args are no longer quoted properly.\r\nWorking with versions [1.5.1,3.0.15] - one example original issue was fixed with PLXUTILS-64 originally identified to me through MSHARED-21 ","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=gdomjan","name":"gdomjan","emailAddress":"gorf4673@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Greg Domjan","active":true},"created":"2014-01-23T16:31:14.867-0600","updated":"2014-01-23T16:31:14.867-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/339949","id":"339949","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"body":"Greg, could you construct a test case demonstrating any of these new failure modes? (Otherwise, I'd have to dig into exactly how the tools in question are invoking this code).","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"created":"2014-01-23T17:17:07.637-0600","updated":"2014-01-23T17:17:07.637-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/339954","id":"339954","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=gdomjan","name":"gdomjan","emailAddress":"gorf4673@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Greg Domjan","active":true},"body":"Are you after a plexus unit test case, or something using plexus showing an integration test case?\r\nMy current usage is in https://github.com/GregDomjan/wix-maven-plugin various modules use it, however the example I have from PLXUTILS-164 comes from\r\nhttps://github.com/GregDomjan/wix-maven-plugin/blob/master/src/main/java/net/sf/wix/AbstractLinker.java","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=gdomjan","name":"gdomjan","emailAddress":"gorf4673@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Greg Domjan","active":true},"created":"2014-01-23T19:39:38.479-0600","updated":"2014-01-23T19:39:38.479-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/339955","id":"339955","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"body":"Thanks -- the AbstractLinker use case is exactly what I was looking for.\r\n\r\nThere's some... interesting behavior in there, inasmuch as it appears to be trying to handle a Commandline class that it *assumes* will misbehave, and I'm going to need to dig in a bit to analyze what's going on.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"created":"2014-01-23T19:43:34.796-0600","updated":"2014-01-23T19:43:34.796-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/340219","id":"340219","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"body":"An update --\r\n\r\nI've confirmed that Commandline.exec() is using a local shell in this case. This is contrary to intent -- the code is intended to call Runtime.exec(String[], String[], File) with the list of user-provided commands, with no shell quoting whatsoever applied, in the case in question.\r\n\r\nThe new test suite cases validate that shell quoting is correct when it's performed. What we have here, though, is a case wherein shell quoting isn't being performed at all -- which would be safe and correct if Runtime.exec were being used to invoke the user's argument list without a shell; however, it's happening even when a shell is in use.\r\n\r\nI'm travelling for the next 8 days, and so can't promise as to when continued analysis will have an opportunity to take place.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"created":"2014-01-26T18:26:05.706-0600","updated":"2014-01-26T18:26:49.934-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/340236","id":"340236","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"body":"Trying to determine how I reproduced this behaviour last night -- CNR using the following code:\r\n\r\n{code}\r\n(import '[org.codehaus.plexus.util.cli Commandline])\r\n(doto (Commandline.)\r\n (.addArguments (into-array String [\"printf\" \"%s\\n\" \"hel'lo$cruel\" \"wor'ld\"]))\r\n (.setWorkingDirectory \"/tmp\")\r\n (.execute))\r\n{code}\r\n\r\n...using strace on this command line shows that it's being passed to execve correctly -- no /bin/sh involved.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"created":"2014-01-27T07:05:14.909-0600","updated":"2014-01-27T07:05:14.909-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/340262","id":"340262","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=gdomjan","name":"gdomjan","emailAddress":"gorf4673@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Greg Domjan","active":true},"body":"Thanks for feedback Charles. If I'm understanding correctly so far\r\n* the CommandLine/Execution class should handle an argument containing spaces and also ending with backslash '\\'. \r\n* as such there should have been no need for escaping the backslash in the argument list as that should be done by the CommandLine or execution class based on actually using cmd executor Vs calling execv (or simliar?) api directly.\r\n* wix-maven-plugin should not try and escape the final \\\r\n\r\nFrom the perspective of the wix-maven-plugin\r\nRemoving the escape and using 3.0.16 results in successful execution.\r\nRemoving the escape using 3.0.15 fails.\r\nSo it appears to be my issue that you fixed it and my workaround now breaks - should it be able to end with an arbitrary number of \\ ?\r\n\r\nIn both cases getLog().info(cl.toString()); generates log info like \r\n[INFO] cmd.exe /X /C \"light.exe -out ... -b \"c:\\test repo\\\\\" ... \"\r\n\r\nis 'cmd.exe' an indication of using the command shell rather than execv or is this just a toString representation?\r\n\r\nAs I'm not familiar with the execution path, wondering if the simplification has taken out the cause\r\nWould it have anything to do with how the org.codehaus.plexus.util.cli.CommandLineUtils class calls or configures the Commandline or the Process ? \r\n?Perhaps the example test would better show escaping using - \"hel\\\"lo$cruel wor'ld\\\\\"\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=gdomjan","name":"gdomjan","emailAddress":"gorf4673@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Greg Domjan","active":true},"created":"2014-01-27T12:20:53.808-0600","updated":"2014-01-27T12:20:53.808-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/148945/comment/340266","id":"340266","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"body":"It should be possible to end with an arbitrary number of backslashes, and they should be passed to the target process literally.\r\n\r\nThe .toString() call is definitely generating things which aren't legal/valid, and which also don't correctly represent the actual mechanism used for invocation. I'm going to attempt to look into this as time permits.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=charles%40dyfis.net","name":"charles@dyfis.net","emailAddress":"charles@dyfis.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Charles Duffy","active":true},"created":"2014-01-27T13:47:22.700-0600","updated":"2014-01-27T13:47:22.700-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-162.json b/jira/PLXUTILS-162.json new file mode 100644 index 00000000..1cefc8d7 --- /dev/null +++ b/jira/PLXUTILS-162.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"150232","self":"http://jira.codehaus.org/rest/api/latest/issue/150232","key":"PLXUTILS-162","fields":{"progress":{"progress":0,"total":3600,"percent":0},"summary":"Eclipse crashes while Installing JAR files on Linux","timetracking":{"originalEstimate":"1h","remainingEstimate":"1h","originalEstimateSeconds":3600,"remainingEstimateSeconds":3600},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-162/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"aggregatetimeoriginalestimate":3600,"customfield_10161":["digulla(digulla)","igorfie(igorfie)","jason(jason)","krosenvold(krosenvold)"],"customfield_10160":null,"updated":"2014-01-23T11:12:15.807-0600","created":"2013-11-20T04:26:37.267-0600","description":"The Java VM has a bug which can crash a Java application when reading a corrupt JAR file.\r\n\r\nOne common scenario is running a Maven build parallel with Eclipse. Maven will write JAR files in the repository. If the build is long enough, Eclipse will start picking up those changes and start building itself.\r\n\r\nIf Eclipse happens to try to read a JAR file which Maven is currently writing, then the VM will crash. This sometimes leads to a corrupt Eclipse workspace since the caches containing information about the Java classes will now be in an inconsistent state.\r\n\r\nUsually, Eclipse does recover from those but sometimes, you end up with Eclipse being unable to navigate your Java code.\r\n\r\nThe solution is to write JAR files with a temporary name in {{FileUtils.doCopyFile()}} and rename them after copy was successful.\r\n\r\nSome considerations:\r\n\r\n- This happens on all Unix-like file systems (unlike Windows, they don't lock the file when you change it).\r\n- Not many people are affected but those who are have a hard time to figure out what is going on and how to fix it.\r\n- This bug doesn't cause data corruption but it can and does break Eclipse, making people believe that Eclipse is \"buggy\".\r\n- Writing to a temporary file does need more space on disk. But JAR files are rarely hundreds of megabytes (some WAR files are, though), so that usually shouldn't be a problem.\r\n- The fix doesn't do much on Windows but it also doesn't hurt","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"30758400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-162/watchers","watchCount":4,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":0,"assignee":null,"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/64565","id":"64565","filename":"PLXUTILS-162-JvmCrash.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"created":"2013-11-21T02:40:21.436-0600","size":3637,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/64565/PLXUTILS-162-JvmCrash.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":3600,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/19535","id":"19535","name":"3.0.15","archived":false,"released":true,"releaseDate":"2013-08-19"}],"customfield_10170":null,"environment":null,"timeestimate":3600,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":3600,"percent":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":22,"total":22,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/336040","id":"336040","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"body":"I have a patch but I can't access Github from my workplace. Should I post it here (it's an additional method + 1 line of original code that you need to change, so applying it manually will take only a few seconds)?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"created":"2013-11-20T04:28:45.943-0600","updated":"2013-11-20T04:28:45.943-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/336045","id":"336045","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"You can post it here as plain text","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2013-11-20T05:17:52.888-0600","updated":"2013-11-20T05:17:52.888-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/336092","id":"336092","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"body":"Patch which applies cleanly against b38a1b3a4352303e4312b2bb601a0d7ec6e28f41","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"created":"2013-11-21T02:40:21.458-0600","updated":"2013-11-21T02:40:21.458-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/336093","id":"336093","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"body":"Instructions for people who need a this fix quickly:\r\n\r\n# Checkout plexus-utils from https://github.com/sonatype/plexus-utils\r\n# Apply the attached patch\r\n# mvn install\r\n# Change your parent pom and add this to the {{pluginManagement}}:\r\n\r\n{code}\r\n\r\n org.apache.maven.plugins\r\n maven-install-plugin\r\n 2.5.1\r\n \r\n \r\n \r\n org.codehaus.plexus\r\n plexus-utils\r\n 3.0.16-SNAPSHOT\r\n \r\n \r\n\r\n{code}\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"created":"2013-11-21T02:43:24.485-0600","updated":"2013-11-21T02:43:24.485-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/336313","id":"336313","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"body":"Note: I would prefer a solution where the install plugin would create a temporary folder for all artifacts and then makes them all visible to consumers with a single rename but looking at the code of the plugin, I didn't see a simple solution to achieve that.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"created":"2013-11-25T07:41:06.052-0600","updated":"2013-11-25T07:41:06.052-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/336525","id":"336525","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"body":"Any feedback on this one? Is the patch good/bad?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"created":"2013-11-29T04:14:18.689-0600","updated":"2013-11-29T04:14:18.689-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/336531","id":"336531","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"This patch is definitely not going in as standard behaviour for copyFile. We might consider making atomicCopyFile public instead and use this from the proper place instead. I will try to take a closer look at this issue this weekend","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2013-11-29T05:51:06.760-0600","updated":"2013-11-29T05:51:06.760-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/336647","id":"336647","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"body":"Please share your reasons for this decision. From my experience, the original code causes subtle bugs that are really hard to track down and reproduce (like incomplete files when free space gets tight or corrupt files on non-locking file systems).","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"created":"2013-12-03T03:31:38.880-0600","updated":"2013-12-03T03:31:38.880-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/336727","id":"336727","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"copyFile is a generic file copy function; adding this behavior there is too much of a hack and it would come into effect in numerous other (unintended) places.\r\n\r\nAre you using maven 2.2.1 ? The install logic in 3.X does not appear to be using this library at all (to my knowledge it uses org.apache.maven.artifact.installer.DefaultArtifactInstaller#install and DefaultFileProcessor#copy in aether)","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2013-12-04T00:58:43.487-0600","updated":"2013-12-04T00:58:43.487-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/338220","id":"338220","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"body":"Sorry for the long delay; I was on holidays.\r\n\r\nFirst of all, in the mind of many developers, \"copy\" is assumed to be atomic. It really isn't and most people know this but it often takes a bug like this one to remind them to handle this case correctly.\r\n\r\nSecondly, copy really should be atomic - there is not a single use case where it being non-atomic makes sense. Streaming isn't copying - when I write to stdout, I don't expect all the output to become visible to the consumers all at once. But Stackoverflow.com is full of questions \"how can I know that a process has finished writing a file\" which indicates to me that the current default behavior of all programming languages is bad.\r\n\r\nLastly, while it slightly changes the behavior of a lot of code, I would be interesting in any scenarios where my patch could actually break anything. As I said, it does waste a bit of disk space but it does clean up after itself properly.\r\n\r\nSo for me, you saying \"it's a hack\" feels like you don't want to say \"I'm afraid what this change might cause\".\r\n\r\nI'm using Maven 3.0.5 with the maven-install-plugin 2.5.1. When I run mvn with -X, I see that my version of plexus-utils is picked up.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"created":"2014-01-08T04:10:01.310-0600","updated":"2014-01-08T04:10:01.310-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/338228","id":"338228","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Just do the right thing and I can assure you all the patches will be applied. ","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2014-01-08T05:16:27.117-0600","updated":"2014-01-08T05:16:27.117-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/338239","id":"338239","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"body":"I had a look at the sources once more. In my case, {{DefaultArtifactInstaller}} from {{~/.m2/repository/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6.jar}} is being used when I open the source in Eclipse.\r\n\r\nLine 32 reads: {{FileUtils.copyFile( source, destination );}}\r\n\r\nAs for \"just do the right thing\": I use hundreds of OSS projects every day and I simply can't afford to learn the rules of each one of them. So it's either filing bug reports and getting some love back or giving up for me :-)\r\n\r\nAlong the same lines, it doesn't help that your \"right thing\" will never be my \"right thing.\"","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"created":"2014-01-08T06:45:07.740-0600","updated":"2014-01-08T07:09:28.029-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/338303","id":"338303","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"body":"I am on the fence about this patch. On one hand, I agree with Aaron that all users FileUtils.copyFile expect atomic behaviour. On the other hand, I don't believe the attached patch covers all interesting cases. I am particularly concerned about concurrent invocation of FileUtils.copyFile from multiple threads/processes for the same destination file. Cleanup after process crashes is another concern.\r\n\r\nI am also not sure I understand the purpose of backup file. This seems like new and unexpected feature.\r\n\r\nAlso, I wonder if we can use jdk7 atomic move, without breaking compatibility with earlier java versions of course.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"created":"2014-01-09T07:03:18.586-0600","updated":"2014-01-09T07:03:18.586-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/338309","id":"338309","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jason","name":"jason","emailAddress":"jason@takari.io","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jason van Zyl","active":true},"body":"Or just slowly replace the code in Plexus with Guava. I just ran into a concurrency issue in FileUtils.copyDirectory a couple days ago and replaced it with some Guava code and it was fine. If we're going to slowly get rid of Plexus we should use Guava (that's my strong preference) or Commons code. This stuff has been fixed elsewhere. Definitely in Guava.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jason","name":"jason","emailAddress":"jason@takari.io","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jason van Zyl","active":true},"created":"2014-01-09T08:27:49.511-0600","updated":"2014-01-09T08:27:49.511-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/338310","id":"338310","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"body":"Do you suggest adding Guava as plexus-utils dependency (possible shaded, to avoid conflicts)? Otherwise it is up to individual plexus-utils consumers to migrate and we still need to support existing clients.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"created":"2014-01-09T09:06:53.930-0600","updated":"2014-01-09T09:06:53.930-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/338311","id":"338311","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"body":"Re multi-threading: It's rare that a low-level helper function can handle the necessary locking for multiple threads. I think this would be a nice thing to have but clearly out of scope here unless we completely revamp the API.\r\n\r\nThe purpose of the backup file is to be able to roll back several copies if one of them fails. It's useless in the patch and can be removed - I just copied the code from my source base and massaged it a bit for your API.\r\n\r\nBut if we think that installing an artifact with all the related files is one atomic operation, then using backup files would allow us to write each file individually (instead of having to synchronize all the writes and then rename all of them in one loop in a postprocessor).\r\n\r\nGuava's {{Files.copy()}} also isn't atomic but it's easier to fix; a custom {{OutputSupplier}} would solve the issue.\r\n\r\nAs a side note: I use my own {{File*Stream}} and similar classes which keep a copy of the file name so I can create better error messages. But I felt that such a change would be way too disruptive, so I didn't mention it before.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"created":"2014-01-09T09:10:58.156-0600","updated":"2014-01-09T09:10:58.156-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/338312","id":"338312","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"body":"I think using File.createTempFile(destination.getName(), \".tmp\", destination.getParentFile()) together with jdk7 atomic move will make this multi- thread/process safe without changing API. Everyone is using jdk7 anyways, so degraded behaviour on older java versions is mostly a theoretical problem at this point.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"created":"2014-01-09T09:34:47.645-0600","updated":"2014-01-09T09:34:47.645-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/338314","id":"338314","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jason","name":"jason","emailAddress":"jason@takari.io","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jason van Zyl","active":true},"body":"@Aaron, where Plexus failed Guava worked for me in a highly concurrent build. I didn't look at the code in Guava it just tends to work for me.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jason","name":"jason","emailAddress":"jason@takari.io","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jason van Zyl","active":true},"created":"2014-01-09T10:01:54.548-0600","updated":"2014-01-09T10:01:54.548-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/338322","id":"338322","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"body":"@Igor: We just barely upgraded from Java 5, so I resent your comment :-) Some of our customers complain for our lack of support for Java 1.4.\r\n\r\n{{File.createTempFile()}} sounds like a nice idea; only my experience is that a bug prevents the rename of the temp file (Windows loves to keep a lock on temp files) and then your target folder fills up with temporary files. My version is more simple and it eventually cleans up temporary files.\r\n\r\n@Jason: Yes, Guava solves a lot of problems. We're also migrating to it. But I have already seen a few of places where theory and OO religion was more important than practice, so I'm not a 100% dedicated fan of it anymore.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"created":"2014-01-09T10:31:44.264-0600","updated":"2014-01-09T10:31:44.264-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/338325","id":"338325","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Guava might be nice, but to be honest solving this issue in p-u is a bit of a lost cause. \r\n\r\nThe *real* problem that should be fixed is that whatever eclipse code you're using should be updated to use a maven 3.1+ implementation. Even then, the underlying file copy problem needs to be solved for aether, since the same problem still exists in aether (which uses its own internal file-copy code btw :).\r\n\r\nThe code you're using uses maven 2.0.9, and that oldest version one could *hope* to be patched is a future maven 2.2.2. Even then, the 2.2.X range is mostly being patched for security fixes, which might even mean the plexus-utils upgrade might be skipped. If we apply anything like this patch to plexus-utils it would be at least version 3.0.16 (which has a jdk 1.5 requirement).\r\n\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2014-01-09T11:04:10.777-0600","updated":"2014-01-09T11:04:10.777-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/338599","id":"338599","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"body":"I need some help to come up with a new patch. When I check out maven-install-plugin 2.5.1, then there is no dependency on anything called \"aether\". What's aether, where can I find it and where is the connection between it and the install plugin?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"created":"2014-01-13T04:59:00.713-0600","updated":"2014-01-13T04:59:00.713-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/150232/comment/339890","id":"339890","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"body":"@Kristian: I think you still misunderstand what this bug is about. Aether (as in the Eclipse plugin) is not involved. In fact, you can achieve the same result by starting Eclipse and creating project which depends on a JAR file on the hard disk.\r\n\r\nIf you create a shell script which copies over the JAR file in a loop, the Java VM will eventually crash. Any Java program that accesses JAR files is vulnerable to this. It's a bug in the code which reads ZIP archives when the ZIP archive is corrupt.\r\n\r\nIt's not limited to Eclipse, it's not related to the m2e plugin.\r\n\r\nThe code I patched is used in Maven 3.0.x. If I add a `System.out.println()` in plexus-utils, then I see it when I run Maven from the command line.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=digulla","name":"digulla","emailAddress":"digulla@hepe.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Aaron Digulla","active":true},"created":"2014-01-23T11:11:13.678-0600","updated":"2014-01-23T11:12:15.535-0600"}]},"timeoriginalestimate":3600,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-163.json b/jira/PLXUTILS-163.json new file mode 100644 index 00000000..4d2c2328 --- /dev/null +++ b/jira/PLXUTILS-163.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"151116","self":"http://jira.codehaus.org/rest/api/latest/issue/151116","key":"PLXUTILS-163","fields":{"progress":{"progress":0,"total":0},"summary":"DirectoryWalker: sort traversed files to have reproducible and predictable walking order","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-163/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pkozelka","name":"pkozelka","emailAddress":"pkozelka@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Petr Kozelka","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["pkozelka(pkozelka)"],"customfield_10160":null,"updated":"2014-07-12T04:12:58.504-0500","created":"2014-01-09T17:13:01.279-0600","description":"The pull request #13 ( https://github.com/sonatype/plexus-utils/pull/13 ) adds a property \"sorted\" that sorts the directory during walking the tree.\r\n\r\nIt might be also a default behavior, but I am not sure about performance impact so I made it turned off by default.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"16156800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-163/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":["wish"],"workratio":-1,"assignee":null,"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/66159","id":"66159","filename":"PLXUTILS-163-sortedWalker.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pkozelka","name":"pkozelka","emailAddress":"pkozelka@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Petr Kozelka","active":true},"created":"2014-07-12T04:12:58.447-0500","size":2156,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/66159/PLXUTILS-163-sortedWalker.diff"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":"https://github.com/sonatype/plexus-utils/pull/13","aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/19535","id":"19535","name":"3.0.15","archived":false,"released":true,"releaseDate":"2013-08-19"}],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/151116/comment/349559","id":"349559","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pkozelka","name":"pkozelka","emailAddress":"pkozelka@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Petr Kozelka","active":true},"body":"patch for the pull-request https://github.com/sonatype/plexus-utils/pull/13 ","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pkozelka","name":"pkozelka","emailAddress":"pkozelka@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Petr Kozelka","active":true},"created":"2014-07-12T04:12:58.471-0500","updated":"2014-07-12T04:12:58.471-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-164.json b/jira/PLXUTILS-164.json new file mode 100644 index 00000000..d08db1a7 --- /dev/null +++ b/jira/PLXUTILS-164.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"151507","self":"http://jira.codehaus.org/rest/api/latest/issue/151507","key":"PLXUTILS-164","fields":{"progress":{"progress":0,"total":0},"summary":"Command line not quoted","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-164/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=gdomjan","name":"gdomjan","emailAddress":"gorf4673@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Greg Domjan","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["gdomjan(gdomjan)"],"customfield_10160":null,"updated":"2014-01-23T16:29:45.565-0600","created":"2014-01-23T16:29:45.565-0600","description":"Working [1.5.1,3.0.15]\r\n\r\nFrom a cmd, the following works when directly executed\r\nlight.exe -b \"C:\\Data\\S pace\\.m2\\repository\\..\\narrepository\\\\\" -b \"C:\\Data\\S pace\\.m2\\repository\\com\\sun\\java\\accessibility\\jaccess\\1.3\\\\\" some.wixobj\r\n\r\nHowever when run using Commandline and org.codehaus.plexus.util.cli.CommandLineUtils\r\n\r\n[INFO] cmd.exe /X /C \"light.exe -b \"C:\\Data\\S pace\\.m2\\repository\\..\\narrepository\\\\\" -b \"C:\\Data\\S pace\\.m2\\repository\\com\\sun\\java\\accessibility\\jaccess\\1.3\\\\\" some.wixobj\"\r\n\r\n[ERROR] light.exe : error LGHT0117 : Your file or directory path 'C:\\Data\\S pace\\.m2\\repository\\..\\narrepository\\\" -b C:\\Data\\S' cannot contain a quote.\r\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"30758400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-164/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":["regression"],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/19579","id":"19579","name":"3.0.16","archived":false,"released":true,"releaseDate":"2013-12-21"}],"customfield_10170":null,"environment":"Windows (2008/7)","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-165.json b/jira/PLXUTILS-165.json new file mode 100644 index 00000000..4dfcf704 --- /dev/null +++ b/jira/PLXUTILS-165.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"156757","self":"http://jira.codehaus.org/rest/api/latest/issue/156757","key":"PLXUTILS-165","fields":{"progress":{"progress":0,"total":0},"summary":"Improve semantics of followSymlinks","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-165/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/20654","id":"20654","name":"3.0.18","archived":false,"released":true,"releaseDate":"2014-09-27"}],"resolutiondate":"2014-09-27T03:42:51.646-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["krosenvold(krosenvold)"],"customfield_10160":null,"updated":"2014-09-27T03:43:14.035-0500","created":"2014-09-27T02:42:27.205-0500","description":"See MSHARED-350","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"35860","self":"http://jira.codehaus.org/rest/api/2/issueLink/35860","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"156756","key":"MSHARED-350","self":"http://jira.codehaus.org/rest/api/2/issue/156756","fields":{"summary":"Improve semantics of followSymlinks","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"9504000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-165/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/156757/comment/353303","id":"353303","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Fixed in 6eb7fdfb83c5b83901e99322785dfb3ed8dd11ec","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2014-09-27T03:42:51.724-0500","updated":"2014-09-27T03:42:51.724-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/156757/comment/353304","id":"353304","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"While m-s-u was correct on this, p-u wasn't","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2014-09-27T03:43:14.035-0500","updated":"2014-09-27T03:43:14.035-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-166.json b/jira/PLXUTILS-166.json new file mode 100644 index 00000000..b23dc4b9 --- /dev/null +++ b/jira/PLXUTILS-166.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"156925","self":"http://jira.codehaus.org/rest/api/latest/issue/156925","key":"PLXUTILS-166","fields":{"progress":{"progress":0,"total":0},"summary":"Case insensitive environment block build incorrectly","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-166/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=dmaslakov","name":"dmaslakov","emailAddress":"dmaslakov@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dmitry Maslakov","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["dmaslakov(dmaslakov)"],"customfield_10160":null,"updated":"2014-10-02T02:31:07.351-0500","created":"2014-10-02T02:31:07.351-0500","description":"Method org.codehaus.plexus.util.cli.Commandline#addSystemEnvironment does not take into account the case insensitive environment variables. It results with following:\r\n\r\n- create Commandline object\r\n- call addEvironment(\"Path\", ...)\r\n- then call execute() (which performs merging of own vars with system vars)\r\n\r\nThe process will be created with two vars: Path and PATH.\r\nEspecially for the PATH environment variable Windows will fail to find the correct DLLs.\r\n\r\nThere could be other places where case insensitive vars are broken.\r\n\r\nThe workaround is using uppercase vars on Windows when calling addEnvironment.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"9072000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-166/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/20654","id":"20654","name":"3.0.18","archived":false,"released":true,"releaseDate":"2014-09-27"}],"customfield_10170":null,"environment":"Windows","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-167.json b/jira/PLXUTILS-167.json new file mode 100644 index 00000000..656fac2b --- /dev/null +++ b/jira/PLXUTILS-167.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"157301","self":"http://jira.codehaus.org/rest/api/latest/issue/157301","key":"PLXUTILS-167","fields":{"progress":{"progress":0,"total":0},"summary":"ReflectionValueExctractor regression on root descriptors","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-167/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/20655","id":"20655","name":"3.0.19","archived":false,"released":true,"releaseDate":"2014-10-18"}],"resolutiondate":"2014-10-18T07:05:27.471-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["krosenvold(krosenvold)"],"customfield_10160":null,"updated":"2014-10-18T12:32:40.989-0500","created":"2014-10-18T04:16:37.303-0500","description":"Several unit tests in maven plugins fail due to this. IT basically does not evaluate an expression like \"description\" properly","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"36000","self":"http://jira.codehaus.org/rest/api/2/issueLink/36000","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"157307","key":"MSHARED-369","self":"http://jira.codehaus.org/rest/api/2/issue/157307","fields":{"summary":"ReflectionValueExtractor regression; incorrect parsing","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"7689600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-167/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/19579","id":"19579","name":"3.0.16","archived":false,"released":true,"releaseDate":"2013-12-21"},{"self":"http://jira.codehaus.org/rest/api/2/version/20653","id":"20653","name":"3.0.17","archived":false,"released":true,"releaseDate":"2014-01-27"},{"self":"http://jira.codehaus.org/rest/api/2/version/20654","id":"20654","name":"3.0.18","archived":false,"released":true,"releaseDate":"2014-09-27"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/157301/comment/354577","id":"354577","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Fixed in 0bde0ac31bd1749405251083077a4fd9edadd0f6.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2014-10-18T07:05:27.537-0500","updated":"2014-10-18T07:05:27.537-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-168.json b/jira/PLXUTILS-168.json new file mode 100644 index 00000000..5cf0bd5c --- /dev/null +++ b/jira/PLXUTILS-168.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"157313","self":"http://jira.codehaus.org/rest/api/latest/issue/157313","key":"PLXUTILS-168","fields":{"progress":{"progress":0,"total":0},"summary":"Compatibility break InterpolationFilterReader when adding generics","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-168/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/20701","id":"20701","name":"3.0.20","archived":false,"released":true,"releaseDate":"2014-10-18"}],"resolutiondate":"2014-10-18T15:27:29.109-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["krosenvold(krosenvold)"],"customfield_10160":null,"updated":"2014-10-18T15:27:29.223-0500","created":"2014-10-18T15:24:18.407-0500","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"7603200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-168/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/20655","id":"20655","name":"3.0.19","archived":false,"released":true,"releaseDate":"2014-10-18"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-169.json b/jira/PLXUTILS-169.json new file mode 100644 index 00000000..8c27c142 --- /dev/null +++ b/jira/PLXUTILS-169.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"151069","self":"http://jira.codehaus.org/rest/api/latest/issue/151069","key":"PLXUTILS-169","fields":{"progress":{"progress":0,"total":0},"summary":"Annotate IOUtil.close method with @WillClose","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-169/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mickael.istria","name":"mickael.istria","emailAddress":"mistria@redhat.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Mickael Istria","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["mickael.istria(mickael.istria)"],"customfield_10160":null,"updated":"2014-10-23T23:11:51.978-0500","created":"2014-01-08T02:49:51.227-0600","description":"I analyze some Maven plugins with Sonar, and I often see reports about streams that are not closed although I use IOUtil.close(stream).\r\nFindBugs seems to understand jsr-305 and it look likes annotating the IOUtil.close() method would prevent FindBugs and family from sending a false positive.\r\n\r\nCan you please annotate the IOUtil.close() method with @WillClose from JSR-305 ?\r\nIt's quite a small change, but by preventing false positive, it helps to highlight better real issues and benefit from static analysis. ","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"32140800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-169/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-17.json b/jira/PLXUTILS-17.json new file mode 100644 index 00000000..be73e450 --- /dev/null +++ b/jira/PLXUTILS-17.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"34940","self":"http://jira.codehaus.org/rest/api/latest/issue/34940","key":"PLXUTILS-17","fields":{"progress":{"progress":18000,"total":18000,"percent":100},"summary":"A new method that copies only source files that are newer compated to target files","timetracking":{"originalEstimate":"2h","remainingEstimate":"0m","timeSpent":"5h","originalEstimateSeconds":7200,"remainingEstimateSeconds":0,"timeSpentSeconds":18000},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-17/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14038","id":"14038","description":"","name":"1.2","archived":false,"released":true,"releaseDate":"2006-04-19"}],"resolutiondate":"2006-03-16T07:18:59.177-0600","customfield_10210":"1.0","timespent":18000,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jtolentino","name":"jtolentino","emailAddress":"john.tolentino@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Tolentino","active":true},"aggregatetimeoriginalestimate":7200,"customfield_10161":["evenisse(evenisse)","jtolentino(jtolentino)"],"customfield_10160":null,"updated":"2008-02-02T15:57:58.344-0600","created":"2006-03-16T06:13:26.074-0600","description":"Need this to resolve MWAR-26. The FileUtil is used to copy files but it overwrites even up-to-date (e.g. web.xml) files. A need for a copy method that copies only newer (based on timestamp) files for faster deployment of exploded wars.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"278726400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-17/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":2,"worklogs":[{"self":"http://jira.codehaus.org/rest/api/2/issue/34940/worklog/61220","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jtolentino","name":"jtolentino","emailAddress":"john.tolentino@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Tolentino","active":true},"updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jtolentino","name":"jtolentino","emailAddress":"john.tolentino@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Tolentino","active":true},"comment":"New methods and unit tests for copying only updated files to directories.","created":"2006-03-16T06:45:36.469-0600","updated":"2006-03-16T06:45:36.469-0600","started":"2006-03-16T06:45:36.469-0600","timeSpent":"1h","timeSpentSeconds":3600,"id":"61220"},{"self":"http://jira.codehaus.org/rest/api/2/issue/34940/worklog/61359","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jtolentino","name":"jtolentino","emailAddress":"john.tolentino@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Tolentino","active":true},"updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jtolentino","name":"jtolentino","emailAddress":"john.tolentino@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Tolentino","active":true},"comment":"Configured a Linux machine to run Maven 2. Investigated cause of test failure and fixed bug.","created":"2006-03-17T02:18:55.094-0600","updated":"2006-03-17T02:18:55.094-0600","started":"2006-03-17T02:18:55.094-0600","timeSpent":"4h","timeSpentSeconds":14400,"id":"61359"}]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":250,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jtolentino","name":"jtolentino","emailAddress":"john.tolentino@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Tolentino","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/19656","id":"19656","filename":"PLX-205-plexus-utils.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jtolentino","name":"jtolentino","emailAddress":"john.tolentino@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Tolentino","active":true},"created":"2006-03-16T06:43:12.087-0600","size":9799,"mimeType":"application/octet-stream","content":"http://jira.codehaus.org/secure/attachment/19656/PLX-205-plexus-utils.diff"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":0,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":0,"customfield_10130":null,"aggregateprogress":{"progress":18000,"total":18000,"percent":100},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":3,"total":3,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/34940/comment/61219","id":"61219","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jtolentino","name":"jtolentino","emailAddress":"john.tolentino@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Tolentino","active":true},"body":"Found out the need for a method that copies to directories if a file is modified. Supplied unit tests for these as well.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jtolentino","name":"jtolentino","emailAddress":"john.tolentino@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Tolentino","active":true},"created":"2006-03-16T06:43:12.130-0600","updated":"2006-03-16T06:43:12.130-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/34940/comment/61223","id":"61223","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"body":"Applied.\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"created":"2006-03-16T07:18:59.165-0600","updated":"2006-03-16T07:18:59.165-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/34940/comment/61358","id":"61358","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jtolentino","name":"jtolentino","emailAddress":"john.tolentino@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Tolentino","active":true},"body":"A Linux-specific bug in the unit test caused a test failure. Bugfix was done and code was updated.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jtolentino","name":"jtolentino","emailAddress":"john.tolentino@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Tolentino","active":true},"created":"2006-03-17T02:17:17.682-0600","updated":"2006-03-17T02:17:17.682-0600"}]},"timeoriginalestimate":7200,"aggregatetimespent":18000}} \ No newline at end of file diff --git a/jira/PLXUTILS-170.json b/jira/PLXUTILS-170.json new file mode 100644 index 00000000..cd6f3c69 --- /dev/null +++ b/jira/PLXUTILS-170.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"130642","self":"http://jira.codehaus.org/rest/api/latest/issue/130642","key":"PLXUTILS-170","fields":{"progress":{"progress":0,"total":0},"summary":"Please add new exclusion to DEFAULTEXCLUDES","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/5","id":"5","description":"General wishlist item","iconUrl":"http://jira.codehaus.org/images/icons/improvement.gif","name":"Wish","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-170/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=adanilenko","name":"adanilenko","emailAddress":"adanilenko@serena.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Artem Danilenko","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["adanilenko(adanilenko)"],"customfield_10160":null,"updated":"2014-10-23T23:13:42.861-0500","created":"2011-10-19T05:18:01.654-0500","description":"Serena Dimension currently have new scm files storage in .dm folder, So please add **/.dm and **/.dm/** to AbstractScanner.DEFAULTEXCLUDES. Previous storage (.metadata) is still supported - so shoild not be removed.\r\n\r\nThanks","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"102297600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-170/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-171.json b/jira/PLXUTILS-171.json new file mode 100644 index 00000000..63238c88 --- /dev/null +++ b/jira/PLXUTILS-171.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"157612","self":"http://jira.codehaus.org/rest/api/latest/issue/157612","key":"PLXUTILS-171","fields":{"progress":{"progress":0,"total":0},"summary":".gitignore can't be included by includes","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-171/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=khmarbaise","name":"khmarbaise","emailAddress":"codehaus@soebes.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=khmarbaise&avatarId=10920","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=khmarbaise&avatarId=10920","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=khmarbaise&avatarId=10920","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=khmarbaise&avatarId=10920"},"displayName":"Karl-Heinz Marbaise","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["khmarbaise(khmarbaise)"],"customfield_10160":null,"updated":"2014-11-01T17:39:18.465-0500","created":"2014-11-01T17:36:52.142-0500","description":"If i define an include \".gitignore\" it will not being picked up by the DirectoryScanner. I think it's related to the DEFAULT_EXCLUDES which contains \".gitignore\"....\r\nIf i define to include \".gitignore\" it should be in my opinion returned.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"6393600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-171/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/20701","id":"20701","name":"3.0.20","archived":false,"released":true,"releaseDate":"2014-10-18"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/157612/comment/355412","id":"355412","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=khmarbaise","name":"khmarbaise","emailAddress":"codehaus@soebes.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=khmarbaise&avatarId=10920","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=khmarbaise&avatarId=10920","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=khmarbaise&avatarId=10920","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=khmarbaise&avatarId=10920"},"displayName":"Karl-Heinz Marbaise","active":true},"body":"Added pull request to show the failure.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=khmarbaise","name":"khmarbaise","emailAddress":"codehaus@soebes.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=khmarbaise&avatarId=10920","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=khmarbaise&avatarId=10920","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=khmarbaise&avatarId=10920","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=khmarbaise&avatarId=10920"},"displayName":"Karl-Heinz Marbaise","active":true},"created":"2014-11-01T17:39:18.465-0500","updated":"2014-11-01T17:39:18.465-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-172.json b/jira/PLXUTILS-172.json new file mode 100644 index 00000000..32a13cb5 --- /dev/null +++ b/jira/PLXUTILS-172.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"157864","self":"http://jira.codehaus.org/rest/api/latest/issue/157864","key":"PLXUTILS-172","fields":{"progress":{"progress":0,"total":0},"summary":"Make CopyFile use NIO copyFile (java 7) if available","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-172/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/20702","id":"20702","name":"3.0.21","archived":false,"released":true,"releaseDate":"2014-11-14"}],"resolutiondate":"2014-11-14T12:17:50.898-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["krosenvold(krosenvold)"],"customfield_10160":null,"updated":"2014-11-14T12:17:50.950-0600","created":"2014-11-14T12:08:55.601-0600","description":"Using NIO copy preserves all attributes and file creation date.\r\n\r\nIt's going to be interesting to see if this breaks anything","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"5270400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-172/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/20701","id":"20701","name":"3.0.20","archived":false,"released":true,"releaseDate":"2014-10-18"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/157864/comment/356172","id":"356172","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Fixed in 840c72371bdc154a2638627aa898b60151736517","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2014-11-14T12:17:50.946-0600","updated":"2014-11-14T12:17:50.946-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-173.json b/jira/PLXUTILS-173.json new file mode 100644 index 00000000..741a92dc --- /dev/null +++ b/jira/PLXUTILS-173.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"158513","self":"http://jira.codehaus.org/rest/api/latest/issue/158513","key":"PLXUTILS-173","fields":{"progress":{"progress":0,"total":0},"summary":"CLONE - FileUtils.copyFile() ignores 'overwrite' when 'wrappers' (FilterWrappers[]) is non-empty","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-173/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ntshko","name":"ntshko","emailAddress":"hannes.kogler@ntswincash.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Hannes Kogler","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["ntshko(ntshko)"],"customfield_10160":null,"updated":"2014-12-16T06:01:15.191-0600","created":"2014-12-16T05:51:56.469-0600","description":"maven-resource-plugin is copying a resource even if it is unchanged and 'overwrite' is false. See http://stackoverflow.com/questions/3970157/is-there-a-way-to-force-maven-to-copy-resource-folder-changes-incrementally/5914467#5914467\r\n\r\nI chased the problem down to org.codehaus.plexus.util.FileUtils.copyFile() method. It is this method that is called by the maven-resource-plugin to ultimately copy the resource; the copyFile() method takes an 'overwrite' parameter, which the resource-plugin does pass in (and the default is indeed false), BUT...\r\n\r\nThe copyFile() method ignores the 'overwrite' parameter if the list of filter-wrappers passed is non-empty! And if you have filtering set to true for your resources, this list is indeed non-empty.\r\n\r\nI can understand the reasoning behind copyFile() ignoring the 'overwrite': just because the destination file is newer does not mean that new filtered-file will be the same (i.e. the values for the variables in your resource file may have been changed since the last filtering). \r\nIgnoring the 'overwrite' flag is \"convenient\" for the FileUtils implementor. But this comes at a great price; a single resource file unnecessarily updated can trigger off time-consuming but redundant processes (i.e. rebuilding a jar-with-dependencies in my case). This may only be a few seconds but can be enough to disrupt the flow of an intensive code-compile-test cycle.\r\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"duedate":null,"issuelinks":[{"id":"36320","self":"http://jira.codehaus.org/rest/api/2/issueLink/36320","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"125181","key":"PLXUTILS-139","self":"http://jira.codehaus.org/rest/api/2/issue/125181","fields":{"summary":"FileUtils.copyFile() ignores 'overwrite' when 'wrappers' (FilterWrappers[]) is non-empty","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"2592000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-173/watchers","watchCount":4,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17149","id":"17149","description":"","name":"2.0.7","archived":false,"released":true,"releaseDate":"2011-03-03"},{"self":"http://jira.codehaus.org/rest/api/2/version/19535","id":"19535","name":"3.0.15","archived":false,"released":true,"releaseDate":"2013-08-19"}],"customfield_10170":null,"environment":"Windows","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/158513/comment/359151","id":"359151","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ntshko","name":"ntshko","emailAddress":"hannes.kogler@ntswincash.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Hannes Kogler","active":true},"body":"this problem still exists, and makes maven UNUSABLE in IDEs like Eclipse (m2e) for big projects with many child module projects, because of *build times of over 30min and more* for just one single change!\r\n\r\nThere should be an option to the resources plugin where you can set if the overwrite flag should work or not.\r\n\r\nThis is the Maven output logging of the senseless automated triggered maven-resource-plugin for EVERY project on the workspace, just because of the described bug here.\r\n\r\n{color:blue}\r\n12/16/14, 12:55:54 PM GMT+1: [INFO] Using 'UTF-8' encoding to copy filtered resources.\r\n12/16/14, 12:55:54 PM GMT+1: [INFO] Copying 0 resource\r\n12/16/14, 12:55:55 PM GMT+1: [INFO] Using 'UTF-8' encoding to copy filtered resources.\r\n12/16/14, 12:55:55 PM GMT+1: [INFO] Copying 0 resource\r\n12/16/14, 12:55:57 PM GMT+1: [INFO] Using 'UTF-8' encoding to copy filtered resources.\r\n12/16/14, 12:55:57 PM GMT+1: [INFO] Copying 0 resource\r\n12/16/14, 12:55:58 PM GMT+1: [INFO] Using 'UTF-8' encoding to copy filtered resources.\r\n12/16/14, 12:55:58 PM GMT+1: [INFO] Copying 1 resource\r\n12/16/14, 12:56:00 PM GMT+1: [INFO] Using 'UTF-8' encoding to copy filtered resources.\r\n12/16/14, 12:56:00 PM GMT+1: [INFO] Copying 0 resource\r\n12/16/14, 12:56:00 PM GMT+1: [INFO] Copying 0 resource\r\n12/16/14, 12:56:00 PM GMT+1: [INFO] Using 'UTF-8' encoding to copy filtered resources.\r\n12/16/14, 12:56:00 PM GMT+1: [INFO] Copying 0 resource\r\n12/16/14, 12:56:00 PM GMT+1: [INFO] Copying 0 resource\r\n12/16/14, 12:56:02 PM GMT+1: [INFO] Using 'UTF-8' encoding to copy filtered resources.\r\n12/16/14, 12:56:02 PM GMT+1: [INFO] Copying 0 resource\r\n{color}","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ntshko","name":"ntshko","emailAddress":"hannes.kogler@ntswincash.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Hannes Kogler","active":true},"created":"2014-12-16T05:54:31.816-0600","updated":"2014-12-16T05:58:48.157-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-18.json b/jira/PLXUTILS-18.json new file mode 100644 index 00000000..a4741616 --- /dev/null +++ b/jira/PLXUTILS-18.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"16915","self":"http://jira.codehaus.org/rest/api/latest/issue/16915","key":"PLXUTILS-18","fields":{"progress":{"progress":0,"total":3600,"percent":0},"summary":"implement partitioned DAG/sorter/detector for pre-, main-, and post-processing types of operations","timetracking":{"originalEstimate":"1h","remainingEstimate":"1h","originalEstimateSeconds":3600,"remainingEstimateSeconds":3600},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-18/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"aggregatetimeoriginalestimate":3600,"customfield_10161":["jdcasey(jdcasey)"],"customfield_10160":null,"updated":"2007-01-13T01:01:56.145-0600","created":"2004-08-02T20:13:36.000-0500","description":"With maven2, it's easier to add preGoals and postGoals directly into the DAG, to allow reuse of the topo sorter for assembling an execution chain. However, we must ensure that preGoals always execute before their target goals, and postGoals always execute afterward. Mixing them into the general population of the DAG and maintaining them at the boundaries of the topo-sort result is too complex.\n\nIn light of this, I have created a DAG implementation that is partitioned arbitrarily, with a default partition index to support the default addEdge(), getChildren(), etc. operations. In this implementation, the getSuccessorLabels() method will use a variant of the TopologicalSorter to sort the vertices normally, except that for each vertex it examines, it iterates through the partitions in ascending order to assemble the list of successors. The current vertex label is appended to the end of the default partition's sub-range within the list.\n\nAccompanying my new implementation classes is a new unit test case, called PartitionedDAGTest, which tests the high points of the changes I made in creating this variant.\n\nOnce again, I want to emphasize that this is in support of the Maven2 project, and will allow the simplest possible fusion of goals and goal decorators, with maximum reuse of the recursive tree-walking logic used to build the execution chain implied by one m2 goal being included on the command line.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"329788800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-18/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":0,"assignee":null,"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/12722","id":"12722","filename":"PartitionedDAG-and-accessories-20040802.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"created":"2004-08-02T20:14:57.000-0500","size":36489,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/12722/PartitionedDAG-and-accessories-20040802.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":3600,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"any","timeestimate":3600,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":3600,"percent":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/16915/comment/22653","id":"22653","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"body":"here is the implementation patch.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"created":"2004-08-02T20:14:57.000-0500","updated":"2004-08-02T20:14:57.000-0500"}]},"timeoriginalestimate":3600,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-19.json b/jira/PLXUTILS-19.json new file mode 100644 index 00000000..697959c1 --- /dev/null +++ b/jira/PLXUTILS-19.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"17855","self":"http://jira.codehaus.org/rest/api/latest/issue/17855","key":"PLXUTILS-19","fields":{"progress":{"progress":0,"total":0},"summary":"Merge xpp3 parser into plexus","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-19/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14043","id":"14043","description":"","name":"1.0-alpha-1","archived":true,"released":true,"releaseDate":"2005-01-18"}],"resolutiondate":"2005-01-03T17:05:10.000-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jason","name":"jason","emailAddress":"jason@takari.io","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jason van Zyl","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["jason(jason)"],"customfield_10160":null,"updated":"2008-02-02T15:56:53.097-0600","created":"2004-09-17T00:31:35.000-0500","description":"The xml parser is one file and it removes a dep which is good.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"316483200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-19/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/17855/comment/28550","id":"28550","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jason","name":"jason","emailAddress":"jason@takari.io","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jason van Zyl","active":true},"body":"Finished","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jason","name":"jason","emailAddress":"jason@takari.io","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jason van Zyl","active":true},"created":"2005-01-03T17:05:10.000-0600","updated":"2005-01-03T17:05:10.000-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-2.json b/jira/PLXUTILS-2.json new file mode 100644 index 00000000..8ee99e2a --- /dev/null +++ b/jira/PLXUTILS-2.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"36390","self":"http://jira.codehaus.org/rest/api/latest/issue/36390","key":"PLXUTILS-2","fields":{"progress":{"progress":0,"total":0},"summary":"PrettyPrintXMLWriter writes unix line endings always","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-2/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14039","id":"14039","description":"","name":"1.3","archived":false,"released":true,"releaseDate":"2006-09-28"}],"resolutiondate":"2006-04-27T00:45:31.824-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["carlos(carlos)","evenisse(evenisse)"],"customfield_10160":null,"updated":"2008-02-02T16:00:27.377-0600","created":"2006-04-27T00:40:29.497-0500","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"14032","self":"http://jira.codehaus.org/rest/api/2/issueLink/14032","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"36389","key":"MNG-2244","self":"http://jira.codehaus.org/rest/api/2/issue/36389","fields":{"summary":"Plugin xdoc generator outputs xdoc with unix file endings","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"275097600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-2/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":3,"total":3,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/36390/comment/64266","id":"64266","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"body":"Fixed in 1.2-SNAPSHOT","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"created":"2006-04-27T00:45:31.777-0500","updated":"2006-04-27T00:45:31.777-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/36390/comment/64272","id":"64272","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"body":"No, 1.3-SNAPSHOT. 1.2 was release last week.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"created":"2006-04-27T02:07:17.730-0500","updated":"2006-04-27T02:07:17.730-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/36390/comment/64302","id":"64302","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"body":"you are right","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"created":"2006-04-27T11:41:02.512-0500","updated":"2006-04-27T11:41:02.512-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-20.json b/jira/PLXUTILS-20.json new file mode 100644 index 00000000..857d9868 --- /dev/null +++ b/jira/PLXUTILS-20.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"26150","self":"http://jira.codehaus.org/rest/api/latest/issue/26150","key":"PLXUTILS-20","fields":{"progress":{"progress":0,"total":0},"summary":"Allows includes/excludes patterns with whitespaces","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-20/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14046","id":"14046","description":"","name":"1.0.2","archived":true,"released":true,"releaseDate":"2005-09-13"}],"resolutiondate":"2005-08-19T01:20:51.623-0500","customfield_10210":"2.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=danttran","name":"danttran","emailAddress":"dantran@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Tran","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["brettporter(brettporter)","danttran(danttran)"],"customfield_10160":null,"updated":"2008-02-02T15:57:23.232-0600","created":"2005-08-04T01:35:16.127-0500","description":"This enhancement will allow DirectorScanner to accept includes/includes with whitepaces\n\nFor example the following pattern taken from a xml element will have \\n\\r in it\n\n \n file1,\n file2,\n file3\n\n\nattaches are the diff for DirectoryScanner and its test file DirectoryScannerTest.java","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"296870400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-20/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/16114","id":"16114","filename":"diff.txt","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=danttran","name":"danttran","emailAddress":"dantran@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Tran","active":true},"created":"2005-08-04T01:35:16.222-0500","size":1153,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/16114/diff.txt"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/16115","id":"16115","filename":"DirectoryScannerTest.java","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=danttran","name":"danttran","emailAddress":"dantran@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Tran","active":true},"created":"2005-08-04T01:35:16.249-0500","size":3331,"mimeType":"text/java","content":"http://jira.codehaus.org/secure/attachment/16115/DirectoryScannerTest.java"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"xp","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/26150/comment/44725","id":"44725","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"body":"applied, thanks","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"created":"2005-08-19T01:20:51.553-0500","updated":"2005-08-19T01:20:51.553-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-21.json b/jira/PLXUTILS-21.json new file mode 100644 index 00000000..aeb23113 --- /dev/null +++ b/jira/PLXUTILS-21.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"24237","self":"http://jira.codehaus.org/rest/api/latest/issue/24237","key":"PLXUTILS-21","fields":{"progress":{"progress":0,"total":0},"summary":"sync or replace parts of plexus-utils with Apache commons, Apache Ant...","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-21/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["brettporter(brettporter)","siveton(siveton)"],"customfield_10160":null,"updated":"2009-01-06T18:49:05.280-0600","created":"2005-05-25T20:07:34.556-0500","description":"glancing over FileUtils, there are opportunities for file handles to leak due to improperly caught exceptions. It is based on a very old version, and it seems to have been fixed in commons-io-1.0.\n\nI suggest we remove these from plexus-utils in the next release and start using commons-io (it will require method signature changes, however). In a lot of cases, this will allow us to drop plexus-utils (a 250k dep down to an 80k dep for commons-io).\n\n\n\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"189993600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-21/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/24237/comment/160182","id":"160182","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"IMHO I will prefer a general approach, using the shade plugin for instance.\r\n\r\nSome p-u classes could be extended from there original classes, i.e.\r\n\r\n{noformat}\r\norg.codehaus.plexus.util.Base64 => org.apache.commons.codec.binary.Base64\r\norg.codehaus.plexus.util.DirectoryScanner => org.apache.tools.ant.DirectoryScanner\r\norg.codehaus.plexus.util.ExceptionUtils => org.apache.commons.lang.exception.ExceptionUtils\r\norg.codehaus.plexus.util.Expand => org.apache.tools.ant.taskdefs.Expand\r\norg.codehaus.plexus.util.FileUtils => org.apache.commons.io.FileUtils\r\norg.codehaus.plexus.util.IOUtil => org.apache.commons.io.IOUtils\r\norg.codehaus.plexus.util.Os => org.apache.commons.exec.Os (partial)\r\norg.codehaus.plexus.util.SelectorUtils => org.apache.tools.ant.types.selectors.SelectorUtils\r\norg.codehaus.plexus.util.StringInputStream => org.apache.tools.ant.filters.StringInputStream\r\norg.codehaus.plexus.util.StringUtils => org.apache.commons.lang.StringUtils\r\n{noformat}\r\n\r\n*Note*: we need to take care of the implementation of each methods. For instance, StringUtils#isEmpty() has not the same behaviour from commons (no trim()...)\r\n\r\nConfigure the shade plugin for each wanted classes, ie:\r\n\r\n{noformat}\r\n \r\n maven-shade-plugin\r\n \r\n \r\n shade\r\n \r\n shade\r\n \r\n \r\n \r\n \r\n org.codehaus.plexus:plexus-interpolation\r\n commons-lang:commons-lang\r\n \r\n \r\n \r\n \r\n org.codehaus.plexus.interpolation\r\n \r\n \r\n org.apache.commons.lang\r\n \r\n \r\n \r\n \r\n commons-lang:commons-lang\r\n \r\n org/apache/commons/lang/StringUtils.*\r\n \r\n \r\n \r\n \r\n true\r\n \r\n \r\n \r\n \r\n...\r\n{noformat}","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-01-06T18:49:05.252-0600","updated":"2009-01-06T18:49:05.252-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-22.json b/jira/PLXUTILS-22.json new file mode 100644 index 00000000..990383d4 --- /dev/null +++ b/jira/PLXUTILS-22.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"26618","self":"http://jira.codehaus.org/rest/api/latest/issue/26618","key":"PLXUTILS-22","fields":{"progress":{"progress":10800,"total":10800,"percent":100},"summary":"allow disctinction between merge and override semantics on Xpp3Dom merge method","timetracking":{"originalEstimate":"6h","remainingEstimate":"0m","timeSpent":"3h","originalEstimateSeconds":21600,"remainingEstimateSeconds":0,"timeSpentSeconds":10800},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-22/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14046","id":"14046","description":"","name":"1.0.2","archived":true,"released":true,"releaseDate":"2005-09-13"}],"resolutiondate":"2005-08-25T13:30:53.603-0500","customfield_10210":"0.0","timespent":10800,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"aggregatetimeoriginalestimate":21600,"customfield_10161":["jdcasey(jdcasey)"],"customfield_10160":null,"updated":"2008-02-02T15:55:54.687-0600","created":"2005-08-22T17:16:49.392-0500","description":"The configuration of maven plugins sometimes depend on merging DOM instances, as in when computing inheritance. When configurations represent lists and other complex objects, the DOMs can only handle override semantics...we need to allow merging of DOM elements which have the same element name, with an optional attribute for overriding.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"12415","self":"http://jira.codehaus.org/rest/api/2/issueLink/12415","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"26381","key":"MNG-732","self":"http://jira.codehaus.org/rest/api/2/issue/26381","fields":{"summary":"Improve plugin configuration property merge algorithm","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}}],"customfield_10163":"296265600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-22/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":1,"worklogs":[{"self":"http://jira.codehaus.org/rest/api/2/issue/26618/worklog/45206","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"comment":"implemented:\n\n- merge vs. override for self (values, attributes, children) DEFAULT == merge\n- merge vs. append for children (merging or adding recessive children) == merge\n\nAlso added tests.","created":"2005-08-25T13:30:19.887-0500","updated":"2005-08-25T13:30:19.887-0500","started":"2005-08-25T13:30:19.887-0500","timeSpent":"3h","timeSpentSeconds":10800,"id":"45206"}]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":50,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":0,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":0,"customfield_10130":null,"aggregateprogress":{"progress":10800,"total":10800,"percent":100},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/26618/comment/45207","id":"45207","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"body":"see org.codehaus.plexus.xml.Xpp3DomTest in src/test/java","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"created":"2005-08-25T13:30:53.528-0500","updated":"2005-08-25T13:30:53.528-0500"}]},"timeoriginalestimate":21600,"aggregatetimespent":10800}} \ No newline at end of file diff --git a/jira/PLXUTILS-23.json b/jira/PLXUTILS-23.json new file mode 100644 index 00000000..4c3d32c8 --- /dev/null +++ b/jira/PLXUTILS-23.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"43371","self":"http://jira.codehaus.org/rest/api/latest/issue/43371","key":"PLXUTILS-23","fields":{"progress":{"progress":0,"total":0},"summary":"add the ability to preserver parent directories when using copyDirectory(...) and include pattern.","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-23/votes","votes":1,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=saden1","name":"saden1","emailAddress":"aden.list@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Sharmarke Aden","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["icfantv(icfantv)","saden1(saden1)"],"customfield_10160":null,"updated":"2011-10-25T10:51:41.718-0500","created":"2006-11-01T19:13:33.079-0600","description":"Please note that this issue is somewhat related to http://jira.codehaus.org/browse/PLX-187 but not entirely. \n\nIt seems that with the current plexus-utils v1.3 release only files matching the include pattern are copied but if these files are in sub-directories then their parent directory structure is not preserved. For example, the bellow code will not create a sub-directory in the destination directory if the source directory contains only a sub directories with single files.\n \nFileUtils.copyDirectory(new File(\"c:/temp/copy/src\"), new File(\"c:/temp/copy/dest\"),\"**\", null);\n\nI have created a patch adds a new method called copyDirectory(...) with an extra Boolean parameter that allows one to preserver a files parent directory structure. The following is the new method's signature\n\ncopyDirectory(File sourceDirectory, File destinationDirectory, String includes, String excludes, boolean includeParentdir)\n\nExample:\nFileUtils.copyDirectory(new File(\"c:/temp/copy/src\"), new File(\"c:/temp/copy/dest\"),\"**\", null, true);\n\nThe patch also contains a unite test for the new method. \n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"101779200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-23/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/23769","id":"23769","filename":"plexus-util-r4533.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=saden1","name":"saden1","emailAddress":"aden.list@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Sharmarke Aden","active":true},"created":"2006-11-01T19:13:33.178-0600","size":6521,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/23769/plexus-util-r4533.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"Windows XP, Cygwin, x86, Java 1.4.2","timeestimate":null,"customfield_10130":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10053","value":"Yes","id":"10053"},"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/43371/comment/282037","id":"282037","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=icfantv","name":"icfantv","emailAddress":"adam.n.gordon@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"adam gordon","active":true},"body":"IMO, this is a bug rather than an improvement. When one copies directories I think it is implicitly assumed that the directory structure is to be preserved. I certainly recognize that there are situations where one might want to copy all the files (recursively) from one directory to a flat structure in another directory but would argue that this is the exception rather than the rule.\r\n\r\nIf anyone finds this and needs a workaround using existing code and not patching sources you can use the following syntax in a Commandline object to accomplish what you need:\r\n\r\nAssume the following exist:\r\n\r\ndir1\r\n subdir1\r\n  subfile1\r\n subdir2\r\n  subfile2\r\n subdir3\r\n  subfile3\r\n file1\r\n\r\ndir2\r\n file2\r\n\r\nThen, assuming you are in dir2, the command 'cp -R ../dir1/. .' will do what you want on *nix and OSX.\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=icfantv","name":"icfantv","emailAddress":"adam.n.gordon@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"adam gordon","active":true},"created":"2011-10-25T10:33:36.311-0500","updated":"2011-10-25T10:51:41.715-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/43371/comment/282039","id":"282039","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=icfantv","name":"icfantv","emailAddress":"adam.n.gordon@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"adam gordon","active":true},"body":"Here's the code for above:\r\n\r\n String dir1 = \"/home/gordona/tmp/dir1\";\r\n String dir2 = \"/home/gordona/tmp/dir2\";\r\n\r\n Commandline cl = new Commandline();\r\n cl.setWorkingDirectory(dir2);\r\n cl.setExecutable(\"cp\");\r\n cl.createArg().setValue(\"-R\");\r\n cl.createArg().setValue(dir1 + File.separator + \".\");\r\n cl.createArg().setValue(\".\");\r\n System.out.println(\"command: \" + cl.toString());\r\n try {\r\n cl.execute();\r\n } catch (CommandLineException ex) {\r\n ex.printStackTrace();\r\n }\r\n\r\nNote that you *need* to have the last '.' in a separate createArg() call or Commandline will lumb them all together in the same set of tick marks and \"cp\" will complain about missing the destination file operand.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=icfantv","name":"icfantv","emailAddress":"adam.n.gordon@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"adam gordon","active":true},"created":"2011-10-25T10:50:40.547-0500","updated":"2011-10-25T10:50:40.547-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-24.json b/jira/PLXUTILS-24.json new file mode 100644 index 00000000..c2b6af19 --- /dev/null +++ b/jira/PLXUTILS-24.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"26947","self":"http://jira.codehaus.org/rest/api/latest/issue/26947","key":"PLXUTILS-24","fields":{"progress":{"progress":0,"total":0},"summary":"Add FileUtils.fileAppend","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-24/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14048","id":"14048","description":"","name":"1.0.4","archived":true,"released":true,"releaseDate":"2005-10-11"}],"resolutiondate":"2005-10-07T23:38:39.225-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=danttran","name":"danttran","emailAddress":"dantran@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Tran","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["brettporter(brettporter)","danttran(danttran)"],"customfield_10160":null,"updated":"2008-02-02T15:54:35.707-0600","created":"2005-09-03T21:11:42.521-0500","description":"Attached is the new added method FileUtils.fileAppend and its test case","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"292550400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-24/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/16528","id":"16528","filename":"fileAppend.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=danttran","name":"danttran","emailAddress":"dantran@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Tran","active":true},"created":"2005-09-03T21:11:42.609-0500","size":1817,"mimeType":"application/octet-stream","content":"http://jira.codehaus.org/secure/attachment/16528/fileAppend.diff"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"xp","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/26947/comment/48090","id":"48090","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"body":"applied","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"created":"2005-10-07T23:38:39.103-0500","updated":"2005-10-07T23:38:39.103-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-25.json b/jira/PLXUTILS-25.json new file mode 100644 index 00000000..93a1b86c --- /dev/null +++ b/jira/PLXUTILS-25.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"45651","self":"http://jira.codehaus.org/rest/api/latest/issue/45651","key":"PLXUTILS-25","fields":{"progress":{"progress":0,"total":0},"summary":"Runtime.addShutdownHook() prevents maven embedding","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-25/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17364","id":"17364","description":"","name":"2.1","archived":false,"released":true,"releaseDate":"2011-06-09"}],"resolutiondate":"2011-05-16T12:33:54.091-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mkleint","name":"mkleint","emailAddress":"mkleint@codehaus.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Milos Kleint","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["igorfie(igorfie)","lacostej(lacostej)","krosenvold(krosenvold)","mkleint(mkleint)"],"customfield_10160":null,"updated":"2011-06-18T04:36:29.190-0500","created":"2007-01-05T04:01:17.204-0600","description":"\nwhile I haven't found an actual problem with the CommandLineUtils' use of shutdown hooks, I believe it's potencially dangerous for maven's execution in embedded environment.\n\nhttp://jira.codehaus.org/browse/MASSEMBLY-158 is related.\n\n\njava.lang.IllegalThreadStateException\n at java.lang.ThreadGroup.add(ThreadGroup.java:856)\n at java.lang.Thread.start(Thread.java:573)\n at java.lang.Shutdown.runHooks(Shutdown.java:128)\n at java.lang.Shutdown.sequence(Shutdown.java:173)\n at java.lang.Shutdown.exit(Shutdown.java:218)\n at java.lang.Runtime.exit(Runtime.java:90)\n at java.lang.System.exit(System.java:869)\n at org.netbeans.TopSecurityManager.exit(TopSecurityManager.java:128)\n at org.netbeans.core.NbTopManager$3.run(NbTopManager.java:408)\n at org.openide.util.Task.run(Task.java:222)\n at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:541)\n[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:963)\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"17514","self":"http://jira.codehaus.org/rest/api/2/issueLink/17514","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"43526","key":"MASSEMBLY-158","self":"http://jira.codehaus.org/rest/api/2/issue/43526","fields":{"summary":"tempRoot directory not created, exceptions thrown when filtering files","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"29190","self":"http://jira.codehaus.org/rest/api/2/issueLink/29190","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"126583","key":"SUREFIRE-748","self":"http://jira.codehaus.org/rest/api/2/issue/126583","fields":{"summary":"Ensure plugin classloader is unloadable","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}}],"customfield_10163":"115689600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-25/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/42364","id":"42364","filename":"PLXUTILS-25.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"created":"2009-06-02T12:31:15.584-0500","size":2255,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/42364/PLXUTILS-25.diff"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":5,"total":5,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/45651/comment/84101","id":"84101","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mkleint","name":"mkleint","emailAddress":"mkleint@codehaus.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Milos Kleint","active":true},"body":"Checking the Ant's Execute class reveals that ant uses the same/similar strategy. It however removes the shutdown hook if all the processes exited normally. If done in plexus-utils as well it should cater for 99.9 percent cases of possible failure in embedders as well.\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mkleint","name":"mkleint","emailAddress":"mkleint@codehaus.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Milos Kleint","active":true},"created":"2007-01-05T04:17:47.272-0600","updated":"2007-01-05T04:17:47.272-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/45651/comment/93757","id":"93757","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"body":"the bug is probably in Thread.start which shouldn't take the assumption to add the Thread to the group at that time...\r\n\r\n1 idea: load the CommandLineUtils class before embedding maven (as to force the thread group of the shutdown hook to be the one of the embedder)\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2007-04-21T00:51:36.807-0500","updated":"2007-04-21T00:51:36.807-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/45651/comment/93758","id":"93758","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"body":"Another more robust/intuitive solution is to assign a System Thread group to the Thread created and specieid to addShutdownHook().\r\n\r\nMaybe doing something like :\r\n\r\n static\r\n {\r\n\r\nThreadGroup root = Thread.currentThread().getThreadGroup().getParent();\r\n while (root.getParent() != null) {\r\n root = root.getParent();\r\n }\r\n\r\n Runtime.getRuntime().addShutdownHook( new Thread( root, \"CommandlineUtil shutdown\" )\r\n {\r\n ....\r\n\r\n\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2007-04-21T00:56:56.821-0500","updated":"2007-04-21T00:56:56.821-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/45651/comment/179038","id":"179038","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"body":"I ran into this/related issue when running maven in a \"recyclable\" while setting up maven performance regression tests. Registered shutdown hook instances are holding entire maven classloader in memory, which results in \"OutOfMemoryError: PermGen spac\" exceptions.\r\n\r\nI think proper long-term solution would be to turn CommandLineUtils into a component, so it can be shutdown properly as part of container shutdown. Proposed short-term solution (attached), is to allow embedding application to explicitly remove shutdown hook, optionally running it.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=igorfie","name":"igorfie","emailAddress":"igor@ifedorenko.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Igor Fedorenko","active":true},"created":"2009-06-02T12:31:15.594-0500","updated":"2009-06-02T12:31:15.594-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/45651/comment/267160","id":"267160","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"Fixed in dff209e5a1f7c1bb4a4de2a19582bbc2cb3c6f0c. Registered shutdown hook per-invocation.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2011-05-16T12:33:54.159-0500","updated":"2011-05-16T12:33:54.159-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-26.json b/jira/PLXUTILS-26.json new file mode 100644 index 00000000..eab92e9a --- /dev/null +++ b/jira/PLXUTILS-26.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"32432","self":"http://jira.codehaus.org/rest/api/latest/issue/32432","key":"PLXUTILS-26","fields":{"progress":{"progress":0,"total":0},"summary":"Allow to deep copy directories with includes/excludes","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-26/votes","votes":2,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","lacostej(lacostej)"],"customfield_10160":null,"updated":"2008-09-16T05:44:24.324-0500","created":"2006-01-16T14:05:05.571-0600","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[{"id":"20507","self":"http://jira.codehaus.org/rest/api/2/issueLink/20507","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"73599","key":"PLXUTILS-91","self":"http://jira.codehaus.org/rest/api/2/issue/73599","fields":{"summary":"add a copyDirectoryLayout which support excludes and includes","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false}}}},{"id":"19269","self":"http://jira.codehaus.org/rest/api/2/issueLink/19269","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"66306","key":"MINVOKER-32","self":"http://jira.codehaus.org/rest/api/2/issue/66306","fields":{"summary":"Exclude some files by default when using \"cloneProjectsTo\"","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}}],"customfield_10163":"218505600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-26/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/18642","id":"18642","filename":"patch-PLX-187.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2006-01-16T14:06:11.487-0600","size":6078,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/18642/patch-PLX-187.diff"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/32432/comment/56021","id":"56021","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"body":"Patch that seems to work...\r\nCould perhaps be improved (the for (int i = 1) is a little bit hackish.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2006-01-16T14:06:11.533-0600","updated":"2006-01-16T14:06:11.533-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/32432/comment/123296","id":"123296","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"+1 on the general idea. This would be useful for the Maven Invoker Plugin's option [cloneProjectsTo|http://maven.apache.org/plugins/maven-invoker-plugin/run-mojo.html#cloneProjectsTo] to exclude the usual SCM stuff when copying the IT projects.\r\n\r\n-1 on the System.out.println()'s that got into the patch.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-02-11T12:41:47.007-0600","updated":"2008-02-11T12:41:47.007-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-27.json b/jira/PLXUTILS-27.json new file mode 100644 index 00000000..32f61c70 --- /dev/null +++ b/jira/PLXUTILS-27.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"41758","self":"http://jira.codehaus.org/rest/api/latest/issue/41758","key":"PLXCOMP-70","fields":{"progress":{"progress":0,"total":0},"summary":"Embedded error: String index out of range: 70","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-70/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/17474","id":"17474","description":"","name":"plexus-archiver-2.1","archived":false,"released":true,"releaseDate":"2012-01-23"}],"resolutiondate":"2012-01-23T16:08:47.365-0600","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pinghe","name":"pinghe","emailAddress":"mzhx@163.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"pinghe","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["ffray(ffray)","hboutemy(hboutemy)","krosenvold(krosenvold)","pinghe(pinghe)"],"customfield_10160":null,"updated":"2012-01-24T00:47:10.887-0600","created":"2006-09-19T23:42:12.128-0500","description":"Embedded error: String index out of range: 70\r\n\r\n{noformat}Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 70\r\n at java.lang.String.substring(String.java:1441)\r\n at org.codehaus.plexus.archiver.jar.Manifest$Attribute.writeLine(Manifest.java:389){noformat}\r\n\r\nerror code:\r\n{code:java} while ( line.getBytes().length > MAX_LINE_LENGTH )\r\n {\r\n // try to find a MAX_LINE_LENGTH byte section\r\n int breakIndex = MAX_SECTION_LENGTH;\r\n String section = line.substring( 0, breakIndex );{code}\r\nfix:\r\n{code:java}line.getBytes().length --->> line.length, line is unicode, {code}","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"duedate":null,"issuelinks":[{"id":"28723","self":"http://jira.codehaus.org/rest/api/2/issueLink/28723","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"124003","key":"PLXCOMP-172","self":"http://jira.codehaus.org/rest/api/2/issue/124003","fields":{"summary":"remove Ant's Manifest class: use JDK's class instead","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false}}}}],"customfield_10163":"93916800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-70/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/37210","id":"37210","filename":"PLXCOMP-70.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ffray","name":"ffray","emailAddress":"fray@itcf.biz","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Florian Fray","active":true},"created":"2008-09-25T19:32:45.739-0500","size":5388,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/37210/PLXCOMP-70.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"windows","timeestimate":null,"customfield_10130":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10053","value":"Yes","id":"10053"},"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[{"self":"http://jira.codehaus.org/rest/api/2/component/12540","id":"12540","name":"plexus-archiver"}],"comment":{"startAt":0,"maxResults":3,"total":3,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/41758/comment/149036","id":"149036","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ffray","name":"ffray","emailAddress":"fray@itcf.biz","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Florian Fray","active":true},"body":"Here's a patch. Gets also rid of this extensive substring-stuff.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ffray","name":"ffray","emailAddress":"fray@itcf.biz","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Florian Fray","active":true},"created":"2008-09-25T19:32:45.808-0500","updated":"2008-09-25T19:32:45.808-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/41758/comment/262325","id":"262325","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"body":"thanks for your patch\r\nbut there is a problem: the limit in a line of the manifest is not expressed as characters but as bytes\r\nthen the whole API working with PrintWriters is broken, since the 72 bytes limit can happen inside the bytes of a character, which cannot be represented in a writer\r\n\r\nperhaps it's time to throw away Manifest class from Ant and use JDK one intead (which is here since java 1.2)","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2011-04-02T12:08:14.432-0500","updated":"2011-04-02T12:08:14.432-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/41758/comment/289195","id":"289195","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"FIxed in 838ab2e61ab6540631abe8a792292ea672e97a85","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2012-01-23T16:08:47.433-0600","updated":"2012-01-23T16:08:47.433-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-28.json b/jira/PLXUTILS-28.json new file mode 100644 index 00000000..7d02f906 --- /dev/null +++ b/jira/PLXUTILS-28.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"46873","self":"http://jira.codehaus.org/rest/api/latest/issue/46873","key":"PLXUTILS-28","fields":{"progress":{"progress":0,"total":0},"summary":"FileUtils.cleanDirectory() does not remove symbolic links","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-28/votes","votes":6,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"resolutiondate":"2008-07-20T18:27:31.259-0500","customfield_10210":"2.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=srp","name":"srp","emailAddress":"srp@ncsa.uiuc.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Steve Pietrowicz","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","pamdirac(pamdirac)","srp(srp)"],"customfield_10160":null,"updated":"2008-09-03T14:56:49.448-0500","created":"2007-02-02T09:27:33.187-0600","description":"FileUtils.cleanDirectory() will not remove symbolic links if they are located in the directory that you're trying to delete.\n\nYou can test this by running this shell script:\n-----\n#!/bin/sh\nmkdir /tmp/test_clean\necho > /tmp/test_clean/1\necho > /tmp/test_clean/2\nln -s /tmp/test_clean/foo /tmp/test_clean/bar\n----------\n\nand compiling and running this test program:\n----\n{code:java}\nimport org.codehaus.plexus.util.FileUtils;\nimport java.io.*;\n\npublic class broken {\n\n static public void main(String[] argv) {\n try {\n File file = new File(argv[0]);\n FileUtils.cleanDirectory(file);\n } catch (Exception e) {\n System.out.println(e);\n }\n }\n}\n{code}\n-------------------\n\nI looked around for a fix to for this, and found this page: http://joust.kano.net/weblog/archives/000071.html\n\nwhich offers the following public domain code, with a slight modification by me to only clean the directory, not delete it.\n{code:java}\n public static boolean cleanDirectory(File dir) {\n // to see if this directory is actually a symbolic link to a directory,\n // we want to get its canonical path - that is, we follow the link to\n // the file it's actually linked to\n File candir;\n try {\n candir = dir.getCanonicalFile();\n } catch (IOException e) {\n return false;\n }\n\n // a symbolic link has a different canonical path than its actual path,\n // unless it's a link to itself\n if (!candir.equals(dir.getAbsoluteFile())) {\n // this file is a symbolic link, and there's no reason for us to\n // follow it, because then we might be deleting something outside of\n // the directory we were told to delete\n return false;\n }\n\n // now we go through all of the files and subdirectories in the\n // directory and delete them one by one\n File[] files = candir.listFiles();\n if (files != null) {\n for (int i = 0; i < files.length; i++) {\n File file = files[i];\n\n // in case this directory is actually a symbolic link, or it's\n // empty, we want to try to delete the link before we try\n // anything\n boolean deleted = file.delete();\n if (!deleted) {\n // deleting the file failed, so maybe it's a non-empty\n // directory\n if (file.isDirectory()) {\n cleanDirectory(file);\n file.delete();\n }\n\n // otherwise, there's nothing else we can do\n }\n }\n }\n\n return true;\n }\n{code}\n\nI wrote a test program that incorporates this method and tested it using the same shell script, and it works.\n\nI've uploaded the test programs and a shell script that creates additional links, directories and links to directories to try and be sure all test cases are covered.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"20424","self":"http://jira.codehaus.org/rest/api/2/issueLink/20424","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"60741","key":"MCLEAN-28","self":"http://jira.codehaus.org/rest/api/2/issue/60741","fields":{"summary":"maven-clean-plugin doesn't delete directories with symlinks in them","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"20422","self":"http://jira.codehaus.org/rest/api/2/issueLink/20422","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"73105","key":"MSHARED-58","self":"http://jira.codehaus.org/rest/api/2/issue/73105","fields":{"summary":"FileSetManager.delete() fails to delete dangling symlinks","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"204681600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-28/watchers","watchCount":3,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/25544","id":"25544","filename":"cleanDirectory_fix.tar.gz","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=srp","name":"srp","emailAddress":"srp@ncsa.uiuc.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Steve Pietrowicz","active":true},"created":"2007-02-02T09:27:33.245-0600","size":1411,"mimeType":"application/x-gzip","content":"http://jira.codehaus.org/secure/attachment/25544/cleanDirectory_fix.tar.gz"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/27038","id":"27038","filename":"r6344.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pamdirac","name":"pamdirac","emailAddress":"john@mcnair.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John McNair","active":true},"created":"2007-04-26T15:41:26.054-0500","size":2445,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/27038/r6344.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"Tested on Linux, Fedora Core 5","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":4,"total":4,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/46873/comment/86672","id":"86672","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=srp","name":"srp","emailAddress":"srp@ncsa.uiuc.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Steve Pietrowicz","active":true},"body":"Sorry for the formatting on the code. Download the tarball to see the code.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=srp","name":"srp","emailAddress":"srp@ncsa.uiuc.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Steve Pietrowicz","active":true},"created":"2007-02-02T13:07:36.642-0600","updated":"2007-02-02T13:07:36.642-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/46873/comment/94277","id":"94277","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pamdirac","name":"pamdirac","emailAddress":"john@mcnair.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John McNair","active":true},"body":"I fixed this an alternate way. The real problem is that dangling symlinks don't exist according to File.exists(), so forceDelete() skips over them. This can be a problem in deleteDirectory() even if you have valid symlinks because you don't necessarily know that a given symlink will be deleted before its target.\r\n\r\nThe solution is just to make forceDelete() a little more forceful, i.e., try to delete even if the file does not exist and ignore failure for that one case only.\r\n\r\nI also added 3 unit tests to verify:\r\n- can delete symlink->file\r\n- can delete symlink->directory\r\n- can delete symlink->nothing at all (this was what was broken)\r\n\r\nThe unit tests only run on Linux (and do nothing elsewhere). I had to use Runtime to execute /bin/ls. That obviously doesn't work on Windows and likely several other Java hosts. Would you rather determine the execution set via inclusion or excusion?\r\n\r\nI have attached the output of 'svn diff' where my working copy is r6344.\r\n\r\nThis bug bites people using Continuum that have symlinks in their build directories (like me). Continuum explodes, and you have to manually clean up. So it would be cool if this could be fixed.\r\n\r\nThanks.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pamdirac","name":"pamdirac","emailAddress":"john@mcnair.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John McNair","active":true},"created":"2007-04-26T15:41:26.058-0500","updated":"2007-04-26T15:41:26.058-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/46873/comment/142541","id":"142541","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Related to [IO-147|https://issues.apache.org/jira/browse/IO-147].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-07-20T17:00:01.960-0500","updated":"2008-07-20T17:00:01.960-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/46873/comment/142547","id":"142547","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Applied John's patch in [r7530|http://fisheye.codehaus.org/changelog/plexus/?cs=7530], thanks!","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-07-20T18:27:31.239-0500","updated":"2008-07-20T18:27:31.239-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-29.json b/jira/PLXUTILS-29.json new file mode 100644 index 00000000..7e16db35 --- /dev/null +++ b/jira/PLXUTILS-29.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"47040","self":"http://jira.codehaus.org/rest/api/latest/issue/47040","key":"PLXUTILS-29","fields":{"progress":{"progress":0,"total":0},"summary":"Unknown os family gets validated as the current os family","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-29/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14041","id":"14041","description":"","name":"1.4.1","archived":false,"released":true,"releaseDate":"2007-03-10"}],"resolutiondate":"2007-02-07T03:32:57.448-0600","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=franz+see","name":"franz see","emailAddress":"franz.see@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Franz Allan Valencia See","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["evenisse(evenisse)","franz see(franz see)"],"customfield_10160":null,"updated":"2008-02-02T15:38:46.306-0600","created":"2007-02-06T19:23:29.800-0600","description":"Os#isOs( \"bogus family\", null, null, null ) and Os#isFamily( \"bogus family\" ) should return false instead of true","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"15789","self":"http://jira.codehaus.org/rest/api/2/issueLink/15789","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"47039","key":"MNG-2812","self":"http://jira.codehaus.org/rest/api/2/issue/47039","fields":{"summary":"Profile with an undefined os family activation should not activate","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"250473600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-29/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/25603","id":"25603","filename":"PLXUTILS-29-plexus-utils.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=franz+see","name":"franz see","emailAddress":"franz.see@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Franz Allan Valencia See","active":true},"created":"2007-02-06T19:35:24.088-0600","size":1120,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/25603/PLXUTILS-29-plexus-utils.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/47040/comment/86963","id":"86963","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=franz+see","name":"franz see","emailAddress":"franz.see@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Franz Allan Valencia See","active":true},"body":"PLXUTILS-29-plexus-utils.patch fixes this issue ( includes test case )","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=franz+see","name":"franz see","emailAddress":"franz.see@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Franz Allan Valencia See","active":true},"created":"2007-02-06T19:35:24.116-0600","updated":"2007-02-06T19:35:24.116-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/47040/comment/86989","id":"86989","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"body":"Applied.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"created":"2007-02-07T03:32:57.419-0600","updated":"2007-02-07T03:32:57.419-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-3.json b/jira/PLXUTILS-3.json new file mode 100644 index 00000000..d32e419d --- /dev/null +++ b/jira/PLXUTILS-3.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"36613","self":"http://jira.codehaus.org/rest/api/latest/issue/36613","key":"PLXUTILS-3","fields":{"progress":{"progress":0,"total":0},"summary":"Case issue in Os.isOs(). Creates hard to identify maven profile activation failures (Patch attached)","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-3/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14039","id":"14039","description":"","name":"1.3","archived":false,"released":true,"releaseDate":"2006-09-28"}],"resolutiondate":"2006-05-12T04:36:37.365-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["evenisse(evenisse)","lacostej(lacostej)"],"customfield_10160":null,"updated":"2008-12-28T14:29:58.129-0600","created":"2006-05-03T11:26:42.362-0500","description":"My os.name is Linux. If I use Linux in my pom.xml, the profile doesn't get activated. If I use linux.. it is.\n\nProblem probably created because the Os class mixes instance and class methods. Calls to instance methods are correctly handled (fields are case-lowered when set), while class ones are not (parameters are not case-lowered). Wonder if the issue was fixed in Ant...\n\nI haven't tested the patch yet, having problems making maven reuse the fixed plexus-utils, but I believe this should work.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"duedate":null,"issuelinks":[{"id":"21659","self":"http://jira.codehaus.org/rest/api/2/issueLink/21659","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"47066","key":"MNG-2814","self":"http://jira.codehaus.org/rest/api/2/issue/47066","fields":{"summary":"OS name is only detected if lower cased","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"273888000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-3/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/20388","id":"20388","filename":"patch.txt","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2006-05-03T11:26:42.462-0500","size":1446,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/20388/patch.txt"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/36613/comment/64674","id":"64674","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"body":"I've tested that this indeed fixes my issues by updating plexus-utils jar in $MAVEN_HOME/core/","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2006-05-03T12:09:53.386-0500","updated":"2006-05-03T12:09:53.386-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/36613/comment/65269","id":"65269","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"body":"Applied with some other changes","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"created":"2006-05-12T04:36:37.343-0500","updated":"2006-05-12T04:36:37.343-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-30.json b/jira/PLXUTILS-30.json new file mode 100644 index 00000000..0e7070c9 --- /dev/null +++ b/jira/PLXUTILS-30.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"47325","self":"http://jira.codehaus.org/rest/api/latest/issue/47325","key":"PLXUTILS-30","fields":{"progress":{"progress":0,"total":0},"summary":"Need to specify license type in pom","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-30/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14041","id":"14041","description":"","name":"1.4.1","archived":false,"released":true,"releaseDate":"2007-03-10"}],"resolutiondate":"2007-03-02T03:24:31.014-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=danttran","name":"danttran","emailAddress":"dantran@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Tran","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["danttran(danttran)","jdcasey(jdcasey)","olamy(olamy)"],"customfield_10160":null,"updated":"2008-02-02T13:53:01.877-0600","created":"2007-02-13T19:06:37.029-0600","description":"I want to use plexus-utils in my apps, and since it does not have any license info, I can not include it","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[],"customfield_10163":"248659200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-30/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":4,"total":4,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/47325/comment/88726","id":"88726","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"License information added in parent pom rev [5948|http://fisheye.codehaus.org/changelog/plexus/?cs=5947].\r\nUpgrade plexus-utils parent pom [5950|http://fisheye.codehaus.org/changelog/plexus/?cs=5950].\r\nIssue not close : some sources need license header review.\r\n\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-02-27T18:00:48.522-0600","updated":"2007-02-27T18:00:48.522-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/47325/comment/88737","id":"88737","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"Update license headers rev [5956|http://fisheye.codehaus.org/changelog/plexus/?cs=5956].\r\nAdd external licenses rev [5957|http://fisheye.codehaus.org/changelog/plexus/?cs=595].\r\n\r\nJohn files in org.codehaus.plexus.util.reflection.* contains :\r\n/*\r\n\r\n Copyright (c) 2002 John Casey. All rights reserved.\r\n\r\n SEE licenses/cj-license.txt FOR MORE INFORMATION.\r\n\r\n */\r\n\r\nCan you change this ?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-02-28T02:31:52.002-0600","updated":"2007-02-28T02:31:52.002-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/47325/comment/88749","id":"88749","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"rev 5856 reverted.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-02-28T04:31:15.524-0600","updated":"2007-02-28T04:31:15.524-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/47325/comment/88793","id":"88793","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"body":"org.codehaus.plexus.util.reflection.* is changed to APL 2.0.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"created":"2007-02-28T09:31:16.329-0600","updated":"2007-02-28T09:31:16.329-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-31.json b/jira/PLXUTILS-31.json new file mode 100644 index 00000000..9e9277af --- /dev/null +++ b/jira/PLXUTILS-31.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"49571","self":"http://jira.codehaus.org/rest/api/latest/issue/49571","key":"PLXUTILS-31","fields":{"progress":{"progress":0,"total":0},"summary":"Quoting issue on Windows. Potential regression ?","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-31/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14042","id":"14042","description":"","name":"1.4.2","archived":false,"released":true,"releaseDate":"2007-05-20"}],"resolutiondate":"2007-05-13T15:57:10.647-0500","customfield_10210":"2.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["baerrach(baerrach)","carlos(carlos)","fj(fj)","lacostej(lacostej)"],"customfield_10160":null,"updated":"2011-12-05T00:56:45.476-0600","created":"2007-04-06T04:10:04.213-0500","description":"When trying to update from p-u 1.0.5 to 1.4.1 in the webstart maven plugin i encountered an CommandLine execution issue.\n\ntestAddThenRemoveSignatureCheckUsingJarSignVerifyMojo(org.codehaus.mojo.webstart.JarUnsignMojoTest) Time elapsed: 1.594 sec <<< ERROR!\njava.lang.IllegalArgumentException\n\tat java.lang.ProcessImpl.(ProcessImpl.java:69)\n\tat java.lang.ProcessImpl.start(ProcessImpl.java:30)\n\tat java.lang.ProcessBuilder.start(ProcessBuilder.java:451)\n\tat java.lang.Runtime.exec(Runtime.java:591)\n\tat org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:653)\n\tat org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:102)\n\tat org.codehaus.mojo.keytool.GenkeyMojo.executeCommandLine(GenkeyMojo.java:374)\n\nThe command looks properly quoted:\n\n[debug] Executing: cmd.exe /X /C '\"C:\\Program Files\\Java\\jdk1.5.0_11\\jre\\..\\bin\\keytool.exe\" -genkey -dname \"CN=CN, OU=OU, L=L, ST=ST, O=O, C=C\" -alias test -keypass 123456 -keystore C:\\DOCUME~1\\et4642\\LOCALS~1\\Temp\\keystore -storepass 123456'\n\nSo I wonder if this is not: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6468220 \n\nIn that issue a work-around is identified. I will try to create a test case for p-u.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[{"id":"16490","self":"http://jira.codehaus.org/rest/api/2/issueLink/16490","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"27795","key":"PLXUTILS-85","self":"http://jira.codehaus.org/rest/api/2/issue/27795","fields":{"summary":"under windows when executing java classpaths with embedded spaces cause the execution to fail","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"16340","self":"http://jira.codehaus.org/rest/api/2/issueLink/16340","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"48914","key":"SUREFIRE-310","self":"http://jira.codehaus.org/rest/api/2/issue/48914","fields":{"summary":"surefire-reports failes to locate java, returns \"There are test failures.\"","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"16530","self":"http://jira.codehaus.org/rest/api/2/issueLink/16530","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"50969","key":"MINVOKER-3","self":"http://jira.codehaus.org/rest/api/2/issue/50969","fields":{"summary":"Invoker always returns 0 on Windows due to cmd.exe and exit /b in mvn.bat","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"16312","self":"http://jira.codehaus.org/rest/api/2/issueLink/16312","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"49529","key":"MNG-2936","self":"http://jira.codehaus.org/rest/api/2/issue/49529","fields":{"summary":"IllegalArgumentException forking during javadoc","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"16586","self":"http://jira.codehaus.org/rest/api/2/issueLink/16586","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"51281","key":"MNG-2996","self":"http://jira.codehaus.org/rest/api/2/issue/51281","fields":{"summary":"maven-test-tools: Updates for PLXUTILS-31 patches","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"16298","self":"http://jira.codehaus.org/rest/api/2/issueLink/16298","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"47984","key":"MWEBSTART-29","self":"http://jira.codehaus.org/rest/api/2/issue/47984","fields":{"summary":"Problem with keytool execution whitespace in path","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"98236800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-31/watchers","watchCount":4,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/26698","id":"26698","filename":"PLXUTILS-31.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2007-04-06T16:32:44.975-0500","size":4836,"mimeType":"application/octet-stream","content":"http://jira.codehaus.org/secure/attachment/26698/PLXUTILS-31.diff"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/27291","id":"27291","filename":"PLXUTILS-31-bae-patch.txt","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=baerrach","name":"baerrach","emailAddress":"baerrach@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrie Treloar","active":true},"created":"2007-05-13T04:05:12.334-0500","size":5458,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/27291/PLXUTILS-31-bae-patch.txt"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10053","value":"Yes","id":"10053"},"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":12,"total":12,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/49571/comment/92292","id":"92292","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"body":"I think that the CMD quoting in plexus 1.4.1 is invalid.\r\n\r\nIf I use it to generate the command line for the keytool plugin, the generated command line doesn't work on Windows:\r\n\r\nC:\\b2bdev\\projects\\plexus\\plexus-utils>cmd.exe /X /C '\"C:\\Program Files\\Java\\jdk1.5.0_11\\jre\\..\\bin\\keytool.exe\" -genkey -dname \"CN=CN, OU=OU, L=L, ST=ST, O=O, C=C\" -alias test -keypass 123456 -keystore C:\\DOCUME~1\\et4642\\LOCALS~1\\Temp\\keystore -storepass 123456'\r\nThe filename, directory name, or volume label syntax is incorrect.\r\n\r\nI tried adding backslash but that didn't help:\r\n\r\nC:\\b2bdev\\projects\\plexus\\plexus-utils>cmd.exe /X /C \"\\\"C:\\Program Files\\Java\\jdk1.5.0_11\\jre\\..\\bin\\keytool.exe\\\" -genkey -dname \\\"CN=CN, OU=OU, L=L, ST=ST, O=O, C=C\\\" -alias test -keypass 123456 -keystore keystore -storepass 123456\"\r\n'\\\"C:\\Program Files\\Java\\jdk1.5.0_11\\jre\\..\\bin\\keytool.exe\\\"' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n\r\ndoubling the quotes [1] seems the appropriate behavior:\r\n\r\nC:\\b2bdev\\projects\\plexus\\plexus-utils>cmd.exe /X /C \"\"C:\\Program Files\\Java\\jdk1.5.0_11\\jre\\..\\bin\\keytool.exe\" -genkey -dname \"CN=CN, OU=OU, L=L, ST=ST, O=O, C=C\" -alias test -keypass 123456 -keystore keystore -storepass 123456\"\r\nkeytool error: java.lang.Exception: Key pair not generated, alias already exists\r\n\r\n\r\n\r\nSo I tested the above patch and it works for me. Unfortunately it breaks 3 unit tests, but I believe these tests to be incorrect (their expectations are invalid).\r\n\r\nCan someone double check the issue ? I don't use Windows so much usually.\r\n\r\nI can provide a cleaned up unit test & patch. Thanks!\r\n\r\n\r\n[1] See also http://www.ss64.com/ntsyntax/esc.html \"Using \"Double Quotes\"\"","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2007-04-06T16:32:45.009-0500","updated":"2007-04-06T16:32:45.009-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49571/comment/92293","id":"92293","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"body":"And can someone affects the issue to 1.4.1, and bump the issue priority? I would like to update 2-3 maven plugins to p-u 1.4.x but won't be able until this is fixed. Thanks again!","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2007-04-06T16:34:48.115-0500","updated":"2007-04-06T16:34:48.115-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49571/comment/92297","id":"92297","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"body":"pasting code from the JDK is a bad idea, have you read the license...\r\n\r\nthis is definitely a regression on windows","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"created":"2007-04-06T17:03:13.904-0500","updated":"2007-04-06T17:03:13.904-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49571/comment/92350","id":"92350","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"body":"> pasting code from the JDK is a bad idea, have you read the license...\r\n\r\nHei Carlos. Sorry for that. That was the quickest way for me to reproduce the issue. The code is available in Google's cache for Sun's issue:\r\n\r\nhttp://66.102.9.104/search?q=cache:FLbIKWL9oqgJ:bugs.sun.com/bugdatabase/view_bug.do%3Fbug_id%3D6468220\r\n\r\nDo you want me to create a new test case without the offending code ?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2007-04-08T11:39:31.714-0500","updated":"2007-04-08T11:39:31.714-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49571/comment/92766","id":"92766","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"body":"yes, we can't use code from the JDK\r\n\r\nThis is definitely a regression, I think I added tests time ago for windows, probably they were incorrectly changed","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"created":"2007-04-12T13:49:11.240-0500","updated":"2007-04-12T13:49:11.240-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49571/comment/92921","id":"92921","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"body":"My only question then is: should we try to have clean room rewrite of the unit test (because I have seen the code I shouldn't have used), or is it OK if I rewrite them myself ?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2007-04-14T09:08:08.106-0500","updated":"2007-04-14T09:08:08.106-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49571/comment/93177","id":"93177","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"body":"My patch isn't complete. My plan is to do the following. Write a batch file to test the various expected behaviors.\r\n\r\nE.g. with a simple Echo class similar to this\r\n\r\npublic class Echo {\r\n public static void main(String[] args) {\r\n for (int i = 0; i < args.length; i++) {\r\n System.out.println(args[i]);\r\n }\r\n }\r\n}\r\n\r\nThen in the batch script, have\r\n\r\n\"...\\Program Files\\Java\\.....\\java.exe\" Echo\r\n\"...\\Program Files\\Java\\.....\\java.exe\" Echo \"Hihi\"\r\n\"...\\Program Files\\Java\\.....\\java.exe\" Echo \"Hello World\"\r\n\r\nsame command with a shell (find the appropriate quoting so that this works, probbaly needs double quotes)\r\n\r\ncmd /X /C \"...\\Program Files\\Java\\.....\\java.exe\" Echo\r\ncmd /X /C \"...\\Program Files\\Java\\.....\\java.exe\" Echo \"Hihi\"\r\ncmd /X /C \"...\\Program Files\\Java\\.....\\java.exe\" Echo \"Hello World\"\r\n\r\nAnd now same thing (with and without CMD) using another java.exe installed in a directory with non space in the absolute path.\r\n\r\nc:\\Java\\bin\\java.exe ....\r\n\r\nTest the batch script under XP. Store the logs.\r\n\r\nOnce this batch script works (i.e we've identified all the required quoting), write a simple java class that runs the same commands directly calling\r\n\r\nRuntime.getRuntime().exec(....)\r\n\r\nand figuring out what Runtime.getRuntime().exec() will require for this to work. From there it will be straightforward to write the patch.\r\n\r\nThanks to anyone running Windows for helping with the first part...","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2007-04-17T16:29:40.947-0500","updated":"2007-04-17T16:29:40.947-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49571/comment/93702","id":"93702","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"body":"jerome, if you go back in the revisions you could get my test, it was pretty complete for windows IIRC","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"created":"2007-04-20T12:53:50.474-0500","updated":"2007-04-20T12:53:50.474-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49571/comment/95162","id":"95162","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"body":"Seems regression of PLX-161","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"created":"2007-05-05T21:07:26.587-0500","updated":"2007-05-05T21:07:26.587-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49571/comment/95167","id":"95167","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=baerrach","name":"baerrach","emailAddress":"baerrach@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrie Treloar","active":true},"body":"Yes, this is a regression.\r\n\r\nrevision 5960 broke the windows tests.\r\n\r\nWill supply patch from the working revisions.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=baerrach","name":"baerrach","emailAddress":"baerrach@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrie Treloar","active":true},"created":"2007-05-06T00:37:45.026-0500","updated":"2007-05-06T00:37:45.026-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49571/comment/95768","id":"95768","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=baerrach","name":"baerrach","emailAddress":"baerrach@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrie Treloar","active":true},"body":"Patch that puts back the tests for windows full command line quoting.\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=baerrach","name":"baerrach","emailAddress":"baerrach@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrie Treloar","active":true},"created":"2007-05-13T04:05:12.374-0500","updated":"2007-05-13T04:05:12.374-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49571/comment/284883","id":"284883","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=fj","name":"fj","emailAddress":"Frank.Jakop@tolina.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Frank Jakop","active":true},"body":"Why use a shell at all? Using a shell has another nasty side-effect. Due to the process architecture on Windows the ececuted process is not terminated when hitting ctrl+c.\r\nSee http://jira.codehaus.org/browse/PLXUTILS-40?focusedCommentId=284881&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-284881","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=fj","name":"fj","emailAddress":"Frank.Jakop@tolina.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Frank Jakop","active":true},"created":"2011-12-05T00:56:45.387-0600","updated":"2011-12-05T00:56:45.387-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-32.json b/jira/PLXUTILS-32.json new file mode 100644 index 00000000..73b89955 --- /dev/null +++ b/jira/PLXUTILS-32.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"49847","self":"http://jira.codehaus.org/rest/api/latest/issue/49847","key":"PLXUTILS-32","fields":{"progress":{"progress":0,"total":0},"summary":"CommandLineUtils hangs when served interactive process execution","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-32/votes","votes":1,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T14:48:31.667-0600","customfield_10210":"2.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["lacostej(lacostej)","krosenvold(krosenvold)","michael-o(michael-o)"],"customfield_10160":null,"updated":"2014-11-25T14:48:31.748-0600","created":"2007-04-14T03:05:15.928-0500","description":"If I present a process that requires user input to the util classes, the execution will never end.\n\nThere are in fact several threading and io bugs in the code. I've fixed most of them, but still lack one. Providing my current patch as I have to take a break, maybe someone will identify the correct way to solve the issue.\n\nThe attached patch isn't yet complete as I don't manage to exactly reproduce the System.in behavior. Comments appreciated. I will look into that later this week-end or next week.\n\nNot sure if the problem is platform/JDK specific, haven't tried with other configurations Could be, so we need to find a solution that is resistant to external issues.\n\n[Gosh I am tired of having to fix these issues in all exec implementations... this is probably not supported by the CruiseControl implementations]","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-32/watchers","watchCount":3,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/26805","id":"26805","filename":"CommandLine utils.png","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2007-04-14T15:31:22.926-0500","size":71000,"mimeType":"image/png","content":"http://jira.codehaus.org/secure/attachment/26805/CommandLine+utils.png","thumbnail":"http://jira.codehaus.org/secure/thumbnail/26805/_thumb_26805.png"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/26794","id":"26794","filename":"PLXUTILS-XXX-incomplete-patch.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2007-04-14T03:05:15.936-0500","size":12233,"mimeType":"text/x-diff","content":"http://jira.codehaus.org/secure/attachment/26794/PLXUTILS-XXX-incomplete-patch.diff"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"Linux expresso2 2.6.20-14-generic #2 SMP Mon Apr 2 20:37:49 UTC 2007 i686 GNU/Linux\n\njava version \"1.5.0_11\"\nJava(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)\nJava HotSpot(TM) Server VM (build 1.5.0_11-b03, mixed mode)\n","timeestimate":null,"customfield_10130":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10053","value":"Yes","id":"10053"},"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":5,"total":5,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/49847/comment/92931","id":"92931","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"body":"Diagram representing the interaction of the various classes...\r\n\r\nSomeone wants to add this to the doc ? Maybe for the cli package.html","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2007-04-14T15:31:22.930-0500","updated":"2007-04-14T15:31:22.930-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49847/comment/92933","id":"92933","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"body":"(note in the diagram above read StreamFeeder instead of SystemFeeder).\r\n\r\nI've some more changes on my local tree, but still no clear solution to the problem.\r\n\r\nThe issue is coming from the StreamFeeder that blocks on the call to input.read(). Because it blocks, feed() doesn't terminate. And then inputFeeder.wait() blocks forever.\r\n\r\nUnfortunately I don't find a way to make sure read() stops hanging.\r\n\r\nI've tried:\r\n* closing the input stream (and I don't think this should be done anyway)\r\n* puting the inputFeeder to null and remove the call to wait(), to open that it would discard itself and be sufficient. That didn't help\r\n* I don't want to make it a daemon thread. Otherwise they would accumulate...\r\n* I've tried removing the direct call to read() and use an InputStreamReader.ready() call. It's better but doesn't cover all cases (i.e. it works with the official System.in, but doesn't work with other InputStream (probably because they don't support nio??)). So I don't like it. Maybe I missed something ?\r\n* I am now considering killing the thread.... Yack...\r\n\r\nThere must be a way to do this properly....","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2007-04-14T16:34:39.482-0500","updated":"2007-04-14T16:34:39.482-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49847/comment/92941","id":"92941","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"body":"I looked at how other implementations do their work:\r\n\r\nCruiseControl assumes no input stream is used.\r\n\r\nCommons exec makes the Thread that reads the input a DaemonThread. But I am not sure if commons-exec has the same problem as p-u.\r\nhttp://svn.apache.org/repos/asf/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/PumpStreamHandler.java\r\n\r\nIsn't there a part of maven that calls a process that interacts with the user ? ","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2007-04-15T01:56:40.800-0500","updated":"2007-04-15T01:56:40.800-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49847/comment/267161","id":"267161","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"All the threading bugs have been fixed as part of other issues, the only bit left in this issue might be about termination when reading from the console.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2011-05-16T12:41:50.773-0500","updated":"2011-05-16T12:41:50.773-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49847/comment/357616","id":"357616","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:48:31.746-0600","updated":"2014-11-25T14:48:31.746-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-33.json b/jira/PLXUTILS-33.json new file mode 100644 index 00000000..1db8af74 --- /dev/null +++ b/jira/PLXUTILS-33.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"49924","self":"http://jira.codehaus.org/rest/api/latest/issue/49924","key":"PLXUTILS-33","fields":{"progress":{"progress":0,"total":0},"summary":"Make plexus-utils Os more user friendly (patch attached)","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-33/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14029","id":"14029","description":"","name":"1.4.3","archived":false,"released":true,"releaseDate":"2007-07-13"}],"resolutiondate":"2007-05-31T09:14:49.204-0500","customfield_10210":"3.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["handyande(handyande)","brianfox(brianfox)"],"customfield_10160":null,"updated":"2008-02-02T15:37:02.053-0600","created":"2007-04-16T20:38:17.387-0500","description":"I used the os code quite extensively in the maven-enforcer-plugin. I found that I had to write a lot of workarounds for missing functionality. Specifically:\n-no way to find out what the current values are (especially family)\n-no way to get a list of possibly families\n\nI added more methods to os to get a list of valid families. The static name,version,arch are now public and an additional family static variable has been added. I also updated the java doc to remove references to ant. I also added unit tests for this and the existing functionality.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"240710400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-33/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=handyande","name":"handyande","emailAddress":"andy@handyande.co.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andrew Williams","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/26840","id":"26840","filename":"plexuspatch.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"created":"2007-04-16T20:38:17.395-0500","size":17071,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/26840/plexuspatch.patch"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/27082","id":"27082","filename":"plexuspatch2.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"created":"2007-04-30T22:10:45.695-0500","size":17322,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/27082/plexuspatch2.patch"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/27536","id":"27536","filename":"plexuspatch3.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"created":"2007-05-22T20:17:37.786-0500","size":16885,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/27536/plexuspatch3.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10053","value":"Yes","id":"10053"},"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":6,"total":6,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/49924/comment/93112","id":"93112","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=handyande","name":"handyande","emailAddress":"andy@handyande.co.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andrew Williams","active":true},"body":"A good patch. I was about to apply it but I noticed something that made me feel uneasy.\r\nThere are many lines in the isOs method consisting of something like:\r\n\r\nif ( OS_NAME.indexOf( FAMILY_SOMETHING ) )\r\n\r\nas can bee seen on some of the branches, the OS_NAME and FAMILY_X do not necessarily correlate, so I wonder if that is entirely appropriate? (see tandem or win9x tests)\r\n\r\nOf course as these values rearely chang then it is probably not a problem but it reads badly.\r\n\r\nOne other small issue is that there is a lot of refactoring of the javadoc. Where ant is removed it is good, but in some places the text is just moved around - sometimes for the better sometimes not, e.g. sometimes a @param has it's value on a new line, sometimes not - seems a shame as it was consistant before and it makes patches harder to read.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=handyande","name":"handyande","emailAddress":"andy@handyande.co.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andrew Williams","active":true},"created":"2007-04-17T05:27:04.389-0500","updated":"2007-04-17T05:27:04.389-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49924/comment/93851","id":"93851","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"body":"Hi Andy,\r\nWith the if (OS_NAME.....) stuff... \r\n\r\nWhat I simply did was define the strings so they could be used by someone else instead of them being hard coded and not accessible. Previously all of those lines simply tested against the string like if (OS_NAME.indexof (\"win9x\")). These strings needed to be used again to add it to the ValidFamilies array as well, having them defined twice inside the same class seemed bad.\r\n\r\nFor the javadoc, I noticed that eclipse reformatted some of it along the way on me. I tried to fix up all the ones that had no other changes, but I might have missed some. If it's a problem, I can update an resubmit the patch.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"created":"2007-04-22T21:51:32.805-0500","updated":"2007-04-22T21:51:32.805-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49924/comment/94365","id":"94365","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=handyande","name":"handyande","emailAddress":"andy@handyande.co.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andrew Williams","active":true},"body":"Yes I can see your point on the constants declaration. It was just little counter-intuative to have name.indexOf(FAMILY) at a first glance, but it does make sense having another look.\r\nI can commit as-is with no javadoc changes (to skip the reformat issues) but I see there were some good javadoc updates there, so it would be cool if you could provide another patch with the correct javadoc changes :)","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=handyande","name":"handyande","emailAddress":"andy@handyande.co.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andrew Williams","active":true},"created":"2007-04-27T14:54:20.266-0500","updated":"2007-04-27T14:54:20.266-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49924/comment/94666","id":"94666","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"body":"try this one on for size. All the jdocs should be consistent now.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"created":"2007-04-30T22:10:45.708-0500","updated":"2007-04-30T22:10:45.708-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49924/comment/96787","id":"96787","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"body":"updated patch. This should fix the jdoc format issues.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"created":"2007-05-22T20:17:37.797-0500","updated":"2007-05-22T20:17:37.797-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/49924/comment/97721","id":"97721","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=handyande","name":"handyande","emailAddress":"andy@handyande.co.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andrew Williams","active":true},"body":"Added to subversion.\r\n\r\nA small change was needed due to the order that the static fields were being created. The getOsFamily() method was called before the PATH_SEP field was defined, which it depended on.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=handyande","name":"handyande","emailAddress":"andy@handyande.co.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andrew Williams","active":true},"created":"2007-05-31T09:14:49.199-0500","updated":"2007-05-31T09:14:49.199-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-34.json b/jira/PLXUTILS-34.json new file mode 100644 index 00000000..e888f8f0 --- /dev/null +++ b/jira/PLXUTILS-34.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"51203","self":"http://jira.codehaus.org/rest/api/latest/issue/51203","key":"PLXUTILS-34","fields":{"progress":{"progress":0,"total":0},"summary":"BourneShell.java assumes its execuable is /bin/bash and therefor break in os that does not have /bin/bash","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-34/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14032","id":"14032","description":"","name":"1.4.6","archived":false,"released":true,"releaseDate":"2007-09-13"}],"resolutiondate":"2007-08-21T10:21:46.372-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=danttran","name":"danttran","emailAddress":"dantran@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Tran","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["handyande(handyande)","danttran(danttran)","jburrell(jburrell)"],"customfield_10160":null,"updated":"2008-02-02T15:32:57.062-0600","created":"2007-05-18T02:20:06.241-0500","description":"staring vervsion 1.4.1, Commandline now use /bin/bash to invoke execuable. This will not work on system that does have\n/bin/bash like AiX We should assume /bin/sh instead.\n\nI endedup to reverse back to plexus-utils-1.4\n\n\n\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[{"id":"17808","self":"http://jira.codehaus.org/rest/api/2/issueLink/17808","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"57114","key":"MJAVADOC-154","self":"http://jira.codehaus.org/rest/api/2/issue/57114","fields":{"summary":"Bump to plexus-utils:1.4.6","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false}}}}],"customfield_10163":"235699200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-34/watchers","watchCount":2,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=handyande","name":"handyande","emailAddress":"andy@handyande.co.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andrew Williams","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/28249","id":"28249","filename":"PLXUTILS-34.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jburrell","name":"jburrell","emailAddress":"jamieburrell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jamie Burrell","active":true},"created":"2007-07-03T07:22:57.326-0500","size":2512,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/28249/PLXUTILS-34.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"aix, solaris, linux","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/51203/comment/101137","id":"101137","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jburrell","name":"jburrell","emailAddress":"jamieburrell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jamie Burrell","active":true},"body":"Added a patch to cover this for 1.4.3-SNAPSHOT","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jburrell","name":"jburrell","emailAddress":"jamieburrell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jamie Burrell","active":true},"created":"2007-07-03T06:50:58.995-0500","updated":"2007-07-03T06:50:58.995-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/51203/comment/103458","id":"103458","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=danttran","name":"danttran","emailAddress":"dantran@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Tran","active":true},"body":"Can we have this applied? another benefit is surefire can use it as well to solve other fixes which were put in after 1.4","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=danttran","name":"danttran","emailAddress":"dantran@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Tran","active":true},"created":"2007-07-27T11:35:57.890-0500","updated":"2007-07-27T11:35:57.890-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-35.json b/jira/PLXUTILS-35.json new file mode 100644 index 00000000..5c3fde13 --- /dev/null +++ b/jira/PLXUTILS-35.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"51575","self":"http://jira.codehaus.org/rest/api/latest/issue/51575","key":"PLXUTILS-35","fields":{"progress":{"progress":0,"total":0},"summary":"Need to use getCanonicalFile() to delete long pathnames on Windows due to jdk bugs","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-35/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14029","id":"14029","description":"","name":"1.4.3","archived":false,"released":true,"releaseDate":"2007-07-13"}],"resolutiondate":"2007-05-26T15:41:48.956-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["olamy(olamy)","siveton(siveton)"],"customfield_10160":null,"updated":"2008-02-02T13:42:09.130-0600","created":"2007-05-26T08:44:53.498-0500","description":"The method FileUtils#deleteFile( File file ) should use getCanonicalFile() on windows. It is due to jvm bugs:\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4403166\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6182812\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6481955\n\nBTW these bugs have been fixed in jdk 6u1 and 5u11.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"16616","self":"http://jira.codehaus.org/rest/api/2/issueLink/16616","type":{"id":"10000","name":"Duplicate","inward":"is duplicated by","outward":"duplicates","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10000"},"inwardIssue":{"id":"51267","key":"MCLEAN-26","self":"http://jira.codehaus.org/rest/api/2/issue/51267","fields":{"summary":"Long pathnames on windows platforms cannot be deleted","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"241056000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-35/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/27599","id":"27599","filename":"PLXUTILS-35.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2007-05-26T08:46:19.122-0500","size":4724,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/27599/PLXUTILS-35.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"win xp","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/51575/comment/97128","id":"97128","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"Here is the fix and a test case","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2007-05-26T08:46:19.127-0500","updated":"2007-05-26T08:46:19.127-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/51575/comment/97161","id":"97161","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"Patch apply in rev 6517.\r\nsnapshot deployed 1.4.3-20070526.204011-1.\r\nThanks","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-05-26T15:41:48.951-0500","updated":"2007-05-26T15:41:48.951-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-36.json b/jira/PLXUTILS-36.json new file mode 100644 index 00000000..192d18ea --- /dev/null +++ b/jira/PLXUTILS-36.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"52038","self":"http://jira.codehaus.org/rest/api/latest/issue/52038","key":"PLXUTILS-36","fields":{"progress":{"progress":0,"total":0},"summary":"Off-by-one error in CommandLineUtils.getSystemEnvVars(boolean) breaks envvars with single character names","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-36/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14029","id":"14029","description":"","name":"1.4.3","archived":false,"released":true,"releaseDate":"2007-07-13"}],"resolutiondate":"2007-06-30T06:32:41.802-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=maxb","name":"maxb","emailAddress":"maxb@f2s.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Max Bowsher","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["maxb(maxb)","olamy(olamy)"],"customfield_10160":null,"updated":"2008-02-02T15:35:32.786-0600","created":"2007-06-05T10:05:58.540-0500","description":"There is an off-by-one error in org.codehaus.plexus.util.cli.CommandLineUtils.getSystemEnvVars(boolean) which manifests as environment variables having a single character name being ignored, and the previously occurring envvar being corrupted.\n\nI noticed this one when it broke \"mvn deploy\", by corrupting my SSH_AUTH_SOCK environment variable.\n\nThe error is in the parsing of the output of the \"env\" program - the code does:\n{code}\n int idx = line.indexOf( '=' );\n\n if ( idx > 1 )\n{code}\n\nThe correct test is\n{code}\n if ( idx > 0 )\n{code}","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"238118400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-36/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/52038/comment/100912","id":"100912","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"Fix svn rev 6570. (snapshot deployed)\r\nThanks.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-06-30T06:32:41.794-0500","updated":"2007-06-30T06:32:41.794-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-37.json b/jira/PLXUTILS-37.json new file mode 100644 index 00000000..6f734d9e --- /dev/null +++ b/jira/PLXUTILS-37.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"52218","self":"http://jira.codehaus.org/rest/api/latest/issue/52218","key":"PLXUTILS-37","fields":{"progress":{"progress":0,"total":0},"summary":"Ability to pick items from a list in a property declaration.","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-37/votes","votes":7,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2009-01-06T17:58:36.973-0600","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jburrell","name":"jburrell","emailAddress":"jamieburrell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jamie Burrell","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["hubick(hubick)","ccaraivan(ccaraivan)","danielharvey(danielharvey)","jburrell(jburrell)","hohwille(hohwille)","rpassos(rpassos)","siveton(siveton)"],"customfield_10160":null,"updated":"2011-09-01T17:43:12.443-0500","created":"2007-06-06T05:01:13.172-0500","description":"I needed the ability to get values from lists in the Maven POM, like so:\n\nproject.developers.0.id (should give me project.getDevelopers().get(0).getId()).\n\nI couldn't find how to do it, and after looking in the 1.4.3 trunk source of Plexus Utils, found that it was impossible to do as it stands (correct me if I'm wrong).\n\nThis patch has been created using the premise that Java variable names cannot be numbers. Thus, if the property token is an integer, treat it as an index and call get(), otherwise continue as normal.\n\nThe JUnit test for the affected class has been patched too, and runs successfully.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"106358400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-37/watchers","watchCount":11,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/27818","id":"27818","filename":"plexus-utils-index.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jburrell","name":"jburrell","emailAddress":"jamieburrell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jamie Burrell","active":true},"created":"2007-06-06T05:01:13.176-0500","size":7303,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/27818/plexus-utils-index.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":"plexus-utils 1.4.3-SNAPSHOT","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":6,"total":6,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/52218/comment/111970","id":"111970","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hubick","name":"hubick","emailAddress":"chris@hubick.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Chris Hubick","active":true},"body":"What would be really nice is the ability to have some way to use an XPath!\r\n\r\n\r\n ...\r\n \r\n ${'urn:xpath:/project/developers/developer[properties/user.name=\"${user.name}\"]/id'}\r\n \r\n\r\n\r\nOr that may be crazy talk?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hubick","name":"hubick","emailAddress":"chris@hubick.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Chris Hubick","active":true},"created":"2007-10-29T20:19:37.762-0500","updated":"2007-10-29T20:19:37.762-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/52218/comment/118179","id":"118179","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=danielharvey","name":"danielharvey","emailAddress":"daniel@amristar.com.au","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Daniel Harvey","active":true},"body":"I'd love to see this patch incorporated.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=danielharvey","name":"danielharvey","emailAddress":"daniel@amristar.com.au","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Daniel Harvey","active":true},"created":"2007-12-29T22:54:50.590-0600","updated":"2007-12-29T22:54:50.590-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/52218/comment/160175","id":"160175","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"Fixed in [r8008|http://fisheye.codehaus.org/changelog/plexus/?cs=8008]\r\n\r\nThe patch wasn't apply because I prefer to use the common JSP approach as defined in [this Struts article|http://struts.apache.org/1.x/struts-taglib/indexedprops.html]. \r\nMainly, you could use:\r\n* project.dependencies[0] if dependencies is a java.util.List object or an array object\r\n* project.dependenciesAsMap(dep1) if dependenciesAsMap is a java.util.Map object","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-01-06T17:58:36.961-0600","updated":"2009-01-06T17:58:36.961-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/52218/comment/231882","id":"231882","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ccaraivan","name":"ccaraivan","emailAddress":"ccaraivan@axway.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Costin Caraivan","active":true},"body":"It doesn't work. I don't know what kind of object is, but it's not a List (or at least it doesn't act like one), and it's not a Map. Neither of those methods work.\r\n\r\nTry: \r\nmvn help:evaluate, then ${project.dependenciesAsMap()} and ${project.dependencies[0]}","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ccaraivan","name":"ccaraivan","emailAddress":"ccaraivan@axway.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Costin Caraivan","active":true},"created":"2010-08-13T03:38:47.881-0500","updated":"2010-08-13T03:38:47.881-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/52218/comment/244106","id":"244106","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hohwille","name":"hohwille","emailAddress":"joerg@j-hohwiller.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jörg Hohwiller","active":true},"body":"This issue is closed as fixed but it does not work.\r\nCould you please reopen. Even setting to \"wontfix\" is better than leaving as fixed.\r\nI would like to get the license via ${project.lincenses.0.license.name} or ${project.lincenses[0].license.name} but there seems to be no way to do so via variables.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hohwille","name":"hohwille","emailAddress":"joerg@j-hohwiller.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jörg Hohwiller","active":true},"created":"2010-11-23T04:52:19.742-0600","updated":"2010-11-23T04:52:19.742-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/52218/comment/277589","id":"277589","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=rpassos","name":"rpassos","emailAddress":"renato.passos.santos@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Renato Passos Santos","active":true},"body":"I would also like to ask to have this issue re-opened.\r\n\r\nFunniest thing is, when I use _\"mvn help:evaluate\"_ on the command-line and then input \"${project.activeProfiles[0].id}\" I have the correct answer. But when I try to use that expression during the build process to set a property to a given value - for example:\r\n\r\njdbc:hsqldb:file:${project.build.directory}/arquivosDesenv/${project.activeProfiles[0].id}/db/${db.name}.db;shutdown=true\r\n\r\n...the \"${project.activeProfiles[0].id}\" expression is the only one that is never evaluated to anything - all the others work. Actually, all of the above expression evaluates correctly during _\"mvn help:evaluate\"_, but doesn't work at all in the build process itself!","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=rpassos","name":"rpassos","emailAddress":"renato.passos.santos@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Renato Passos Santos","active":true},"created":"2011-09-01T17:43:12.328-0500","updated":"2011-09-01T17:43:12.328-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-38.json b/jira/PLXUTILS-38.json new file mode 100644 index 00000000..44a829ee --- /dev/null +++ b/jira/PLXUTILS-38.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"53539","self":"http://jira.codehaus.org/rest/api/latest/issue/53539","key":"PLXUTILS-38","fields":{"progress":{"progress":0,"total":0},"summary":"BourneShell#getExecutable() doesnt support quote","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-38/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14029","id":"14029","description":"","name":"1.4.3","archived":false,"released":true,"releaseDate":"2007-07-13"}],"resolutiondate":"2007-07-07T07:20:10.700-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["olamy(olamy)","siveton(siveton)"],"customfield_10160":null,"updated":"2008-02-02T15:35:13.077-0600","created":"2007-07-06T09:45:37.591-0500","description":"Suppose that you have this following structure:\n{noformat} \n/dir/quotedpath'test/executable\n{noformat} \n\nBourneShell#getExecutable() calls \"cd /dir/quotedpath'test && /dir/quotedpath'test/executable\" which fails on unix system.\nWe need to replace *'* by *\\\\'*","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"17121","self":"http://jira.codehaus.org/rest/api/2/issueLink/17121","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"52658","key":"MJAVADOC-127","self":"http://jira.codehaus.org/rest/api/2/issue/52658","fields":{"summary":"Tests fail on MacOS X","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"237513600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-38/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/28286","id":"28286","filename":"quoted.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2007-07-06T09:45:37.598-0500","size":6668,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/28286/quoted.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":"Unix based","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/53539/comment/101577","id":"101577","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"patch commit in rev 6605.\r\nThanks.\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-07-07T07:20:10.678-0500","updated":"2007-07-07T07:20:10.678-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-39.json b/jira/PLXUTILS-39.json new file mode 100644 index 00000000..bc7a9611 --- /dev/null +++ b/jira/PLXUTILS-39.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"54158","self":"http://jira.codehaus.org/rest/api/latest/issue/54158","key":"PLXUTILS-39","fields":{"progress":{"progress":0,"total":0},"summary":"Faulty test in CommandlineTest","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-39/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14030","id":"14030","description":"","name":"1.4.4","archived":false,"released":true,"releaseDate":"2007-07-20"}],"resolutiondate":"2007-07-20T17:28:07.248-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jason","name":"jason","emailAddress":"jason@takari.io","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jason van Zyl","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["jason(jason)","olamy(olamy)"],"customfield_10160":null,"updated":"2008-02-02T13:42:40.194-0600","created":"2007-07-20T16:22:00.102-0500","description":"Line 333 the testEnvironmentWitSystemEnvironment() test expects a System property of JAVA_HOME which doesn't exist unless you set it. It's \"java.home\" which is the system property. I don't know what this test is trying to accomplish. I've commented it out because it fails and would never work unless you manually set a JAVA_HOME system property, it's only an envar.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"236304000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-39/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/54158/comment/102820","id":"102820","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"uhm will be difficult to run this junit with mvn without having a JAVA_HOME envvar ? (before commit tested with windows and solaris).\r\nchanged in rev 6555. To be sure of this test working adding this in pom (surefire configuration) :\r\n{code:xml} \r\n \r\n \r\n JAVA_HOME\r\n ${JAVA_HOME} \r\n \r\n \r\n M2_HOME\r\n ${M2_HOME} \r\n \r\n \r\n{code}\r\nI wanted to check using overriding of envvar when with Runtime.getRuntime().exec(cmd, String[]).\r\nBefore the changes, it was impossible to override envar in a *n*x env.\r\nUse case : having a .profile with a JAVA_HOME defined, export a different JAVA_HOME in the current shell session.\r\nUsing CommandLine class with overriding JAVA_HOME (with method addEnvironment(String, String) failed because the generated String[] contains three differents \"JAVA_HOME=.\".\r\nIt was to ensure this fix works with a junit.\r\n\r\nBut now I'm sure it works and we can remove the junit :-) if you prefer.\r\n\r\n--\r\nOlivier\r\n\r\nPS : the fix not the junit was needed to fix CONTINUUM-44\r\n\r\n\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-07-20T17:10:39.444-0500","updated":"2007-07-20T17:10:39.444-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/54158/comment/102823","id":"102823","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jason","name":"jason","emailAddress":"jason@takari.io","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jason van Zyl","active":true},"body":"Just remove the faulty test. Entirely setup and system specific.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jason","name":"jason","emailAddress":"jason@takari.io","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jason van Zyl","active":true},"created":"2007-07-20T17:28:07.240-0500","updated":"2007-07-20T17:28:07.240-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-4.json b/jira/PLXUTILS-4.json new file mode 100644 index 00000000..26848a60 --- /dev/null +++ b/jira/PLXUTILS-4.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"20183","self":"http://jira.codehaus.org/rest/api/latest/issue/20183","key":"PLXUTILS-4","fields":{"progress":{"progress":0,"total":0},"summary":"Put the tests for plexus-utils back.","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-4/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14044","id":"14044","description":"","name":"1.0","archived":true,"released":true,"releaseDate":"2005-05-27"}],"resolutiondate":"2005-01-06T14:38:32.000-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=trygvis","name":"trygvis","emailAddress":"trygvis@inamo.no","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Trygve Laugstøl","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["trygvis(trygvis)"],"customfield_10160":null,"updated":"2008-02-02T16:01:50.278-0600","created":"2005-01-06T11:17:25.000-0600","description":"When the utils was split out of the container the tests remained with the container. ","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"316224000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-4/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=trygvis","name":"trygvis","emailAddress":"trygvis@inamo.no","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Trygve Laugstøl","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-40.json b/jira/PLXUTILS-40.json new file mode 100644 index 00000000..0152e1de --- /dev/null +++ b/jira/PLXUTILS-40.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"54267","self":"http://jira.codehaus.org/rest/api/latest/issue/54267","key":"PLXUTILS-40","fields":{"progress":{"progress":0,"total":0},"summary":"shutdown hook in CommandLineUtils does not kill process with GUI on windows","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-40/votes","votes":6,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jaxzin","name":"jaxzin","emailAddress":"brian@jaxzin.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brian Jackson","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","jaxzin(jaxzin)","fj(fj)","jan.sievers(jan.sievers)","krosenvold(krosenvold)","mkleint(mkleint)"],"customfield_10160":null,"updated":"2014-02-12T07:52:38.189-0600","created":"2007-07-24T22:50:48.651-0500","description":"Calling executeCommandLine(\"notepad\", new MyStreamConsumer(), new MyStreamConsumer()) on Windows and then Ctrl-C the process. Notepad is left running in background. Problem also exists for long running java processes.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"23586","self":"http://jira.codehaus.org/rest/api/2/issueLink/23586","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"89238","key":"MNG-4229","self":"http://jira.codehaus.org/rest/api/2/issue/89238","fields":{"summary":"ctrl+c interrupted maven junit tests don't actually get interrupted in windows","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"33940","self":"http://jira.codehaus.org/rest/api/2/issueLink/33940","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"148610","key":"MSHARED-295","self":"http://jira.codehaus.org/rest/api/2/issue/148610","fields":{"summary":"Non reliable killing of processes by CommandLineUtils","status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}}],"customfield_10163":"29116800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-40/watchers","watchCount":7,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"Windows XP SP2\nMaven 2.0.7\nplexus-utils 1.1-beta-2","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":4,"total":4,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/54267/comment/142531","id":"142531","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"As described in the API docs for {{CommandLineUtils.killProcess()}} this is not possible due to a limitation of the Windows process model, compare [Sun Bug ID 4770092|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4770092].\r\n\r\nYou could try out the upcoming [Commons Exec|http://commons.apache.org/exec/] which to my knowledge launches programs directly instead of using \"cmd.exe\". Taking this intermediate process out of the game might at least make your scenaria with Notepad work.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-07-20T13:51:10.672-0500","updated":"2008-07-20T13:51:10.672-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/54267/comment/170984","id":"170984","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mkleint","name":"mkleint","emailAddress":"mkleint@codehaus.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Milos Kleint","active":true},"body":"Actually I seem to have problems with it even on linux. it seems the only way that kills a running test for example is Ctrl-C on console. Sending appropriate (I've tried many) signals to the maven build only kills the build but the test keeps running. Sometimes the Shutdown hooks that shall kill the subprocess are run, sometimes not.\r\n\r\nI've tried to write a -javaagent for the maven build that patches the org.codehaus.classworlds.Launcher class (main class of the build JVM) to spawn a Thread that just listens on a port and when the connection is established, kills itself with System.exit().\r\nThat seems to exhibit the same behaviour as sending signals. The build jvm is shutdown, the shutdown hooks are run, but the forked test JVM keeps running. I suspect it's caused by the (IMHO dubious) execution of \"sh -c cd && java -cp \". What purpose does the shell wrapping and cd command execution serve?\r\n\r\nnetbeans integration issue that is related to this problem.\r\nhttp://www.netbeans.org/issues/show_bug.cgi?id=135475","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mkleint","name":"mkleint","emailAddress":"mkleint@codehaus.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Milos Kleint","active":true},"created":"2009-03-25T15:37:55.372-0500","updated":"2009-03-25T15:37:55.372-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/54267/comment/284881","id":"284881","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=fj","name":"fj","emailAddress":"Frank.Jakop@tolina.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Frank Jakop","active":true},"body":"The problem is located in {{org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLineAsCallable(Commandline, InputStream, StreamConsumer, StreamConsumer, int)}}.\r\n\r\nIf you replace the line \r\n{noformat}\r\nfinal Process p = cl.execute();\r\n{noformat}\r\n, which executes the process (notepad) with {{cmd.exe}} with a direct execution like \r\n{noformat}\r\nProcess pr = null;\r\n try \\{\r\n pr = Runtime.getRuntime().exec(cl.getCommandline(), cl.getEnvironmentVariables(), cl.getWorkingDirectory());\r\n } catch (IOException e) {\r\n throw new CommandLineException(\"Failed to start process\", e);\r\n }\r\n\r\n final Process p = pr;\r\n{noformat}\r\n\r\ntermination behaviour works as expected, at least, if notepad does not start child processe ;)\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=fj","name":"fj","emailAddress":"Frank.Jakop@tolina.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Frank Jakop","active":true},"created":"2011-12-05T00:51:44.964-0600","updated":"2011-12-05T00:51:44.964-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/54267/comment/341281","id":"341281","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jan.sievers","name":"jan.sievers","emailAddress":"jan.sievers@sap.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jan Sievers","active":true},"body":"{quote}\r\nI suspect it's caused by the (IMHO dubious) execution of \"sh -c cd && java -cp \". What purpose does the shell wrapping and cd command execution serve?\r\n{quote}\r\n\r\nI guess the shell cd command is an ancient workaround for pre- JDK 1.3 times when the [java.lang.Runtime.exec(...)|http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html] methods did not have a File workingDir parameter yet.\r\nYou can check the @since 1.3 annotations of the methods. Apache commons-exec still has the [same workaround in the code| http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/WinNTCommandLauncher.java?view=markup] but it's no longer used. Actual [implementation uses JDK >= 1.3| http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java?view=markup].\r\n\r\nIn a similar [tycho bug|https://bugs.eclipse.org/bugs/show_bug.cgi?id=427556], the intermediate shell was the root cause and omitting it (by using commons-exec) fixed the problem.\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jan.sievers","name":"jan.sievers","emailAddress":"jan.sievers@sap.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jan Sievers","active":true},"created":"2014-02-12T07:52:38.189-0600","updated":"2014-02-12T07:52:38.189-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-41.json b/jira/PLXUTILS-41.json new file mode 100644 index 00000000..b608bf30 --- /dev/null +++ b/jira/PLXUTILS-41.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"54784","self":"http://jira.codehaus.org/rest/api/latest/issue/54784","key":"PLXUTILS-41","fields":{"progress":{"progress":0,"total":0},"summary":"create a doclet for @plexus.* CDC tags to make better javadoc","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-41/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14032","id":"14032","description":"","name":"1.4.6","archived":false,"released":true,"releaseDate":"2007-09-13"}],"resolutiondate":"2007-08-25T16:22:27.240-0500","customfield_10210":"2.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["brettporter(brettporter)","olamy(olamy)","siveton(siveton)"],"customfield_10160":null,"updated":"2008-02-02T15:53:43.535-0600","created":"2007-08-07T03:16:45.226-0500","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"233193600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-41/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/29129","id":"29129","filename":"plexus-javadoc.png","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2007-08-24T07:58:06.775-0500","size":69572,"mimeType":"image/png","content":"http://jira.codehaus.org/secure/attachment/29129/plexus-javadoc.png","thumbnail":"http://jira.codehaus.org/secure/thumbnail/29129/_thumb_29129.png"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/29128","id":"29128","filename":"plexus-javadoc.zip","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2007-08-24T07:58:06.768-0500","size":21709,"mimeType":"application/zip","content":"http://jira.codehaus.org/secure/attachment/29128/plexus-javadoc.zip"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":3,"total":3,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/54784/comment/105633","id":"105633","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"I don't like the idea to put Plexus taglets or doclets directly in p-u.\r\n- we need a new dependency tools.jar from sun\r\n- we want to use it in the maven-javadoc-plugin as a Tag dependency, ie something like the following:\r\n\r\n{code:xml} \r\n\r\n ...\r\n \r\n \r\n \r\n org.apache.maven.plugins\r\n maven-javadoc-plugin\r\n \r\n \r\n \r\n org.codehaus.plexus.javadoc.PlexusComponentTaglet\r\n \r\n org.codehaus.plexus\r\n plexus-javadoc\r\n 1.0-SNAPSHOT\r\n \r\n \r\n \r\n ...\r\n \r\n \r\n \r\n ...\r\n \r\n{code} \r\n\r\nSo, I proposed to create a new Plexus project, called plexus-javadoc to handle @plexus.* CDC tags. See the PNG to see the result.\r\n\r\nThis patch contains Taglets, tests with maven-javadoc-plugin and site.\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2007-08-24T07:58:06.778-0500","updated":"2007-08-24T07:58:06.778-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/54784/comment/105695","id":"105695","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"plexus-tools looks a nice place to put this.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-08-25T14:57:34.340-0500","updated":"2007-08-25T14:57:34.340-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/54784/comment/105699","id":"105699","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"Comiited in rev 6797.\r\nThanks.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-08-25T16:22:27.233-0500","updated":"2007-08-25T16:22:27.233-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-42.json b/jira/PLXUTILS-42.json new file mode 100644 index 00000000..c7cb2049 --- /dev/null +++ b/jira/PLXUTILS-42.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"55261","self":"http://jira.codehaus.org/rest/api/latest/issue/55261","key":"PLXUTILS-42","fields":{"progress":{"progress":0,"total":0},"summary":"Add XhtmlXpp3DomBuilder to handle xhtml specific features ","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-42/votes","votes":0,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["maxb(maxb)","siveton(siveton)"],"customfield_10160":null,"updated":"2007-08-22T05:37:10.679-0500","created":"2007-08-21T07:21:56.604-0500","description":"The current Xpp3DomBuilder and Xpp3Dom classes do not support xhtml specific features like text, comment, doctype and cdata.\nI propose to add in p-u XhtmlXpp3DomBuilder which includes XhtmlXpp3Dom to fix them. The XhtmlXpp3Dom class extends Xpp3Dom and overrides toString() to beautify the renderer.\n\nComments are welcome.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"233539200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-42/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/29054","id":"29054","filename":"XhtmlXpp3DomBuilder.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2007-08-21T07:21:56.611-0500","size":16708,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/29054/XhtmlXpp3DomBuilder.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":4,"total":4,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/55261/comment/105308","id":"105308","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=maxb","name":"maxb","emailAddress":"maxb@f2s.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Max Bowsher","active":true},"body":"The concepts of text, comment, doctype and cdata are not XHTML-specific, they are pure XML. So the proposed classnames do not make any sense.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=maxb","name":"maxb","emailAddress":"maxb@f2s.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Max Bowsher","active":true},"created":"2007-08-21T07:55:12.581-0500","updated":"2007-08-21T07:55:12.581-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/55261/comment/105384","id":"105384","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"Agree with your comment for doctype, comment and cdata but not for text. \r\n\r\nIn xhtml, we could have\r\n{code:xml}\r\n

\r\n An build tool like maven is very nice.\r\n

\r\n{code} \r\n\r\nand in xml, we should have:\r\n{code:xml}\r\n

\r\n An build tool like maven is very nice.\r\n

\r\n{code} \r\n\r\nWFYT?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2007-08-21T21:09:08.089-0500","updated":"2007-08-21T21:09:08.089-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/55261/comment/105409","id":"105409","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=maxb","name":"maxb","emailAddress":"maxb@f2s.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Max Bowsher","active":true},"body":"Afraid I have to disagree again.\r\n\r\nTTBOMK, for your comment to be correct, you need to replace \"in xml\" with \"in a particular application of xml which adds the additional restriction that tags may contain only tags *or* text, not a mixture of both\".\r\n\r\nXHTML 1.0 is an application of XML 1.0 - i.e. there is no correct XHTML 1.0 syntax that is not also correct XML 1.0.\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=maxb","name":"maxb","emailAddress":"maxb@f2s.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Max Bowsher","active":true},"created":"2007-08-22T05:36:23.722-0500","updated":"2007-08-22T05:36:23.722-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/55261/comment/105410","id":"105410","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=maxb","name":"maxb","emailAddress":"maxb@f2s.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Max Bowsher","active":true},"body":"Also, \"WFYT?\" == ???","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=maxb","name":"maxb","emailAddress":"maxb@f2s.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Max Bowsher","active":true},"created":"2007-08-22T05:37:10.670-0500","updated":"2007-08-22T05:37:10.670-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-43.json b/jira/PLXUTILS-43.json new file mode 100644 index 00000000..10b3835c --- /dev/null +++ b/jira/PLXUTILS-43.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"55266","self":"http://jira.codehaus.org/rest/api/latest/issue/55266","key":"PLXUTILS-43","fields":{"progress":{"progress":0,"total":0},"summary":"Review Notification for PLXUTILS","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-43/votes","votes":1,"hasVoted":false},"resolution":null,"fixVersions":[],"resolutiondate":null,"customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","siveton(siveton)"],"customfield_10160":null,"updated":"2008-07-20T11:21:43.317-0500","created":"2007-08-21T07:50:51.831-0500","description":"No email is send to the reporter.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"204681600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-43/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/55266/comment/142518","id":"142518","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Confirming to be still an issue.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-07-20T11:21:43.307-0500","updated":"2008-07-20T11:21:43.307-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-44.json b/jira/PLXUTILS-44.json new file mode 100644 index 00000000..4c7ac46e --- /dev/null +++ b/jira/PLXUTILS-44.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"55274","self":"http://jira.codehaus.org/rest/api/latest/issue/55274","key":"PLXUTILS-44","fields":{"progress":{"progress":0,"total":0},"summary":"Backslash is neither quoted nor escaped on Bash","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-44/votes","votes":1,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T14:30:41.519-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=sannies","name":"sannies","emailAddress":"Sebastian.Annies@googlemail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Sebastian Annies","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["michael-o(michael-o)","sannies(sannies)"],"customfield_10160":null,"updated":"2014-11-25T14:30:41.564-0600","created":"2007-08-21T10:32:54.314-0500","description":"The error occurs with Maven-SCM & continuum in my case. Maven-SCM creates following commandline:\n\n{{/bin/bash \\-c \"p4 -d /opt/continuum-1.1-beta-3-SNAPSHOT/apps/continuum/webapp/WEB-INF/working-directory/1 -cbackground-sojus-MavenSCM\\opt\\continuum-1.1-beta-3-SNAPSHOT\\apps\\continuum\\webapp\\WEB-INF\\working-directory\\1 sync\"}}\n\nthe \\-c argument is created by: \n\n{{Commandline command = PerforceScmProvider.createP4Command( repo, workingDirectory );}}\n{{command.createArgument().setValue( \"-c\"+ specname );}}\n\nthe specname contains backslashes. The bash then removes the backslashes in {{specname}}. Ouch! That doesn't work. I think that CommandLine (or the underlying Shell) has to deal with this case. What do you think?\n\nTo test easily type:\n{{/bin/bash \\-c \"echo a\\\\bc\"}}\nresult: abc\n\nSolution 1:\n{{/bin/bash \\-c \"echo a\\\\\\\\bc\"}}\nresult: ab\\\\c\n\nSolution 2:\n{{/bin/bash \\-c \"echo 'a\\\\bc'\"}}\nresult: ab\\\\c\n\n\n\n\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"17475","self":"http://jira.codehaus.org/rest/api/2/issueLink/17475","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"55262","key":"CONTINUUM-1402","self":"http://jira.codehaus.org/rest/api/2/issue/55262","fields":{"summary":"Syncing with Perforce on Linux/Unix/Bash fails","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-44/watchers","watchCount":3,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"Bash / Unix","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":3,"total":3,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/55274/comment/105337","id":"105337","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=sannies","name":"sannies","emailAddress":"Sebastian.Annies@googlemail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Sebastian Annies","active":true},"body":"Ignore the \"To test easily type:\" examples. I have difficulties with the wiki syntax:\r\n\r\nTo test easily type:\r\n/bin/bash -c \"echo a\\bc\"\r\nresult: abc\r\n\r\nSolution 1:\r\n/bin/bash -c \"echo a\\ \\bc\"\r\nresult: ab\\c\r\n\r\nSolution 2:\r\n/bin/bash -c \"echo 'a\\bc'\"\r\nresult: ab\\c","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=sannies","name":"sannies","emailAddress":"Sebastian.Annies@googlemail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Sebastian Annies","active":true},"created":"2007-08-21T10:35:38.819-0500","updated":"2007-08-21T10:35:38.819-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/55274/comment/106314","id":"106314","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=sannies","name":"sannies","emailAddress":"Sebastian.Annies@googlemail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Sebastian Annies","active":true},"body":"This is a pain in the ... \r\n\r\ndepending on the shell we start the bash we have to escape differently: \r\n\r\nif the shell we start bash -c ... is not a bash (and is not using backslash (\\) as an escape character) we have to escape backslash with backslash. But if the shell we start the bash in is itself a bash we have to add three more backslashes: The first call to the bash (the call that will start bash itself) makes 4 backslashes to 2 backslashes. The bash that has be instantiated by the call will now process the arguements again and will reduce the number of backslashes to just one backslash. OUCH. I hate unix\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=sannies","name":"sannies","emailAddress":"Sebastian.Annies@googlemail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Sebastian Annies","active":true},"created":"2007-09-03T13:54:47.159-0500","updated":"2007-09-03T13:54:47.159-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/55274/comment/357280","id":"357280","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:30:41.544-0600","updated":"2014-11-25T14:30:41.544-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-45.json b/jira/PLXUTILS-45.json new file mode 100644 index 00000000..fb7679f0 --- /dev/null +++ b/jira/PLXUTILS-45.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"55301","self":"http://jira.codehaus.org/rest/api/latest/issue/55301","key":"PLXUTILS-45","fields":{"progress":{"progress":0,"total":0},"summary":"Test methods in DirectoryScannerTest do not actually test the DirectoryScanner class","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-45/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/6","id":"6","description":"The issue is not a bug","name":"Not A Bug"},"fixVersions":[],"resolutiondate":"2008-07-20T14:03:41.485-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=wfay","name":"wfay","emailAddress":"waynefay@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Wayne Fay","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","wfay(wfay)"],"customfield_10160":null,"updated":"2008-07-20T14:03:41.479-0500","created":"2007-08-21T20:41:27.947-0500","description":"I've been poking around in Plexus lately and patching a few JIRA issues. I thought I'd debug PLXUTILS-8 a bit so I looked at DirectoryScannerTest.java.\n\nHumorously enough, while the file is named DirectoryScannerTest, there is not a single mention of DS anywhere in the tests nor in the file itself.\n\nThis file should be renamed, or eliminated with the tests in the file moved to FileUtilsTest. Also, DS could stand to have some unit tests added, but that's another story...","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"204681600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-45/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/55301/comment/142533","id":"142533","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"The tests call {{FileUtils.getFiles()}} which at the end of the day boils down to the {{DirectoryScanner}}, so effectively it's doing the job.\r\n\r\nbq. Also, DS could stand to have some unit tests added, but that's another story...\r\nLet's hope the Ant guys have some, then the copy here at plexus-utils should be fine, too ;-)","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-07-20T14:03:41.475-0500","updated":"2008-07-20T14:03:41.475-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-46.json b/jira/PLXUTILS-46.json new file mode 100644 index 00000000..c8d5cd7a --- /dev/null +++ b/jira/PLXUTILS-46.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"55784","self":"http://jira.codehaus.org/rest/api/latest/issue/55784","key":"PLXUTILS-46","fields":{"progress":{"progress":0,"total":0},"summary":"NPE in DirectoryScanner.scandir with dangling NTFS junctions","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-46/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14039","id":"14039","description":"","name":"1.3","archived":false,"released":true,"releaseDate":"2006-09-28"}],"resolutiondate":"2008-07-20T15:20:09.553-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=u_302320","name":"u_302320","emailAddress":"make@gmx.li","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Matthias Kerkhoff","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","u_302320(u_302320)"],"customfield_10160":null,"updated":"2008-07-20T15:20:09.545-0500","created":"2007-09-04T05:15:21.549-0500","description":"NTFS supports symbolic links to directories, so-called junction points or junctions. It is possible to create a junction point and delete the target directory afterwards. The junction point itself continues to exist although its target does no longer exist (quite similar to unix symbolic links). \nIf a DirectoryScanner.scan() is executed with the junction point as basedir an NPE will be thrown:\n\n{noformat}\njava.lang.NullPointerException\n at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:712)\n at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:593)\n at de.xxx.yyy.utils.FileUtil.findDirectories(FileUtil.java:315)\n{noformat}\n\nThis happens because the code in DirectoryScanner.scan does properly handle this case\n{preformat}\n if ( !basedir.exists() )\n {\n throw new IllegalStateException( \"basedir \" + basedir\n + \" does not exist\" );\n }\n{preformat}\ndoes not work for junction points with non-existing target.\n\nA possible solution might be to reactivate the initial check in DiectoryScanner.scandir() which is currently commented out.\n{preformat}\n if ( newfiles == null )\n {\n /*\n * two reasons are mentioned in the API docs for File.list\n * (1) dir is not a directory. This is impossible as\n * we wouldn't get here in this case.\n * (2) an IO error occurred (why doesn't it throw an exception\n * then???)\n */\n //throw new Exception( \"IO error scanning directory \" + dir.getAbsolutePath() );\n }\n{preformat}\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"204681600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-46/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14048","id":"14048","description":"","name":"1.0.4","archived":true,"released":true,"releaseDate":"2005-10-11"}],"customfield_10170":null,"environment":"Windows XP, NTFS, plexus-utils-1.0.4","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/55784/comment/142537","id":"142537","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Already fixed since [r3569|http://fisheye.codehaus.org/changelog/plexus/?cs=3569].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-07-20T15:20:09.541-0500","updated":"2008-07-20T15:20:09.541-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-47.json b/jira/PLXUTILS-47.json new file mode 100644 index 00000000..b3d9887c --- /dev/null +++ b/jira/PLXUTILS-47.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"55898","self":"http://jira.codehaus.org/rest/api/latest/issue/55898","key":"PLXUTILS-47","fields":{"progress":{"progress":0,"total":1800,"percent":0},"summary":"FileUtils.basename( filename ) blows up due to false assumptions about inputs","timetracking":{"originalEstimate":"30m","remainingEstimate":"30m","originalEstimateSeconds":1800,"remainingEstimateSeconds":1800},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-47/votes","votes":1,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14036","id":"14036","description":"","name":"1.5","archived":false,"released":true,"releaseDate":"2008-02-18"}],"resolutiondate":"2008-02-12T15:55:27.034-0600","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=skaze","name":"skaze","emailAddress":"skazer@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Allen","active":true},"aggregatetimeoriginalestimate":1800,"customfield_10161":["bentmann(bentmann)","jburrell(jburrell)","skaze(skaze)","olamy(olamy)"],"customfield_10160":null,"updated":"2008-02-12T15:55:26.838-0600","created":"2007-09-06T12:54:38.428-0500","description":"Can you spot the deliberate mistake?\n\n{code}\n /**\n * Returns the filename portion of a file specification string.\n * Matches the equally named unix command.\n * @return The filename string without extension.\n */\n public static String basename( String filename )\n {\n return basename( filename, extension( filename ) );\n }\n{code}\n\nSo we pass in a full filename but if it contains a DOT '.' in the path we're screwed. Why? Because extension( filename ) is naive in its implementation...\n\n{code}\n /**\n * Returns the extension portion of a file specification string.\n * This everything after the last dot '.' in the filename (NOT including\n * the dot).\n */\n public static String extension( String filename )\n {\n int lastDot = filename.lastIndexOf( '.' );\n\n if ( lastDot >= 0 )\n {\n return filename.substring( lastDot + 1 );\n }\n else\n {\n return \"\";\n }\n }\n{code}\n\nSo the search for the holy '.' does not properly stop when it meets a file separator. Instead it keeps on looking until it finds one, period.\n\nYou could argue that you're supposed to pass only a filename in BUT as basename uses it and basename is all about directories and filenames that don't hold up.\n\nSimple fix, change extension() to not be so stupid.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"duedate":null,"issuelinks":[],"customfield_10163":"218419200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-47/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":0,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/29521","id":"29521","filename":"PLXUTILS-47.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jburrell","name":"jburrell","emailAddress":"jamieburrell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jamie Burrell","active":true},"created":"2007-09-20T07:37:53.981-0500","size":7075,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/29521/PLXUTILS-47.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":1800,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":1800,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":1800,"percent":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":4,"total":4,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/55898/comment/107819","id":"107819","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jburrell","name":"jburrell","emailAddress":"jamieburrell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jamie Burrell","active":true},"body":"Patched. \r\nThere are two methods in FileUtils that do the same thing (at least that's the way it looks) - extension and getExtension. Both suffered from this issue, so I have fixed extension and pointed getExtension to it.\r\nI have also edited the (previously disabled) unit test testGetExtensionsWithPaths, as the utilities are dependent on File.separator, which varies by platform. This means that running the test on Unix against Windows paths obviously fails. These now all pass successfully.\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jburrell","name":"jburrell","emailAddress":"jamieburrell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jamie Burrell","active":true},"created":"2007-09-20T07:19:06.052-0500","updated":"2007-09-20T07:19:06.052-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/55898/comment/107825","id":"107825","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jburrell","name":"jburrell","emailAddress":"jamieburrell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jamie Burrell","active":true},"body":"Apologies - just after previous patch upload, I noticed removeExtension had the same problem. That is now fixed too.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jburrell","name":"jburrell","emailAddress":"jamieburrell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jamie Burrell","active":true},"created":"2007-09-20T07:37:53.991-0500","updated":"2007-09-20T07:37:53.991-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/55898/comment/123298","id":"123298","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Any chances of getting this triviality fixed/released soon? I mean the patch is there...","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-02-11T12:48:33.644-0600","updated":"2008-02-11T12:49:02.143-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/55898/comment/123451","id":"123451","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"fixed in rev 7197.\r\nThanks","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2008-02-12T15:55:26.685-0600","updated":"2008-02-12T15:55:26.685-0600"}]},"timeoriginalestimate":1800,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-48.json b/jira/PLXUTILS-48.json new file mode 100644 index 00000000..c7285f2a --- /dev/null +++ b/jira/PLXUTILS-48.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"56134","self":"http://jira.codehaus.org/rest/api/latest/issue/56134","key":"CONTINUUM-1447","fields":{"progress":{"progress":0,"total":0},"summary":"To fix /bin/bash issue on some platform, update plexus-utils to 1.4.6","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/CONTINUUM-1447/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/13661","id":"13661","description":"Third Beta Release in the Continuum 1.1 series","name":"1.1-beta-3","archived":true,"released":true,"releaseDate":"2007-09-25"}],"resolutiondate":"2007-09-14T02:06:22.831-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["evenisse(evenisse)"],"customfield_10160":null,"updated":"2007-09-14T02:06:22.822-0500","created":"2007-09-13T07:17:54.865-0500","description":"need a release of plexus-utils.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"231638400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/CONTINUUM-1447/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"customfield_10221":null,"attachment":[],"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/10540","id":"10540","key":"CONTINUUM","name":"Continuum","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=10540&avatarId=10044","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=10540&avatarId=10044","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=10540&avatarId=10044","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=10540&avatarId=10044"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10008","id":"10008","description":"code quality-related","name":"quality"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/13606","id":"13606","description":"Second Beta Release in the Continuum 1.1 series","name":"1.1-beta-2","archived":true,"released":true,"releaseDate":"2007-08-17"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"customfield_10010":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10011","value":"Intermediate","id":"10011"},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-49.json b/jira/PLXUTILS-49.json new file mode 100644 index 00000000..e3538d2c --- /dev/null +++ b/jira/PLXUTILS-49.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"56703","self":"http://jira.codehaus.org/rest/api/latest/issue/56703","key":"PLXUTILS-49","fields":{"progress":{"progress":0,"total":0},"summary":"cli causes error code to be lost on windows","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-49/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T14:30:36.078-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["brianfox(brianfox)","michael-o(michael-o)"],"customfield_10160":null,"updated":"2014-11-25T14:30:36.140-0600","created":"2007-09-26T20:00:21.791-0500","description":"I'm investigating why the maven-invoker isn't detecting a failed build on windows. I see that the cli is generated as:\n{noformat}\ncmd.exe /X /C '\"\"C:\\Program Files\\maven2\\bin\\mvn.bat\" -B -X -Dmaven.repo.local=E:\\svn\\Maven\\maven-plugins\\maven-dependency-plugin\\target\\test-classes\\m2repo -Dtest=true install\"'\n{noformat}\n\nThe cmd /C part is swallowing the error code. For more info, see the linked issue.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-49/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/56703/comment/108386","id":"108386","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"body":"MNG-2127","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"created":"2007-09-26T20:00:43.446-0500","updated":"2007-09-26T20:00:43.446-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/56703/comment/357256","id":"357256","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:30:36.138-0600","updated":"2014-11-25T14:30:36.138-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-5.json b/jira/PLXUTILS-5.json new file mode 100644 index 00000000..b134bf8c --- /dev/null +++ b/jira/PLXUTILS-5.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"35108","self":"http://jira.codehaus.org/rest/api/latest/issue/35108","key":"PLXUTILS-5","fields":{"progress":{"progress":0,"total":0},"summary":"empty removes the directory of the fileset","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-5/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T14:30:42.302-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jesse","name":"jesse","emailAddress":"jesse.mcconnell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jesse McConnell","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["brettporter(brettporter)","jesse(jesse)","michael-o(michael-o)"],"customfield_10160":null,"updated":"2014-11-25T14:30:42.354-0600","created":"2006-03-21T09:39:00.687-0600","description":"I was shifting the unit tests over to use the plugin harness and noticed a test case failing.\n\nif you look at the test case for the fileset test case, the second fileset test has an addFileset(dir, \"**\", \"\");\n\nthis unit test works fine, but when you try and actually do this behavior using the plugin configuration it brings up an error\n\n \n ${basedir}/target/test-classes/fileset-clean-test/buildOutputDirectory\n \n **\n \n \n\nthat would be the plugin configuration of the same deal. ( results in a stack trace)\n\nIn this case the directory is getting deleted when configured. You can exhibit the same behavior with the existing test case if you try and pass null into the addFileset signature...\n\n\nthis would be the failing test case using the existing plugin, note the null in the second addFileset()\n------\n\n public void testFilesets()\n throws Exception\n {\n String base = TARGET_TEST_DIR + \"/target\";\n\n CleanMojo mojo = new CleanMojo();\n\n mojo.addFileset( createFileset( base, \"**/file.txt\", \"**/subdir/**\" ) );\n\n String outputDirectory = TARGET_TEST_DIR + \"/buildOutputDirectory\";\n mojo.addFileset( createFileset( outputDirectory, \"**\", null ) );\n\n mojo.execute();\n\n // fileset 1\n assertTrue( checkExists( base ) );\n assertTrue( checkExists( base + \"/classes\" ) );\n assertFalse( checkExists( base + \"/classes/file.txt\" ) );\n/* TODO: looks like a bug in the file-management library\n assertTrue( FileUtils.fileExists( base + \"/subdir/file.txt\" ) );\n*/\n\n // fileset 2\n assertTrue( checkExists( outputDirectory ) );\n assertFalse( checkExists( outputDirectory + \"/file.txt\" ) );\n\tSystem.exit(-1);\n }\n\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-5/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":6,"total":6,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/35108/comment/61731","id":"61731","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jesse","name":"jesse","emailAddress":"jesse.mcconnell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jesse McConnell","active":true},"body":"the jist of the problem is that when the excludes is set to \"\" then that is translating to 'don't remove the directory' of the fileset\r\n\r\nperhaps the thing to do is add the \"\" to the default excludes?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jesse","name":"jesse","emailAddress":"jesse.mcconnell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jesse McConnell","active":true},"created":"2006-03-22T17:22:52.302-0600","updated":"2006-03-22T17:22:52.302-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/35108/comment/61796","id":"61796","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jesse","name":"jesse","emailAddress":"jesse.mcconnell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jesse McConnell","active":true},"body":"ok, the setting the fileset to null above seems to throw the same exception now that using an empty excludes statement does...\r\n\r\nblows on line 502 of DirectoryScanner when setting excludes.\r\n\r\nnow...\r\n\r\n blows up and have the excludes as an arraylist of size 1 and null inside..\r\n\r\nnot having the excludes and just the includes yields an arraylist of size 0 and removes the directory..\r\n\r\nand the existing unit test ends up with a excludes arraylist of size 1 with a \"\" element inside.. (which is the only one that passes unit test atm)\r\n\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jesse","name":"jesse","emailAddress":"jesse.mcconnell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jesse McConnell","active":true},"created":"2006-03-23T11:46:51.582-0600","updated":"2006-03-23T11:46:51.582-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/35108/comment/61804","id":"61804","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jesse","name":"jesse","emailAddress":"jesse.mcconnell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jesse McConnell","active":true},"body":"Not sure what to do here...\r\n\r\nthe original test case used the \"**\" includes and \"\" excludes which exhibited the desired behavior...\r\n\r\nNow it would seem to me that \r\n\r\n\r\n \r\n **\r\n \r\n\r\n\r\nnow to me that would be the same thing, but DirectoryScanner specificaly looks for \"\" in the exclude to decide if the directory should be deleted.\r\n\r\n\r\n \r\n **\r\n \r\n \r\n \r\n \r\n\r\n\r\nNow this builds an excludes arraylist of size 1 but null inside, which triggers a NPE in DirectoryScanner..\r\n\r\n\r\n \r\n **\r\n \r\n \r\n \"\"\r\n \r\n\r\n\r\nThis certainly doesn't work since it translate to \"\\\"\\\"\" in the fileset\r\n\r\nBUT!\r\n\r\n\r\n \r\n **\r\n \r\n \r\n **\r\n \r\n\r\n\r\ndoes exhibit the correct behavior, since the includes ** matchs the files in the directory and the ** actually seems to protect the directory. The files end up getting smoked but the base directory of the fileset is perserved.\r\n\r\nThis seems a bit off to me, but I am able to configure a fileset that exhibits the same end behavior of the test case...but this feels like another issue to me, that ** in includes means something other then ** in excludes.\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jesse","name":"jesse","emailAddress":"jesse.mcconnell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jesse McConnell","active":true},"created":"2006-03-23T14:00:16.330-0600","updated":"2006-03-23T14:00:16.330-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/35108/comment/61873","id":"61873","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"body":"I think we should scratch this issue. To me == == null, that is, exclude nothing.\r\n\r\nThe bug should be filed against plexus-utils / file management API (if appropriate). Perhaps we should rebase DirectoryScanner against the latest from Ant to see if such bugs have been fixed. Anyway, not a big issue.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"created":"2006-03-24T06:06:08.219-0600","updated":"2006-03-24T06:06:08.219-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/35108/comment/61915","id":"61915","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jesse","name":"jesse","emailAddress":"jesse.mcconnell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jesse McConnell","active":true},"body":"moved this issue from the clean plugin...\r\n\r\nthe crux of the issue is that \"\" as the excludes detection in the DirectoryScanner doesn't map out to an xml configuration, the way to get around it was to use and include of ** and an exclude of ** which is interesting in that the ** seem to mean to different things in both includes and excludes.\r\n\r\nThis should be against file-management API but I don't rights to tweak.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jesse","name":"jesse","emailAddress":"jesse.mcconnell@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jesse McConnell","active":true},"created":"2006-03-24T15:57:59.854-0600","updated":"2006-03-24T15:57:59.854-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/35108/comment/357284","id":"357284","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:30:42.334-0600","updated":"2014-11-25T14:30:42.334-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-50.json b/jira/PLXUTILS-50.json new file mode 100644 index 00000000..f653f65f --- /dev/null +++ b/jira/PLXUTILS-50.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"57123","self":"http://jira.codehaus.org/rest/api/latest/issue/57123","key":"PLXUTILS-50","fields":{"progress":{"progress":0,"total":0},"summary":"InterpolationFilterReader do not handle lonely tokens if starttoken == endtoken","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-50/votes","votes":1,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14033","id":"14033","description":"","name":"1.4.7","archived":false,"released":true,"releaseDate":"2007-10-16"}],"resolutiondate":"2007-10-14T15:40:59.704-0500","customfield_10210":"2.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pikus","name":"pikus","emailAddress":"pikus@ais.pl","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Tomasz Pik","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["olamy(olamy)","pikus(pikus)"],"customfield_10160":null,"updated":"2008-02-02T15:32:11.105-0600","created":"2007-10-07T15:27:40.277-0500","description":"InteropolationFilterReader do not handle lonely tokens if the same token is used as a start and end token.\nThis is causing problems in for example jsp filtering with '@' character as a start and end token (jsp is using @ in directives).\nAlso, with such filtering, adding email address to file being filtered will effectively disable filtering.\n\nAttached test case showing problem.\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"17810","self":"http://jira.codehaus.org/rest/api/2/issueLink/17810","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"57122","key":"MWAR-123","self":"http://jira.codehaus.org/rest/api/2/issue/57122","fields":{"summary":"filtering with @ is working randomly","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"228873600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-50/watchers","watchCount":3,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/29879","id":"29879","filename":"InterpolationFilterReader.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pikus","name":"pikus","emailAddress":"pikus@ais.pl","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Tomasz Pik","active":true},"created":"2007-10-12T19:02:29.658-0500","size":2524,"mimeType":"application/octet-stream","content":"http://jira.codehaus.org/secure/attachment/29879/InterpolationFilterReader.diff"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/29776","id":"29776","filename":"plexus-filter.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pikus","name":"pikus","emailAddress":"pikus@ais.pl","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Tomasz Pik","active":true},"created":"2007-10-08T02:57:38.164-0500","size":916,"mimeType":"application/octet-stream","content":"http://jira.codehaus.org/secure/attachment/29776/plexus-filter.diff"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/57123/comment/109821","id":"109821","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pikus","name":"pikus","emailAddress":"pikus@ais.pl","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Tomasz Pik","active":true},"body":"adding a patch solving problem","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pikus","name":"pikus","emailAddress":"pikus@ais.pl","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Tomasz Pik","active":true},"created":"2007-10-12T19:02:29.672-0500","updated":"2007-10-12T19:02:29.672-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/57123/comment/109892","id":"109892","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"Fixed in rev 6937.\r\nThanks.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-10-14T15:40:59.679-0500","updated":"2007-10-14T15:40:59.679-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-51.json b/jira/PLXUTILS-51.json new file mode 100644 index 00000000..e4f319a6 --- /dev/null +++ b/jira/PLXUTILS-51.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"57659","self":"http://jira.codehaus.org/rest/api/latest/issue/57659","key":"PLXUTILS-51","fields":{"progress":{"progress":0,"total":0},"summary":"Bug in thread synchronization in executeCommandLine","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-51/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"resolutiondate":"2008-07-20T13:22:03.938-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nirschl","name":"nirschl","emailAddress":"heinrich.nirschl@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Heinrich Nirschl","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","nirschl(nirschl)"],"customfield_10160":null,"updated":"2008-07-20T13:22:03.926-0500","created":"2007-10-21T01:50:16.719-0500","description":"Synchronization with wait - notify does not work reliably when used with if instead of while. The attached patch fixes that.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"204681600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-51/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/30018","id":"30018","filename":"cmd-exec.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=nirschl","name":"nirschl","emailAddress":"heinrich.nirschl@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Heinrich Nirschl","active":true},"created":"2007-10-21T01:50:16.739-0500","size":1113,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/30018/cmd-exec.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/57659/comment/142526","id":"142526","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Applied in [r7525|http://fisheye.codehaus.org/changelog/plexus/?cs=7525], thanks Heinrich!\r\n\r\nFor the record: The possibility of a \"spurious wakeup\" is also documented in the latest API docs for [{{Object.wait()}}|http://java.sun.com/javase/6/docs/api/java/lang/Object.html#wait()].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-07-20T13:22:03.922-0500","updated":"2008-07-20T13:22:03.922-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-52.json b/jira/PLXUTILS-52.json new file mode 100644 index 00000000..901a9e4c --- /dev/null +++ b/jira/PLXUTILS-52.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"58547","self":"http://jira.codehaus.org/rest/api/latest/issue/58547","key":"PLXUTILS-52","fields":{"progress":{"progress":0,"total":0},"summary":"FileUtils.extensions() misbehaves on paths that contain dots","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-52/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14034","id":"14034","description":"","name":"1.4.8","archived":false,"released":true,"releaseDate":"2007-11-27"}],"resolutiondate":"2007-11-14T15:49:05.655-0600","customfield_10210":"2.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=vps","name":"vps","emailAddress":"pawel.veselov@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Pawel S. Veselov","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["olamy(olamy)","vps(vps)"],"customfield_10160":null,"updated":"2008-02-02T15:31:40.700-0600","created":"2007-11-09T00:33:38.237-0600","description":"I ran into this problem testing maven-native-api. The pwd was '/home/vps/opensource/svn.codehaus.org/mojo/trunk/mojo/maven-native'. The maven compiler tests failed, because FileUtils.extension() was throwing an exception (full stack trace attached)\n\njava.lang.StringIndexOutOfBoundsException: String index out of range: -43\n\tat java.lang.String.substring(String.java:1768)\n\tat org.codehaus.plexus.util.FileUtils.basename(FileUtils.java:226)\n\tat org.codehaus.plexus.util.FileUtils.basename(FileUtils.java:212)\n\tat org.codehaus.mojo.natives.compiler.AbstractCompiler.getObjectFile(AbstractCompiler.java:139)\n\nApparently, when there are other dots in the full path name, the extension() method chokes. A verified patch, including new tests, is attached.\n\nThanks,\n Pawel.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"226195200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-52/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/30476","id":"30476","filename":"4.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=vps","name":"vps","emailAddress":"pawel.veselov@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Pawel S. Veselov","active":true},"created":"2007-11-09T00:38:40.371-0600","size":2254,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/30476/4.diff"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/30475","id":"30475","filename":"org.codehaus.mojo.natives.compiler.CompilerUtilTest.txt","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=vps","name":"vps","emailAddress":"pawel.veselov@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Pawel S. Veselov","active":true},"created":"2007-11-09T00:38:24.382-0600","size":2918,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/30475/org.codehaus.mojo.natives.compiler.CompilerUtilTest.txt"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":"Generic","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":4,"total":4,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/58547/comment/113275","id":"113275","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=vps","name":"vps","emailAddress":"pawel.veselov@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Pawel S. Veselov","active":true},"body":"Failed maven-native test, includes full stack trace for the issue","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=vps","name":"vps","emailAddress":"pawel.veselov@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Pawel S. Veselov","active":true},"created":"2007-11-09T00:38:24.403-0600","updated":"2007-11-09T00:38:24.403-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/58547/comment/113276","id":"113276","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=vps","name":"vps","emailAddress":"pawel.veselov@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Pawel S. Veselov","active":true},"body":"Patch for the bug.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=vps","name":"vps","emailAddress":"pawel.veselov@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Pawel S. Veselov","active":true},"created":"2007-11-09T00:38:40.379-0600","updated":"2007-11-09T00:38:40.379-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/58547/comment/113277","id":"113277","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=vps","name":"vps","emailAddress":"pawel.veselov@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Pawel S. Veselov","active":true},"body":"To reproduce the problem:\r\n\r\n$ cd /tmp\r\n$ mkdir -p svn.codehaus.org/mojo/trunk/mojo/maven-native\r\n$ cd svn.codehaus.org/mojo/trunk/mojo/maven-native\r\n$ svn co http://svn.codehaus.org/mojo/trunk/mojo/maven-native .\r\n$ mvn test\r\n\r\n(reproduced with maven-native 1.0-alpha-3-SNAPSHOT, svn rev 5617)\r\n ","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=vps","name":"vps","emailAddress":"pawel.veselov@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Pawel S. Veselov","active":true},"created":"2007-11-09T00:41:43.560-0600","updated":"2007-11-09T00:41:43.560-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/58547/comment/113854","id":"113854","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"comitted in rev 7069.\r\nThanks.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-11-14T15:49:05.460-0600","updated":"2007-11-14T15:49:05.460-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-53.json b/jira/PLXUTILS-53.json new file mode 100644 index 00000000..b42e00f1 --- /dev/null +++ b/jira/PLXUTILS-53.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"59260","self":"http://jira.codehaus.org/rest/api/latest/issue/59260","key":"PLXUTILS-53","fields":{"progress":{"progress":0,"total":0},"summary":"Add a timeout to CommandLineUtils","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-53/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14034","id":"14034","description":"","name":"1.4.8","archived":false,"released":true,"releaseDate":"2007-11-27"}],"resolutiondate":"2007-11-25T02:06:38.871-0600","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=dfabulich","name":"dfabulich","emailAddress":"dan@fabulich.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Fabulich","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["dfabulich(dfabulich)","olamy(olamy)"],"customfield_10160":null,"updated":"2008-03-05T08:01:49.158-0600","created":"2007-11-24T18:54:14.387-0600","description":"Command line utils calls Process.waitFor() with no timeout. It would be nice to be able to pass in a timeout argument to kill hanging processes.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"18840","self":"http://jira.codehaus.org/rest/api/2/issueLink/18840","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"64177","key":"PLXUTILS-67","self":"http://jira.codehaus.org/rest/api/2/issue/64177","fields":{"summary":"CommandLineUtils.executeCommandLine() to throw TimeoutException on timeout","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}},{"id":"18187","self":"http://jira.codehaus.org/rest/api/2/issueLink/18187","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"50199","key":"SUREFIRE-320","self":"http://jira.codehaus.org/rest/api/2/issue/50199","fields":{"summary":"Add a timeout property to the plugin","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false}}}}],"customfield_10163":"225331200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-53/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/30800","id":"30800","filename":"PLEXUTILS-53.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=dfabulich","name":"dfabulich","emailAddress":"dan@fabulich.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Fabulich","active":true},"created":"2007-11-24T18:54:45.764-0600","size":2834,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/30800/PLEXUTILS-53.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/59260/comment/114826","id":"114826","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"fixed in rev 7085.\r\nsnapshot deployed http://snapshots.repository.codehaus.org/org/codehaus/plexus/plexus-utils/1.4.8-SNAPSHOT/plexus-utils-1.4.8-20071125.080501-2.jar\r\n\r\nThanks ;-)","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-11-25T02:06:38.863-0600","updated":"2007-11-25T02:06:38.863-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-54.json b/jira/PLXUTILS-54.json new file mode 100644 index 00000000..b256142f --- /dev/null +++ b/jira/PLXUTILS-54.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"59891","self":"http://jira.codehaus.org/rest/api/latest/issue/59891","key":"PLXUTILS-54","fields":{"progress":{"progress":0,"total":0},"summary":"BourneShell fails to execute files in a path with spaces","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-54/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14035","id":"14035","description":"","name":"1.4.9","archived":false,"released":true,"releaseDate":"2007-12-19"}],"resolutiondate":"2007-12-10T12:05:59.196-0600","customfield_10210":"2.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=dfabulich","name":"dfabulich","emailAddress":"dan@fabulich.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Fabulich","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["dfabulich(dfabulich)","olamy(olamy)"],"customfield_10160":null,"updated":"2008-02-02T15:30:24.693-0600","created":"2007-12-09T03:59:50.703-0600","description":"Run the attached patch to diff CommandlineTest on a UNIX/Linux box. testQuotedPath will fail with \"Exit code: 2 - cd: too many arguments\". I've also added a new test that asserts on BourneShell that it should add quotes around the path name, since it contains spaces.\n\nI attempted to fix this myself just by adding \"s around the working directory, but I got a funny error \"Can't handle single and double quotes in same argument\" that I didn't really have time to investigate. (I didn't try to set up a debugger on people.apache.org; that's the most convenient Unix box available to me.)","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"duedate":null,"issuelinks":[{"id":"18257","self":"http://jira.codehaus.org/rest/api/2/issueLink/18257","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"59892","key":"SUREFIRE-403","self":"http://jira.codehaus.org/rest/api/2/issue/59892","fields":{"summary":"TestNgPathWithSpaces integration test fails on Unix","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"223948800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-54/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/31095","id":"31095","filename":"path-with-spaces-test.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=dfabulich","name":"dfabulich","emailAddress":"dan@fabulich.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Fabulich","active":true},"created":"2007-12-09T03:59:50.777-0600","size":2714,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/31095/path-with-spaces-test.patch"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/31101","id":"31101","filename":"plxutils54.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=dfabulich","name":"dfabulich","emailAddress":"dan@fabulich.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Fabulich","active":true},"created":"2007-12-09T18:19:54.560-0600","size":2604,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/31101/plxutils54.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"FreeBSD (people.apache.org)","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/59891/comment/116330","id":"116330","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=dfabulich","name":"dfabulich","emailAddress":"dan@fabulich.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Fabulich","active":true},"body":"This patch fixes the bug by escaping spaces with \\ instead of trying to use more quotes.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=dfabulich","name":"dfabulich","emailAddress":"dan@fabulich.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Fabulich","active":true},"created":"2007-12-09T18:19:54.577-0600","updated":"2007-12-09T18:19:54.577-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/59891/comment/116387","id":"116387","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"comitted in rev 7111. snapshot 1.4.9-20071210.180520-1 deployed.\r\nThanks","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-12-10T12:05:59.186-0600","updated":"2007-12-10T12:05:59.186-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-55.json b/jira/PLXUTILS-55.json new file mode 100644 index 00000000..80097656 --- /dev/null +++ b/jira/PLXUTILS-55.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"59907","self":"http://jira.codehaus.org/rest/api/latest/issue/59907","key":"PLXUTILS-55","fields":{"progress":{"progress":0,"total":0},"summary":"BourneShell fails to execute files in a path with both single and double quotes","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-55/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2009-01-05T11:58:13.261-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=dfabulich","name":"dfabulich","emailAddress":"dan@fabulich.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Dan Fabulich","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["dfabulich(dfabulich)","siveton(siveton)"],"customfield_10160":null,"updated":"2009-01-05T11:58:13.253-0600","created":"2007-12-09T18:22:14.333-0600","description":"In CommandlineTest.testQuotedPath, change the example path to \"target/quoted path\\\"'test\", so the path contains both an apostrophe ' and a double quote \". (This is a legal file name on Linux.) The test will fail.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"190080000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-55/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/59907/comment/159980","id":"159980","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"fixed in [r8007|http://fisheye.codehaus.org/changelog/plexus/?cs=8007]","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-01-05T11:58:13.238-0600","updated":"2009-01-05T11:58:13.238-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-56.json b/jira/PLXUTILS-56.json new file mode 100644 index 00000000..12628c11 --- /dev/null +++ b/jira/PLXUTILS-56.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"60413","self":"http://jira.codehaus.org/rest/api/latest/issue/60413","key":"PLXUTILS-56","fields":{"progress":{"progress":0,"total":0},"summary":"Improve URL decoding done by FileUtils.toFile()","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-56/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14100","id":"14100","description":"","name":"1.5.2","archived":false,"released":true,"releaseDate":"2008-06-13"}],"resolutiondate":"2008-04-11T13:24:39.212-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)"],"customfield_10160":null,"updated":"2008-04-11T13:24:39.204-0500","created":"2007-12-18T12:41:18.835-0600","description":"A URL like \"file:/C:/name%20with%20encoded%20spaces.txt\" currently fails to get properly converted to the file path \"C:\\name with spaces.txt\". The problem stems from URL.getFile() returning a raw (i.e. still URL-encoded) substring, see [Sun Bug ID 4466485|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4466485] for a vivid discussion.\n\nThe attached patch is not perfect, i.e. may still fail for certain URLs as it only decodes selected escape sequences. In the long term, the method should be updated to use java.io.File.(java.net.URI) which does the proper decoding.\n\nThe patch includes some minor tweaks to the class which are not related to this issue but I could not resist.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"213321600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-56/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/33663","id":"33663","filename":"url-to-file.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-04-06T07:24:04.509-0500","size":2417,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/33663/url-to-file.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14048","id":"14048","description":"","name":"1.0.4","archived":true,"released":true,"releaseDate":"2005-10-11"}],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":3,"total":3,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/60413/comment/123045","id":"123045","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Made patch compile against Java 1.4","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-02-08T12:53:05.748-0600","updated":"2008-02-08T12:53:05.748-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/60413/comment/129928","id":"129928","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Next try: Copied code from Commons IO 1.4. I included an index fix such that \"%2520\" properly decodes to \"%20\" rather than \" \".","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-04-06T07:24:04.523-0500","updated":"2008-04-06T07:24:04.523-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/60413/comment/130532","id":"130532","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Fixed in [r7278|http://fisheye.codehaus.org/changelog/plexus/?cs=7278].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-04-11T13:24:39.201-0500","updated":"2008-04-11T13:24:39.201-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-57.json b/jira/PLXUTILS-57.json new file mode 100644 index 00000000..104171e0 --- /dev/null +++ b/jira/PLXUTILS-57.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"60578","self":"http://jira.codehaus.org/rest/api/latest/issue/60578","key":"PLXUTILS-57","fields":{"progress":{"progress":0,"total":0},"summary":"Use Jira versionning to track open/closed issues","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-57/votes","votes":1,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14036","id":"14036","description":"","name":"1.5","archived":false,"released":true,"releaseDate":"2008-02-18"}],"resolutiondate":"2008-02-02T13:41:04.076-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["hboutemy(hboutemy)","lacostej(lacostej)"],"customfield_10160":null,"updated":"2008-02-02T13:41:03.980-0600","created":"2007-12-20T12:01:50.718-0600","description":"P-u is a component that I reuse in many places and has platform specific issues.\nIssues are not linked to versions and it becomes hard to track in which versions a particular issue is fixed / reported against.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"duedate":null,"issuelinks":[],"customfield_10163":"219283200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-57/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/60578/comment/122151","id":"122151","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"body":"I just karma to create versions (hope I'm not the only one): now there shouldn't be any problem to set the \"Fix Version\" field when closing an issue\r\nI'm creating versions for old releases, to be able to reassign some closed Jira issues to proper releases","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2008-02-02T13:41:03.893-0600","updated":"2008-02-02T13:41:03.893-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-58.json b/jira/PLXUTILS-58.json new file mode 100644 index 00000000..eb10ddd4 --- /dev/null +++ b/jira/PLXUTILS-58.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"60764","self":"http://jira.codehaus.org/rest/api/latest/issue/60764","key":"PLXUTILS-58","fields":{"progress":{"progress":0,"total":0},"summary":"Re-use plexus.util.Os for OS detection instead of System.getProperty(\"os.*\")","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-58/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14036","id":"14036","description":"","name":"1.5","archived":false,"released":true,"releaseDate":"2008-02-18"}],"resolutiondate":"2007-12-25T14:08:02.019-0600","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","olamy(olamy)"],"customfield_10160":null,"updated":"2008-02-02T15:29:55.217-0600","created":"2007-12-25T04:49:40.831-0600","description":"While the project itself provides the handy Os class to detect various operating systems, several code spots still perform there own OS detection by directly evaluating the corresponding system properties. This is error-prone and hard to maintain. The attached patch re-uses the methods and constants from Os.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"222652800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-58/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/31443","id":"31443","filename":"os.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2007-12-25T04:49:40.992-0600","size":4177,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/31443/os.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/60764/comment/117843","id":"117843","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"committed in rev 7128\r\nThanks.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2007-12-25T14:08:01.898-0600","updated":"2007-12-25T14:08:01.898-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-59.json b/jira/PLXUTILS-59.json new file mode 100644 index 00000000..426d64ac --- /dev/null +++ b/jira/PLXUTILS-59.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"60769","self":"http://jira.codehaus.org/rest/api/latest/issue/60769","key":"PLXUTILS-59","fields":{"progress":{"progress":0,"total":0},"summary":"Fix case-insensitive string comparisons","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-59/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14100","id":"14100","description":"","name":"1.5.2","archived":false,"released":true,"releaseDate":"2008-06-13"}],"resolutiondate":"2008-04-23T16:59:48.413-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)"],"customfield_10160":null,"updated":"2008-04-23T16:59:48.383-0500","created":"2007-12-25T07:01:33.485-0600","description":"Unlike Character.toUpperCase()/toLowerCase() and String.equalsIgnoreCase(), the methods String.toUpperCase() and String.toLowerCase() are locale-sensitive. This in turn makes case-insensitive string comparisions by the idiom\n{code:java}\nif ( str1.toLowerCase().equals( str2.toLowerCase() ) )\n ...;\n{code}\nlocale-sensitive, too, resulting in platform dependent behavior. However, this is usually not intended. See [Comparing Strings For Equality|http://cafe.elharo.com/java/turkish/] for a more detailed description of the problem.\n\nFurthermore, case-insensitive matching of single characters should always test both upper case and lower case. Otherwise, the results are inconsistent with String.equalsIgnoreCase() and give rise to confusion and unexpected behavior.\n\nThe attached patch provides the required fixes.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"212284800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-59/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/31447","id":"31447","filename":"case-insensitivity.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2007-12-25T07:01:33.690-0600","size":10462,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/31447/case-insensitivity.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/60769/comment/132110","id":"132110","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Fixed in [r7305|http://fisheye.codehaus.org/changelog/plexus/?cs=7305].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-04-23T16:59:48.284-0500","updated":"2008-04-23T16:59:48.284-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-6.json b/jira/PLXUTILS-6.json new file mode 100644 index 00000000..efc04158 --- /dev/null +++ b/jira/PLXUTILS-6.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"26628","self":"http://jira.codehaus.org/rest/api/latest/issue/26628","key":"PLXUTILS-6","fields":{"progress":{"progress":0,"total":0},"summary":"Commandline: Command not found when executable has a in its path","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-6/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/3","id":"3","description":"The problem is a duplicate of an existing issue.","name":"Duplicate"},"fixVersions":[],"resolutiondate":"2006-04-03T11:44:49.934-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=elpunzalan","name":"elpunzalan","emailAddress":"epunzalan@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Edwin Punzalan","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["carlos(carlos)","elpunzalan(elpunzalan)"],"customfield_10160":null,"updated":"2007-01-13T01:01:52.290-0600","created":"2005-08-23T05:20:00.247-0500","description":"When setting an executable file for Commandline whose path includes space(s), I get an error:\n\n is not recognized as an internal or external command\n\nAlthough, doing Commandline.toString(), I can see that the quotes are present... So, when I do:\n\nRuntime.exec( cmd.toString() )\n\nThe command gets executed.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"13916","self":"http://jira.codehaus.org/rest/api/2/issueLink/13916","type":{"id":"10000","name":"Duplicate","inward":"is duplicated by","outward":"duplicates","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10000"},"outwardIssue":{"id":"27795","key":"PLXUTILS-85","self":"http://jira.codehaus.org/rest/api/2/issue/27795","fields":{"summary":"under windows when executing java classpaths with embedded spaces cause the execution to fail","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"296524800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-6/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":"Windows XP","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":0,"total":0,"comments":[]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-60.json b/jira/PLXUTILS-60.json new file mode 100644 index 00000000..46ae121b --- /dev/null +++ b/jira/PLXUTILS-60.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"61343","self":"http://jira.codehaus.org/rest/api/latest/issue/61343","key":"PLXUTILS-60","fields":{"progress":{"progress":0,"total":0},"summary":"XmlStreamReader barfs at attribues named .*encoding","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-60/votes","votes":1,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14036","id":"14036","description":"","name":"1.5","archived":false,"released":true,"releaseDate":"2008-02-18"}],"resolutiondate":"2008-01-12T02:57:06.103-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["hboutemy(hboutemy)"],"customfield_10160":null,"updated":"2008-02-02T15:28:44.635-0600","created":"2008-01-09T16:36:29.939-0600","description":"The class fails at reading following XML content: {code:xml}{code}\nit causes {code}java.io.UnsupportedEncodingException: ATTRIBUTE VALUE{code}\n\nthe regexp used to extract encoding value in XML prolog is wrong, and extracts wrong content...","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[{"id":"18452","self":"http://jira.codehaus.org/rest/api/2/issueLink/18452","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"53770","key":"MSITE-242","self":"http://jira.codehaus.org/rest/api/2/issue/53770","fields":{"summary":"remove copy of plexus-utils sources from site plugin sources since it is a dependency","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false}}}},{"id":"18417","self":"http://jira.codehaus.org/rest/api/2/issueLink/18417","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"59991","key":"MNG-3316","self":"http://jira.codehaus.org/rest/api/2/issue/59991","fields":{"summary":"Barfs at attribues named .*encoding","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"221184000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-60/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14029","id":"14029","description":"","name":"1.4.3","archived":false,"released":true,"releaseDate":"2007-07-13"},{"self":"http://jira.codehaus.org/rest/api/2/version/14030","id":"14030","description":"","name":"1.4.4","archived":false,"released":true,"releaseDate":"2007-07-20"},{"self":"http://jira.codehaus.org/rest/api/2/version/14031","id":"14031","description":"","name":"1.4.5","archived":false,"released":true,"releaseDate":"2007-07-31"},{"self":"http://jira.codehaus.org/rest/api/2/version/14032","id":"14032","description":"","name":"1.4.6","archived":false,"released":true,"releaseDate":"2007-09-13"},{"self":"http://jira.codehaus.org/rest/api/2/version/14033","id":"14033","description":"","name":"1.4.7","archived":false,"released":true,"releaseDate":"2007-10-16"},{"self":"http://jira.codehaus.org/rest/api/2/version/14034","id":"14034","description":"","name":"1.4.8","archived":false,"released":true,"releaseDate":"2007-11-27"},{"self":"http://jira.codehaus.org/rest/api/2/version/14035","id":"14035","description":"","name":"1.4.9","archived":false,"released":true,"releaseDate":"2007-12-19"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/61343/comment/119642","id":"119642","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"body":"fixed in r7158, which should be released in plexus-utils 1.5","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2008-01-12T02:57:06.069-0600","updated":"2008-01-12T02:57:06.069-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-61.json b/jira/PLXUTILS-61.json new file mode 100644 index 00000000..31862183 --- /dev/null +++ b/jira/PLXUTILS-61.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"63043","self":"http://jira.codehaus.org/rest/api/latest/issue/63043","key":"PLXUTILS-61","fields":{"progress":{"progress":0,"total":0},"summary":"Improve PathTool","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-61/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14036","id":"14036","description":"","name":"1.5","archived":false,"released":true,"releaseDate":"2008-02-18"}],"resolutiondate":"2008-02-12T15:25:35.818-0600","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["olamy(olamy)","siveton(siveton)"],"customfield_10160":null,"updated":"2008-02-16T08:57:26.234-0600","created":"2008-02-11T17:48:58.091-0600","description":"PathTool needs to be merged with [1]. This should be helpful for doxia and wagon.\nThe proposed patch add several methods from [1], improve javadoc and add test cases.\n\n[1] https://svn.apache.org/repos/asf/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/PathUtils.java","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"18722","self":"http://jira.codehaus.org/rest/api/2/issueLink/18722","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"63288","key":"DOXIA-219","self":"http://jira.codehaus.org/rest/api/2/issue/63288","fields":{"summary":"Bump to new release of plexus-utils","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false}}}}],"customfield_10163":"218419200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-61/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/32522","id":"32522","filename":"path.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2008-02-11T17:48:58.489-0600","size":21044,"mimeType":"text/x-diff","content":"http://jira.codehaus.org/secure/attachment/32522/path.diff"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14035","id":"14035","description":"","name":"1.4.9","archived":false,"released":true,"releaseDate":"2007-12-19"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/63043/comment/123446","id":"123446","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"committed in rev 7195.\r\nThanks.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2008-02-12T15:25:33.886-0600","updated":"2008-02-12T15:25:33.886-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-62.json b/jira/PLXUTILS-62.json new file mode 100644 index 00000000..3ea3bcae --- /dev/null +++ b/jira/PLXUTILS-62.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"63246","self":"http://jira.codehaus.org/rest/api/latest/issue/63246","key":"PLXUTILS-62","fields":{"progress":{"progress":0,"total":0},"summary":"Add method \"contains\" to StringUtils","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-62/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2009-01-03T07:04:36.608-0600","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pgier","name":"pgier","emailAddress":"pgier@redhat.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Paul Gier","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["olamy(olamy)","pgier(pgier)","siveton(siveton)"],"customfield_10160":null,"updated":"2009-01-03T07:04:36.600-0600","created":"2008-02-15T09:21:31.239-0600","description":"For better interoperability with pre JDK 1.5 builds, it would be useful to have a \"contains\" method in the StringUtils class. The contains method was added to the String class in the sun jdk since 1.5.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"190339200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-62/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/32610","id":"32610","filename":"plexus-utils-string-contains-r7199.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=pgier","name":"pgier","emailAddress":"pgier@redhat.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Paul Gier","active":true},"created":"2008-02-15T09:21:31.292-0600","size":849,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/32610/plexus-utils-string-contains-r7199.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/63246/comment/123815","id":"123815","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"IMHO we must handle null and do the same as in commons-lang [javadoc|http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringUtils.html#contains(java.lang.String,%20java.lang.String)]","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2008-02-15T12:09:53.427-0600","updated":"2008-02-15T12:09:53.427-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/63246/comment/159795","id":"159795","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"Using org.apache.commons.lang.StringUtils instead of your patch. Applied in [r8000|http://fisheye.codehaus.org/changelog/plexus/?cs=8000]","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-01-03T07:04:36.587-0600","updated":"2009-01-03T07:04:36.587-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-63.json b/jira/PLXUTILS-63.json new file mode 100644 index 00000000..35a30ff0 --- /dev/null +++ b/jira/PLXUTILS-63.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"61808","self":"http://jira.codehaus.org/rest/api/latest/issue/61808","key":"PLXUTILS-63","fields":{"progress":{"progress":0,"total":0},"summary":"plexus-utils: NullPointerException in Xpp3Dom.equals()","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-63/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"resolutiondate":"2008-07-20T12:57:18.561-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=barrett","name":"barrett","emailAddress":"Barrett.Nuzum@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrett Nuzum","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["barrett(barrett)","bentmann(bentmann)"],"customfield_10160":null,"updated":"2012-08-01T15:33:01.202-0500","created":"2008-01-18T12:07:10.808-0600","description":"org.codehaus.plexus.util.xml.Xpp3Dom.equals() fails with a NullPointerException if (this.value != null) && (obj.value == null). The code wrongly assumes that if this.value is non-null, obj.value must be non-null as well. Same thing for the \"name\" field.\n\nSuggested fix:\n\n public boolean equals( Object obj )\n {\n .......\n if ( name == null ? dom.name != null : (dom.name == null) || !dom.name.equals( name ) )\n {\n return false;\n }\n else if ( value == null ? dom.value != null : (dom.value == null) || !dom.value.equals( value ) )\n {\n return false;\n }\n ........\n }","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"31576","self":"http://jira.codehaus.org/rest/api/2/issueLink/31576","type":{"id":"10000","name":"Duplicate","inward":"is duplicated by","outward":"duplicates","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10000"},"inwardIssue":{"id":"83649","key":"PLXUTILS-105","self":"http://jira.codehaus.org/rest/api/2/issue/83649","fields":{"summary":"more NullPointerException's in Xpp3Dom.equals()","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"20124","self":"http://jira.codehaus.org/rest/api/2/issueLink/20124","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"41769","key":"PLXUTILS-84","self":"http://jira.codehaus.org/rest/api/2/issue/41769","fields":{"summary":"plexus-utils: NullPointerException in Xpp3Dom.equals()","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"204681600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-63/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/31956","id":"31956","filename":"PLX-362.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=barrett","name":"barrett","emailAddress":"Barrett.Nuzum@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrett Nuzum","active":true},"created":"2008-01-18T12:22:36.768-0600","size":2481,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/31956/PLX-362.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10053","value":"Yes","id":"10053"},"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":3,"total":3,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/61808/comment/120493","id":"120493","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=barrett","name":"barrett","emailAddress":"Barrett.Nuzum@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrett Nuzum","active":true},"body":"The issue is now in attributes and childList.\r\nI will attach a patch shortly.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=barrett","name":"barrett","emailAddress":"Barrett.Nuzum@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrett Nuzum","active":true},"created":"2008-01-18T12:07:40.013-0600","updated":"2008-01-18T12:07:40.013-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/61808/comment/120495","id":"120495","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=barrett","name":"barrett","emailAddress":"Barrett.Nuzum@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrett Nuzum","active":true},"body":"Feel free to move to PLXUTILS. sorry.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=barrett","name":"barrett","emailAddress":"Barrett.Nuzum@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrett Nuzum","active":true},"created":"2008-01-18T12:15:04.413-0600","updated":"2008-01-18T12:15:04.413-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/61808/comment/142523","id":"142523","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Applied in [r7524|http://fisheye.codehaus.org/changelog/plexus/?cs=7524], thanks for the patch Barrett!","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-07-20T12:57:18.539-0500","updated":"2008-07-20T12:57:18.539-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-64.json b/jira/PLXUTILS-64.json new file mode 100644 index 00000000..58e7e43b --- /dev/null +++ b/jira/PLXUTILS-64.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"62302","self":"http://jira.codehaus.org/rest/api/latest/issue/62302","key":"PLXUTILS-64","fields":{"progress":{"progress":0,"total":0},"summary":"working directory not quoted: unpack of tar files fail with ArchiverException: chmod exit code was: 1","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-64/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14086","id":"14086","description":"","name":"1.5.1","archived":false,"released":true,"releaseDate":"2008-02-21"}],"resolutiondate":"2008-02-19T16:43:53.110-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=enahir","name":"enahir","emailAddress":"enahir@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Erez Nahir","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["brianfox(brianfox)","elecharny(elecharny)","enahir(enahir)","hboutemy(hboutemy)","jdcasey(jdcasey)","mosabua(mosabua)","tpounds(tpounds)"],"customfield_10160":null,"updated":"2010-07-09T08:38:48.187-0500","created":"2008-01-29T01:33:02.556-0600","description":"Using this configuration:\n\n org.apache.maven.plugins\n maven-dependency-plugin\n \n \n \n unpack\n process-resources\n \n unpack\n \n \n \n \n org.apache.catalina\n tomcat\n 5.5.20\n tar\n ${mgmt.directory}\n \n\nWe get build failure with the exception:\nError:\n[INFO] [dependency:unpack {execution: unpack}]\n[INFO] Configured Artifact: org.apache.catalina:tomcat:5.5.20:tar\n[INFO] Unpacking /tmp/maven-repo/org/apache/catalina/tomcat/5.5.20/tomcat-5.5.20.tarto\n /vob/nm_acs/acs/install/target/stage/mgmt\nwith Includes null and excludes:null\n[INFO] Expanding: /tmp/maven-repo/org/apache/catalina/tomcat/5.5.20/tomcat-5.5.20.tar into /vob/nm_acs/acs/install/target/stage/mgmt\n[WARNING] -------------------------------\n[WARNING] Standard error:\n[WARNING] -------------------------------\n[WARNING] \n[WARNING] -------------------------------\n[WARNING] Standard output:\n[WARNING] -------------------------------\n[WARNING] chmod: cannot access `/vob/nm_acs/acs/install/target/stage/mgmt/apache-tomcat-5.5.20/webapps/jsp-examples/WEB-INF/classes/org/apache/jsp/jsp2/jspattribute/shuffle_jsp.class': No such file or directory\n[WARNING] -------------------------------\norg.codehaus.plexus.archiver.ArchiverException: chmod exit code was: 1\n at org.codehaus.plexus.archiver.util.ArchiveEntryUtils.chmod(ArchiveEntryUtils.java:59)\n at org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver.extractFile(AbstractZipUnArchiver.java:236)\n at org.codehaus.plexus.archiver.tar.TarUnArchiver.execute(TarUnArchiver.java:92)\n at org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:108)\n at org.apache.maven.plugin.dependency.AbstractDependencyMojo.unpack(AbstractDependencyMojo.java:266)\n at org.apache.maven.plugin.dependency.fromConfiguration.UnpackMojo.unpackArtifact(UnpackMojo.java:122)\n at org.apache.maven.plugin.dependency.fromConfiguration.UnpackMojo.execute(UnpackMojo.java:95)\n at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)\n at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)\n at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)\n at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n at java.lang.reflect.Method.invoke(Method.java:585)\n at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)\n at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)\n at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)\n at org.codehaus.classworlds.Launcher.main(Launcher.java:375)\n[INFO] ------------------------------------------------------------------------\n[ERROR] BUILD ERROR\n[INFO] ------------------------------------------------------------------------\n[INFO] Error unpacking file: /tmp/maven-repo/org/apache/catalina/tomcat/5.5.20/tomcat-5.5.20.tar to: /vob/nm_acs/acs/install/target/stage/mgmt\norg.codehaus.plexus.archiver.ArchiverException: chmod exit code was: 1\n[INFO] ------------------------------------------------------------------------\n[INFO] Trace\norg.apache.maven.lifecycle.LifecycleExecutionException: Error unpacking file: /tmp/maven-repo/org/apache/catalina/tomcat/5.5.20/tomcat-5.5.20.tar to: /vob/nm_acs/acs/install/target/stage/mgmt\norg.codehaus.plexus.archiver.ArchiverException: chmod exit code was: 1\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)\n at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)\n at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)\n at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n at java.lang.reflect.Method.invoke(Method.java:585)\n at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)\n at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)\n at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)\n at org.codehaus.classworlds.Launcher.main(Launcher.java:375)\nCaused by: org.apache.maven.plugin.MojoExecutionException: Error unpacking file: /tmp/maven-repo/org/apache/catalina/tomcat/5.5.20/tomcat-5.5.20.tar to: /vob/nm_acs/acs/install/target/stage/mgmt\norg.codehaus.plexus.archiver.ArchiverException: chmod exit code was: 1\n at org.apache.maven.plugin.dependency.AbstractDependencyMojo.unpack(AbstractDependencyMojo.java:275)\n at org.apache.maven.plugin.dependency.fromConfiguration.UnpackMojo.unpackArtifact(UnpackMojo.java:122)\n at org.apache.maven.plugin.dependency.fromConfiguration.UnpackMojo.execute(UnpackMojo.java:95)\n at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)\n at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)\n ... 16 more\nCaused by: org.codehaus.plexus.archiver.ArchiverException: chmod exit code was: 1\n at org.codehaus.plexus.archiver.util.ArchiveEntryUtils.chmod(ArchiveEntryUtils.java:59)\n at org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver.extractFile(AbstractZipUnArchiver.java:236)\n at org.codehaus.plexus.archiver.tar.TarUnArchiver.execute(TarUnArchiver.java:92)\n at org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:108)\n at org.apache.maven.plugin.dependency.AbstractDependencyMojo.unpack(AbstractDependencyMojo.java:266)\n ... 20 more\n[INFO] ------------------------------------------------------------------------\n[INFO] Total time: 53 seconds\n[INFO] Finished at: Mon Jan 28 16:40:41 IST 2008\n[INFO] Final Memory: 12M/401M\n[INFO] ------------------------------------------------------------------------","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[{"id":"18609","self":"http://jira.codehaus.org/rest/api/2/issueLink/18609","type":{"id":"10000","name":"Duplicate","inward":"is duplicated by","outward":"duplicates","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10000"},"outwardIssue":{"id":"62520","key":"PLXCOMP-91","self":"http://jira.codehaus.org/rest/api/2/issue/62520","fields":{"summary":"Archiver does not quote paths with spaces when executing command lines","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"19711","self":"http://jira.codehaus.org/rest/api/2/issueLink/19711","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"68743","key":"MSHARED-21","self":"http://jira.codehaus.org/rest/api/2/issue/68743","fields":{"summary":"Spaces are incorrectly handled on command line","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"19701","self":"http://jira.codehaus.org/rest/api/2/issueLink/19701","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"68457","key":"MJAVADOC-193","self":"http://jira.codehaus.org/rest/api/2/issue/68457","fields":{"summary":"Bump plexus-utils to 1.5.1","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}},{"id":"18847","self":"http://jira.codehaus.org/rest/api/2/issueLink/18847","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"63486","key":"MNG-3414","self":"http://jira.codehaus.org/rest/api/2/issue/63486","fields":{"summary":"Plexus bundled in Maven 2.1-SNAPSHOT built on 19 Feb 2008 introduced a regression in path handling","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"18596","self":"http://jira.codehaus.org/rest/api/2/issueLink/18596","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"62564","key":"MDEP-138","self":"http://jira.codehaus.org/rest/api/2/issue/62564","fields":{"summary":"unpack of tar files fail with ArchiverException: chmod exit code was: 1","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"26618","self":"http://jira.codehaus.org/rest/api/2/issueLink/26618","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"112180","key":"MDEP-274","self":"http://jira.codehaus.org/rest/api/2/issue/112180","fields":{"summary":"unpack mojo suffers from PLXUTILS-64","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"217555200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-64/watchers","watchCount":4,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14036","id":"14036","description":"","name":"1.5","archived":false,"released":true,"releaseDate":"2008-02-18"}],"customfield_10170":null,"environment":"Maven version: 2.0.7\nJava version: 1.5.0_10\nOS name: \"linux\" version: \"2.6.9-42.7.elsmp\" arch: \"i386\"","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":12,"total":12,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/62302/comment/122069","id":"122069","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=elecharny","name":"elecharny","emailAddress":"elecharny@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Lécharny","active":true},"body":"We have the very same problem. The problem occurs only on MAC for us (Apache Directory Studio), while trying to unpack a file containing some spaves in the name :\r\n\r\n[INFO] Expanding /Users/elecharny/.m2/repository/org/apache/directory/studio/launcher-macosx/1.1.0/launcher-macosx-1.1.0.tar.gz to /tmp/tmp10812.tar\r\n[INFO] Expanding: /tmp/tmp10812.tar into /Users/elecharny/apacheDS/ldapstudio/studio/target/ApacheDirectoryStudio-macosx\r\n[WARNING] -------------------------------\r\n[WARNING] Standard error:\r\n[WARNING] -------------------------------\r\n[WARNING] \r\n[WARNING] -------------------------------\r\n[WARNING] Standard output:\r\n[WARNING] -------------------------------\r\n[WARNING] /bin/sh: line 1: cd: /Users/elecharny/apacheDS/ldapstudio/studio/target/ApacheDirectoryStudio-macosx/Apache: No such file or directory\r\n\r\n[WARNING] -------------------------------\r\norg.codehaus.plexus.archiver.ArchiverException: chmod exit code was: 1\r\n at org.codehaus.plexus.archiver.util.ArchiveEntryUtils.chmod(ArchiveEntryUtils.java:59)\r\n at org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver.extractFile(AbstractZipUnArchiver.java:236)\r\n at org.codehaus.plexus.archiver.tar.TarUnArchiver.execute(TarUnArchiver.java:92)\r\n at org.codehaus.plexus.archiver.tar.TarGZipUnArchiver.execute(TarGZipUnArchiver.java:76)\r\n at org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:108)\r\n at org.apache.maven.plugin.dependency.AbstractDependencyMojo.unpack(AbstractDependencyMojo.java:266)\r\n\r\n\r\nThe name is supposed to be :\r\n\"/Users/elecharny/apacheDS/ldapstudio/studio/target/ApacheDirectoryStudio-macosx/Apache Directory Studio.app\"\r\n\r\nI think that the spaces must be escaped before a chmod can be done.\r\n\r\nHope it helps ...","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=elecharny","name":"elecharny","emailAddress":"elecharny@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Lécharny","active":true},"created":"2008-02-01T11:23:08.449-0600","updated":"2008-02-01T11:23:08.449-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/62302/comment/122147","id":"122147","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=enahir","name":"enahir","emailAddress":"enahir@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Erez Nahir","active":true},"body":"In our case, I think the issue is with internal java class:\r\n\r\nls /vob/nm_acs/acs/install/target/stage/mgmt/apache-tomcat-5.5.20/webapps/jsp-examples/WEB-INF/classes/org/apache/jsp/jsp2/jspattribute\r\njspattribute_jsp.class shuffle_jsp$shuffle_jspHelper.class","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=enahir","name":"enahir","emailAddress":"enahir@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Erez Nahir","active":true},"created":"2008-02-02T12:43:04.060-0600","updated":"2008-02-02T12:43:04.060-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/62302/comment/122154","id":"122154","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"body":"Are the files actually unpacked? I wonder if catching this exception in the dependency plugin is a good workaround for now.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"created":"2008-02-02T13:55:25.986-0600","updated":"2008-02-02T13:55:25.986-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/62302/comment/122155","id":"122155","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"body":"This seems related to PLXCOMP-91 but i don't seem to have karma to link the issues.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brianfox","name":"brianfox","emailAddress":"brianf@infinity.nu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"brianfox brianfox","active":true},"created":"2008-02-02T13:57:15.198-0600","updated":"2008-02-02T13:57:15.198-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/62302/comment/122159","id":"122159","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=enahir","name":"enahir","emailAddress":"enahir@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Erez Nahir","active":true},"body":"Files are unpacked, catching the exception should solve the issue on my side.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=enahir","name":"enahir","emailAddress":"enahir@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Erez Nahir","active":true},"created":"2008-02-02T14:41:25.496-0600","updated":"2008-02-02T14:41:25.496-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/62302/comment/123813","id":"123813","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=tpounds","name":"tpounds","emailAddress":"trevor.pounds@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Trevor Pounds","active":true},"body":"We have the same issue with internal class file names. In our case we are just trying to unpack the sun jdk. The offending file is jdk1.50_12/demo/applets/Blink/Blink$1.class. The chmod translates this to Blink.class. I see that Blink$1.class has been unpacked but not a Blink.class. This makes me suspect the $1 is getting dropped or translated into a null string.\r\n\r\nThe error is as follows:\r\n\r\n[WARNING] chmod: cannot access `unpack/java/jdk1.5.0_12/demo/applets/Blink/Blink.class': No such file or directory\r\n\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=tpounds","name":"tpounds","emailAddress":"trevor.pounds@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Trevor Pounds","active":true},"created":"2008-02-15T11:29:58.156-0600","updated":"2008-02-15T11:29:58.156-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/62302/comment/124251","id":"124251","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"body":"I ran across this the other day, and fixed it.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"created":"2008-02-18T21:43:44.542-0600","updated":"2008-02-18T21:43:44.542-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/62302/comment/124252","id":"124252","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"body":"nevermind. My issue centered on the use of $1 and such for anonymous inner classes, where /bin/sh was interpreting this as an argument to the present script...and choking.\r\n\r\nquoting of working directory paths is actually an issue in plexus-utils, though.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"created":"2008-02-18T21:47:52.319-0600","updated":"2008-02-18T21:47:52.319-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/62302/comment/124253","id":"124253","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"body":"this is an issue with paths not being quoted correctly, particularly in the working directory of the Commandline and Shell logic.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"created":"2008-02-18T21:49:31.748-0600","updated":"2008-02-18T21:49:31.748-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/62302/comment/124385","id":"124385","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"body":"should be fixed.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"created":"2008-02-19T16:43:53.003-0600","updated":"2008-02-19T16:43:53.003-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/62302/comment/124531","id":"124531","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mosabua","name":"mosabua","emailAddress":"manfred@mosabuam.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Manfred Moser","active":true},"body":"What version of plexus-utils the fix in if it is released. Otherwise .. can you cut a release or at least have a latest snapshot that includes it somewhere?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mosabua","name":"mosabua","emailAddress":"manfred@mosabuam.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Manfred Moser","active":true},"created":"2008-02-20T17:27:21.046-0600","updated":"2008-02-20T17:27:21.046-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/62302/comment/124736","id":"124736","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"body":"fixed in plexus-utils 1.5.1","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2008-02-23T00:57:23.207-0600","updated":"2008-02-23T00:57:23.207-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-65.json b/jira/PLXUTILS-65.json new file mode 100644 index 00000000..16fa2198 --- /dev/null +++ b/jira/PLXUTILS-65.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"63946","self":"http://jira.codehaus.org/rest/api/latest/issue/63946","key":"PLXUTILS-65","fields":{"progress":{"progress":0,"total":0},"summary":"ReaderFactory does not close created input streams","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-65/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2008-03-01T11:27:36.386-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mihobson","name":"mihobson","emailAddress":"markhobson@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Mark Hobson","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["hboutemy(hboutemy)","mihobson(mihobson)"],"customfield_10160":null,"updated":"2008-03-01T16:06:38.102-0600","created":"2008-02-29T05:10:52.295-0600","description":"Methods that create an InputStream from Files or URLs should also close them in a finally block.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"216864000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-65/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14100","id":"14100","description":"","name":"1.5.2","archived":false,"released":true,"releaseDate":"2008-06-13"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/63946/comment/125732","id":"125732","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"body":"I don't understand the rationale: these methods are here to create Readers and let them open for use by the caller.\r\nThey can't close anything.\r\nIt's caller's responsibility to close the reader after use.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2008-03-01T11:27:36.255-0600","updated":"2008-03-01T11:27:36.255-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/63946/comment/125742","id":"125742","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mihobson","name":"mihobson","emailAddress":"markhobson@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Mark Hobson","active":true},"body":"Apologies, not sure what I was thinking.. ignore me :)","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mihobson","name":"mihobson","emailAddress":"markhobson@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Mark Hobson","active":true},"created":"2008-03-01T16:06:37.791-0600","updated":"2008-03-01T16:06:37.791-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-66.json b/jira/PLXUTILS-66.json new file mode 100644 index 00000000..bb25e7b8 --- /dev/null +++ b/jira/PLXUTILS-66.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"64041","self":"http://jira.codehaus.org/rest/api/latest/issue/64041","key":"PLXUTILS-66","fields":{"progress":{"progress":0,"total":0},"summary":"new method in FileUtils to copyFile with FilterWrapper[] with new parameter : boolean overwrite","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-66/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14100","id":"14100","description":"","name":"1.5.2","archived":false,"released":true,"releaseDate":"2008-06-13"}],"resolutiondate":"2008-03-24T03:02:02.335-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["olamy(olamy)"],"customfield_10160":null,"updated":"2008-03-24T03:02:02.318-0500","created":"2008-03-02T16:49:44.886-0600","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"216777600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-66/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/64041/comment/125830","id":"125830","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"fixed in rev 7229","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2008-03-02T17:01:24.399-0600","updated":"2008-03-02T17:01:24.399-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-67.json b/jira/PLXUTILS-67.json new file mode 100644 index 00000000..9d52e8f8 --- /dev/null +++ b/jira/PLXUTILS-67.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"64177","self":"http://jira.codehaus.org/rest/api/latest/issue/64177","key":"PLXUTILS-67","fields":{"progress":{"progress":0,"total":0},"summary":"CommandLineUtils.executeCommandLine() to throw TimeoutException on timeout","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-67/votes","votes":1,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/15258","id":"15258","description":"","name":"1.5.9","archived":false,"released":true,"releaseDate":"2009-04-28"}],"resolutiondate":"2010-08-09T11:36:33.951-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=avalon","name":"avalon","emailAddress":"akostadinov@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"A","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["avalon(avalon)","kwellman(kwellman)","krosenvold(krosenvold)","olamy(olamy)"],"customfield_10160":null,"updated":"2010-08-09T11:36:34.003-0500","created":"2008-03-05T07:59:00.237-0600","description":"http://fisheye.codehaus.org/viewrep/plexus/plexus-utils/trunk/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java\n\nCurrently CommandLineUtils.executeCommandLine() throws an InterruptedException no matter if timeout occurred or some other issue.\n\nIt would be useful for one to know when the reason was simply the command timing out and throwing TimeoutException will make that possible. \n\nI know the exception error message makes that clear but that makes things complicated for tools like the maven surefire test runner which will need to parse exception descriptions to know it was timeout and not something else.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"18841","self":"http://jira.codehaus.org/rest/api/2/issueLink/18841","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"64179","key":"SUREFIRE-468","self":"http://jira.codehaus.org/rest/api/2/issue/64179","fields":{"summary":"When tests timeout, report files on disk are incorrect","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"18840","self":"http://jira.codehaus.org/rest/api/2/issueLink/18840","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"59260","key":"PLXUTILS-53","self":"http://jira.codehaus.org/rest/api/2/issue/59260","fields":{"summary":"Add a timeout to CommandLineUtils","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}}],"customfield_10163":"139881600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-67/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/34815","id":"34815","filename":"PLXUTILS-67.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=kwellman","name":"kwellman","emailAddress":"kwellman@kivasystems.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Keith Wellman","active":true},"created":"2008-05-28T09:18:13.742-0500","size":3071,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/34815/PLXUTILS-67.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14086","id":"14086","description":"","name":"1.5.1","archived":false,"released":true,"releaseDate":"2008-02-21"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":3,"total":3,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/64177/comment/126131","id":"126131","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=avalon","name":"avalon","emailAddress":"akostadinov@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"A","active":true},"body":"Timeout was added in PLXUTILS-53","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=avalon","name":"avalon","emailAddress":"akostadinov@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"A","active":true},"created":"2008-03-05T08:01:49.717-0600","updated":"2008-03-05T08:01:49.717-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/64177/comment/136480","id":"136480","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=kwellman","name":"kwellman","emailAddress":"kwellman@kivasystems.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Keith Wellman","active":true},"body":"Here is a patch for this issue. This lack of a distinct timeout specific exception has made it painful to attempt handling timeout events in surefire. \r\n\r\nConverts the thrown InterruptedException for a timeout condition into a java.util.concurrent.TimeoutException and extends handling for this Exception type. Exceptions are still wrapped as expected in a CommandLineException.\r\n\r\nAlso includes a new test in CommandLineUtilsTest which forces a timeout and ensures that a TimeoutException is the root cause.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=kwellman","name":"kwellman","emailAddress":"kwellman@kivasystems.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Keith Wellman","active":true},"created":"2008-05-28T09:18:13.754-0500","updated":"2008-05-28T09:18:13.754-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/64177/comment/231493","id":"231493","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"body":"This issue was fixed in r8152 by Olivier Lamy, although with a slightly different implementation/testcase. Judging by release dates, that's 1.5.9\r\n\r\nThrows CommandLineTimeOutException","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=krosenvold","name":"krosenvold","emailAddress":"krosenvold@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=krosenvold&avatarId=11127","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=krosenvold&avatarId=11127","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=krosenvold&avatarId=11127","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=krosenvold&avatarId=11127"},"displayName":"Kristian Rosenvold","active":true},"created":"2010-08-09T11:36:33.993-0500","updated":"2010-08-09T11:36:33.993-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-68.json b/jira/PLXUTILS-68.json new file mode 100644 index 00000000..85d81691 --- /dev/null +++ b/jira/PLXUTILS-68.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"64674","self":"http://jira.codehaus.org/rest/api/latest/issue/64674","key":"PLXUTILS-68","fields":{"progress":{"progress":0,"total":0},"summary":"Improve pretty printing done by MXSerializer","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-68/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14100","id":"14100","description":"","name":"1.5.2","archived":false,"released":true,"releaseDate":"2008-06-13"}],"resolutiondate":"2008-04-11T13:29:20.384-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)"],"customfield_10160":null,"updated":"2008-09-15T05:17:11.632-0500","created":"2008-03-16T11:46:27.546-0500","description":"The {{MXSerializer}} commonly used by the Modello generated writers produces something like\n{code:xml}\n\n org.apache.maven.plugins\n maven-jxr-plugin\n 2.1\n \n 2.1\n 2.1\n \n 2.0\n 2.1\n \n 20070407095323\n \n{code}\nIt would be cool if there were newlines after the XML declaration and at the end of file.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/5","iconUrl":"http://jira.codehaus.org/images/icons/priorities/trivial.png","name":"Trivial","id":"5"},"duedate":null,"issuelinks":[{"id":"20501","self":"http://jira.codehaus.org/rest/api/2/issueLink/20501","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"73571","key":"MSHARED-69","self":"http://jira.codehaus.org/rest/api/2/issue/73571","fields":{"summary":"Improve pretty printing the POM when it gets written to a file","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}}],"customfield_10163":"213321600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-68/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/33222","id":"33222","filename":"pretty-xml.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-03-16T11:46:27.725-0500","size":885,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/33222/pretty-xml.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14086","id":"14086","description":"","name":"1.5.1","archived":false,"released":true,"releaseDate":"2008-02-21"}],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/64674/comment/130533","id":"130533","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Fixed in [r7279|http://fisheye.codehaus.org/changelog/plexus/?cs=7279].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-04-11T13:29:20.353-0500","updated":"2008-04-11T13:29:20.353-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-69.json b/jira/PLXUTILS-69.json new file mode 100644 index 00000000..389a5f5f --- /dev/null +++ b/jira/PLXUTILS-69.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"65869","self":"http://jira.codehaus.org/rest/api/latest/issue/65869","key":"PLXUTILS-69","fields":{"progress":{"progress":0,"total":0},"summary":"FileUtils.copyFile doesn't work when destination file is in smb share","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-69/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T14:30:41.861-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ittayd","name":"ittayd","emailAddress":"ittay.dror@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Ittay Dror","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["ittayd(ittayd)","michael-o(michael-o)"],"customfield_10160":null,"updated":"2014-11-25T14:30:41.898-0600","created":"2008-04-09T14:25:28.054-0500","description":"running mvn install fails. the relevant exception is this:\nCaused by: java.io.FileNotFoundException: w:\\maven\\repository\\com\\optier\\corefirst\\common\\Cpp\\Infrastructure\\Archive\\1.0.0-SNAPSHOT\\Archive-1.0.0-SNAPSHOT-x86-windows-msvc-shared.nar (Access is denied)\n at java.io.FileOutputStream.open(Native Method)\n at java.io.FileOutputStream.(FileOutputStream.java:179)\n at java.io.FileOutputStream.(FileOutputStream.java:131)\n at hidden.org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:930)\n at org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(DefaultArtifactInstaller.java:73)\n ... 19 more\n\nother files are created fine (classes, jars etc.)","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-69/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/65869/comment/130297","id":"130297","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ittayd","name":"ittayd","emailAddress":"ittay.dror@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Ittay Dror","active":true},"body":"After investigating, it looks like it is a permissions issue. Most files maven created were created in the linux box (yes, the smb host was linux, forgot to mention that) with sharer:users. The file above was 'ittayd:users' (not sure how), which caused the failure. Removing the file solved the issue.\r\n\r\nMaybe this scenario is too rare to deal with, or maybe you'd like to consider using jcifs.samba.org (not sure how)","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=ittayd","name":"ittayd","emailAddress":"ittay.dror@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Ittay Dror","active":true},"created":"2008-04-09T14:53:09.430-0500","updated":"2008-04-09T14:53:09.430-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/65869/comment/357282","id":"357282","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T14:30:41.889-0600","updated":"2014-11-25T14:30:41.889-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-7.json b/jira/PLXUTILS-7.json new file mode 100644 index 00000000..3d1a9ba4 --- /dev/null +++ b/jira/PLXUTILS-7.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"36948","self":"http://jira.codehaus.org/rest/api/latest/issue/36948","key":"PLXUTILS-7","fields":{"progress":{"progress":0,"total":0},"summary":"[PATCH] unnecessary NullPointerExceptions thrown and caught in org.codehaus.plexus.util.CollectionUtils.getFreq(..)","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-7/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14039","id":"14039","description":"","name":"1.3","archived":false,"released":true,"releaseDate":"2006-09-28"}],"resolutiondate":"2006-05-12T04:44:32.401-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=johnrsisson","name":"johnrsisson","emailAddress":"jrsisson@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Sisson","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["evenisse(evenisse)","johnrsisson(johnrsisson)"],"customfield_10160":null,"updated":"2008-02-02T16:00:00.886-0600","created":"2006-05-11T23:48:54.901-0500","description":"Found that whilst building Geronimo with Maven 1.1-beta2 under a debugger that there were a lot of unnecessary NullPointerExceptions thrown and caught in org.codehaus.plexus.util.CollectionUtils.getFreq(..).\n\nThis also made catching NullPointerExceptions elsewhere more difficult as I had to filter these ones out in the debugger.\n\nAttached patch will reduce the number of exceptions generated and caught.\n\nExample stack trace when exceptions thrown/caught.\n\nThread [main] (Suspended (exception java.lang.NullPointerException))\n org.codehaus.plexus.util.CollectionUtils.getFreq(java.lang.Object, java.util.Map) line: 216\n org.codehaus.plexus.util.CollectionUtils.intersection(java.util.Collection, java.util.Collection) line: 136\n org.apache.maven.MavenUtils.mergeMaps(java.util.Map, java.util.Map) line: 441\n org.apache.maven.MavenUtils.mergeMaps(java.util.Map[]) line: 480\n org.apache.maven.MavenUtils.createContextNoDefaults(java.io.File, org.apache.maven.jelly.MavenJellyContext) line: 584\n org.apache.maven.MavenUtils.createContext(java.io.File, org.apache.maven.jelly.MavenJellyContext) line: 548\n org.apache.maven.MavenUtils.createContext(java.io.File) line: 531\n org.apache.maven.cli.App.initializeRootContext() line: 374\n org.apache.maven.cli.App.initialize(java.lang.String[]) line: 293\n org.apache.maven.cli.App.initializeMain(java.lang.String[]) line: 633\n org.apache.maven.cli.App.doMain(java.lang.String[], java.util.Date) line: 482\n org.apache.maven.cli.App.main(java.lang.String[]) line: 1258\n sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) line: not available [native method]\n sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 39\n sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 25\n java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) line: 324\n com.werken.forehead.Forehead.run(java.lang.String[]) line: 551\n com.werken.forehead.Forehead.main(java.lang.String[]) line: 581\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"273888000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-7/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/20550","id":"20550","filename":"CollectionUtils-NPE.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=johnrsisson","name":"johnrsisson","emailAddress":"jrsisson@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Sisson","active":true},"created":"2006-05-11T23:48:55.055-0500","size":680,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/20550/CollectionUtils-NPE.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/36948/comment/65271","id":"65271","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"body":"Applied.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"created":"2006-05-12T04:44:32.384-0500","updated":"2006-05-12T04:44:32.384-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-70.json b/jira/PLXUTILS-70.json new file mode 100644 index 00000000..f92c9a0c --- /dev/null +++ b/jira/PLXUTILS-70.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"66406","self":"http://jira.codehaus.org/rest/api/latest/issue/66406","key":"PLXUTILS-70","fields":{"progress":{"progress":0,"total":0},"summary":"Deprecate StringInputStream and StringOutputStream","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-70/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14100","id":"14100","description":"","name":"1.5.2","archived":false,"released":true,"releaseDate":"2008-06-13"}],"resolutiondate":"2008-05-02T06:17:31.213-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","siveton(siveton)"],"customfield_10160":null,"updated":"2008-05-02T06:17:30.996-0500","created":"2008-04-19T05:57:55.188-0500","description":"The mentioned classes do not handle character encoding properly. For instance, they don't guarantee an identity transformation when being pipelined. It's a one liner to replace these classes with JRE classes so I don't see a benefit in fixing and maintaining this code.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"211593600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-70/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/33985","id":"33985","filename":"deprecate-string-streams.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-04-19T05:57:55.240-0500","size":1500,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/33985/deprecate-string-streams.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14086","id":"14086","description":"","name":"1.5.1","archived":false,"released":true,"releaseDate":"2008-02-21"}],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/66406/comment/133325","id":"133325","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"Applied. thanks!","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2008-05-02T06:17:30.779-0500","updated":"2008-05-02T06:17:30.779-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-71.json b/jira/PLXUTILS-71.json new file mode 100644 index 00000000..858ed943 --- /dev/null +++ b/jira/PLXUTILS-71.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"66538","self":"http://jira.codehaus.org/rest/api/latest/issue/66538","key":"PLXCOMP-111","fields":{"progress":{"progress":0,"total":0},"summary":"FileExtensionMapper interprets too much of the file name as an extension...","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-111/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[],"resolutiondate":"2008-04-22T17:00:57.674-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=japalm","name":"japalm","emailAddress":"jan.palmquist@leanon.se","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jan Palmquist","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","japalm(japalm)"],"customfield_10160":null,"updated":"2008-04-22T17:00:57.669-0500","created":"2008-04-22T03:28:13.549-0500","description":"Is it just me, or is org.codehaus.plexus.components.io.filemappers.FileExtensionMapper within Plexus IO interpreting file name extensions wrong?\n\nIMO it should be implemented with a lastIndexOf('.') when substituting the file extension instead of using\nline 57: final int offset = pName.indexOf( '.' );\n\nhttp://fisheye.codehaus.org/browse/plexus/plexus-components/trunk/plexus-io/src/main/java/org/codehaus/plexus/components/io/filemappers/FileExtensionMapper.java?r=7277\n\nWhen I transform using xml-maven-plugin with an input file my.file.extension and applying FileExtensionMapper with .txt, the target file is named my.txt instead of my.file.txt which I would have expected.\n\nThanks.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/5","iconUrl":"http://jira.codehaus.org/images/icons/priorities/trivial.png","name":"Trivial","id":"5"},"duedate":null,"issuelinks":[],"customfield_10163":"212371200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXCOMP-111/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11440","id":"11440","key":"PLXCOMP","name":"Plexus Components","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11440&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11440&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11440&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11440&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/66538/comment/131683","id":"131683","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Let's just say both [FilenameUtils.indexOfExtension()|http://commons.apache.org/io/api-release/org/apache/commons/io/FilenameUtils.html#indexOfExtension(java.lang.String)] from Commons IO and Windows' definition of a [File Extension|http://msdn2.microsoft.com/en-us/library/bb776869(VS.85).aspx] would agree with you ;-)","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-04-22T04:00:48.640-0500","updated":"2008-04-22T04:00:48.640-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/66538/comment/131783","id":"131783","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Fixed in [r7303|http://fisheye.codehaus.org/changelog/plexus/plexus-components/trunk/plexus-io?cs=7303].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-04-22T17:00:57.626-0500","updated":"2008-04-22T17:00:57.626-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-72.json b/jira/PLXUTILS-72.json new file mode 100644 index 00000000..23b433fb --- /dev/null +++ b/jira/PLXUTILS-72.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"66556","self":"http://jira.codehaus.org/rest/api/latest/issue/66556","key":"PLXUTILS-72","fields":{"progress":{"progress":0,"total":0},"summary":"Reflector.getObjectProperty fails to use getter","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-72/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2009-01-06T18:37:47.998-0600","customfield_10210":"3.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=joehni","name":"joehni","emailAddress":"joerg.schaible@gmx.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=joehni&avatarId=11446","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=joehni&avatarId=11446","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=joehni&avatarId=11446","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=joehni&avatarId=11446"},"displayName":"Jörg Schaible","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["joehni(joehni)","siveton(siveton)"],"customfield_10160":null,"updated":"2009-01-06T18:37:47.969-0600","created":"2008-04-22T10:09:31.340-0500","description":"The Reflector.getObjectProperty fails if a getter exists, but no field with the name of the property exists. The implementation first looks up the getter, but instead of using it, it will then look for such a declared field by calling Reflector.getField and fail with a NoSuchFieldException (nested into a ReflectorException). However, the code in Reflector.getObjectProperty expects the Reflector.getField method to return null to work properly (which is not correct either, since null might be the current value). Therefore the implementation should use an available getter and access the field only as fallback. The problem is present since at least version 1.0.1.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"189993600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-72/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/34047","id":"34047","filename":"Reflector.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=joehni","name":"joehni","emailAddress":"joerg.schaible@gmx.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=joehni&avatarId=11446","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=joehni&avatarId=11446","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=joehni&avatarId=11446","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=joehni&avatarId=11446"},"displayName":"Jörg Schaible","active":true},"created":"2008-04-22T10:20:16.532-0500","size":2735,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/34047/Reflector.patch"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/34048","id":"34048","filename":"Reflector-2.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=joehni","name":"joehni","emailAddress":"joerg.schaible@gmx.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=joehni&avatarId=11446","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=joehni&avatarId=11446","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=joehni&avatarId=11446","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=joehni&avatarId=11446"},"displayName":"Jörg Schaible","active":true},"created":"2008-04-22T10:47:16.497-0500","size":5057,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/34048/Reflector-2.patch"},{"self":"http://jira.codehaus.org/rest/api/2/attachment/34049","id":"34049","filename":"ReflectorTest.java","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=joehni","name":"joehni","emailAddress":"joerg.schaible@gmx.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=joehni&avatarId=11446","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=joehni&avatarId=11446","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=joehni&avatarId=11446","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=joehni&avatarId=11446"},"displayName":"Jörg Schaible","active":true},"created":"2008-04-22T10:47:51.228-0500","size":2279,"mimeType":"text/java","content":"http://jira.codehaus.org/secure/attachment/34049/ReflectorTest.java"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14086","id":"14086","description":"","name":"1.5.1","archived":false,"released":true,"releaseDate":"2008-02-21"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":3,"total":3,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/66556/comment/131732","id":"131732","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=joehni","name":"joehni","emailAddress":"joerg.schaible@gmx.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=joehni&avatarId=11446","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=joehni&avatarId=11446","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=joehni&avatarId=11446","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=joehni&avatarId=11446"},"displayName":"Jörg Schaible","active":true},"body":"Patch for described behaviour.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=joehni","name":"joehni","emailAddress":"joerg.schaible@gmx.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=joehni&avatarId=11446","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=joehni&avatarId=11446","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=joehni&avatarId=11446","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=joehni&avatarId=11446"},"displayName":"Jörg Schaible","active":true},"created":"2008-04-22T10:20:16.539-0500","updated":"2008-04-22T10:20:16.539-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/66556/comment/131734","id":"131734","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=joehni","name":"joehni","emailAddress":"joerg.schaible@gmx.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=joehni&avatarId=11446","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=joehni&avatarId=11446","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=joehni&avatarId=11446","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=joehni&avatarId=11446"},"displayName":"Jörg Schaible","active":true},"body":"A unit test revealed even more problems since, Reflector.getField did not access non-visible fields although code did expect that. Therefore Reflector-2.patch makes first patch obsolete.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=joehni","name":"joehni","emailAddress":"joerg.schaible@gmx.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=joehni&avatarId=11446","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=joehni&avatarId=11446","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=joehni&avatarId=11446","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=joehni&avatarId=11446"},"displayName":"Jörg Schaible","active":true},"created":"2008-04-22T10:47:16.522-0500","updated":"2008-04-22T10:47:16.522-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/66556/comment/160181","id":"160181","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"Applied in [r8009|http://fisheye.codehaus.org/changelog/plexus/?cs=8009] Thanks!","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-01-06T18:37:47.965-0600","updated":"2009-01-06T18:37:47.965-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-73.json b/jira/PLXUTILS-73.json new file mode 100644 index 00000000..aaef05a5 --- /dev/null +++ b/jira/PLXUTILS-73.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"66638","self":"http://jira.codehaus.org/rest/api/latest/issue/66638","key":"PLXUTILS-73","fields":{"progress":{"progress":0,"total":0},"summary":"Add StringUtils.isBlank() and StringUtils.isNotBlank()","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-73/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14100","id":"14100","description":"","name":"1.5.2","archived":false,"released":true,"releaseDate":"2008-06-13"}],"resolutiondate":"2008-04-23T13:49:02.574-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","trygvis(trygvis)"],"customfield_10160":null,"updated":"2008-04-24T13:25:27.067-0500","created":"2008-04-23T12:23:50.695-0500","description":"It's not that beautiful that the natural assertion\n{noformat}\n StringUtils.isEmpty(str) iff. !StringUtils.isNotEmpty(str)\n{noformat}\ndoes not hold.\n\nI propose to follow the [implementation over at Commons Lang|http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringUtils.html#isEmpty(java.lang.String)] and have {{isEmpty()}} not do trimming. Instead, new methods {{isBlank()}} and {{isNotBlank()}} should be added.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[{"id":"19329","self":"http://jira.codehaus.org/rest/api/2/issueLink/19329","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"66642","key":"PLXUTILS-74","self":"http://jira.codehaus.org/rest/api/2/issue/66642","fields":{"summary":"Make StringUtils.isEmpty() complementary to StringUtils.isNotEmpty()","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}}],"customfield_10163":"212198400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-73/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14045","id":"14045","description":"","name":"1.0.1","archived":true,"released":true,"releaseDate":"2005-07-10"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":5,"total":5,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/66638/comment/132079","id":"132079","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Added new methods in [r7304|http://fisheye.codehaus.org/changelog/plexus/?cs=7304].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-04-23T13:49:02.564-0500","updated":"2008-04-23T13:49:02.564-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/66638/comment/132507","id":"132507","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=trygvis","name":"trygvis","emailAddress":"trygvis@inamo.no","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Trygve Laugstøl","active":true},"body":"beautiful or not, the current behaviour can't change as *tons* of code might indirectly depend on it.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=trygvis","name":"trygvis","emailAddress":"trygvis@inamo.no","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Trygve Laugstøl","active":true},"created":"2008-04-24T12:38:34.911-0500","updated":"2008-04-24T12:38:34.911-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/66638/comment/132510","id":"132510","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Just to clarify: I haven't changed the current behavior for {{isEmpty()}} yet, I left this open in PLXUTILS-74 and didn't intend to close this in the near future.\r\n\r\nbq. the current behaviour can't change as tons of code might indirectly depend on it.\r\nIs this to say never ever?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-04-24T12:53:31.056-0500","updated":"2008-04-24T12:53:31.056-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/66638/comment/132513","id":"132513","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=trygvis","name":"trygvis","emailAddress":"trygvis@inamo.no","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Trygve Laugstøl","active":true},"body":"Yes, it can't change ever. I would just use commons-lang.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=trygvis","name":"trygvis","emailAddress":"trygvis@inamo.no","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Trygve Laugstøl","active":true},"created":"2008-04-24T13:18:19.353-0500","updated":"2008-04-24T13:18:19.353-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/66638/comment/132514","id":"132514","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"I see.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-04-24T13:25:27.055-0500","updated":"2008-04-24T13:25:27.055-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-74.json b/jira/PLXUTILS-74.json new file mode 100644 index 00000000..d665669e --- /dev/null +++ b/jira/PLXUTILS-74.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"66642","self":"http://jira.codehaus.org/rest/api/latest/issue/66642","key":"PLXUTILS-74","fields":{"progress":{"progress":0,"total":0},"summary":"Make StringUtils.isEmpty() complementary to StringUtils.isNotEmpty()","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-74/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2008-04-24T13:26:51.081-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)"],"customfield_10160":null,"updated":"2008-04-24T13:26:51.076-0500","created":"2008-04-23T13:51:09.402-0500","description":"The current behavior is unintuitive and should be aligned with Commons Lang 2.x, i.e. {{StringUtils.isEmpty(\" \")}} should be {{false}}.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[{"id":"19329","self":"http://jira.codehaus.org/rest/api/2/issueLink/19329","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"outwardIssue":{"id":"66638","key":"PLXUTILS-73","self":"http://jira.codehaus.org/rest/api/2/issue/66638","fields":{"summary":"Add StringUtils.isBlank() and StringUtils.isNotBlank()","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}}],"customfield_10163":"212198400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-74/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14045","id":"14045","description":"","name":"1.0.1","archived":true,"released":true,"releaseDate":"2005-07-10"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/66642/comment/132515","id":"132515","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"[Vetoed by Trygve|http://jira.codehaus.org/browse/PLXUTILS-73?focusedCommentId=132513#action_132513].","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-04-24T13:26:51.073-0500","updated":"2008-04-24T13:26:51.073-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-75.json b/jira/PLXUTILS-75.json new file mode 100644 index 00000000..a50b19d6 --- /dev/null +++ b/jira/PLXUTILS-75.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"67681","self":"http://jira.codehaus.org/rest/api/latest/issue/67681","key":"PLXUTILS-75","fields":{"progress":{"progress":0,"total":1800,"percent":0},"summary":"Xpp3DomWriter escapes characters in nested elements","timetracking":{"originalEstimate":"30m","remainingEstimate":"30m","originalEstimateSeconds":1800,"remainingEstimateSeconds":1800},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-75/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2008-12-26T07:59:36.716-0600","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jroberts","name":"jroberts","emailAddress":"jlr787s@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jared Roberts","active":true},"aggregatetimeoriginalestimate":1800,"customfield_10161":["hboutemy(hboutemy)","jroberts(jroberts)"],"customfield_10160":null,"updated":"2008-12-26T07:59:36.695-0600","created":"2008-05-09T12:58:49.913-0500","description":"The write( XMLWriter, Xpp3Dom, boolean ) does not pass the boolean \"escape\" down to subsequent recursive calls. This effectively ignores the consumer's wishes to not escape the output. A simple change to line 54 [1] to pass the boolean to the write() method should remedy the issue.\n\n[1] http://plexus.codehaus.org/plexus-utils/xref/org/codehaus/plexus/util/xml/Xpp3DomWriter.html#54\n\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[],"customfield_10163":"191030400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-75/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":0,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/34495","id":"34495","filename":"PLXUTILS-75-plexus-utils.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jroberts","name":"jroberts","emailAddress":"jlr787s@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jared Roberts","active":true},"created":"2008-05-13T09:13:52.426-0500","size":3270,"mimeType":"text/x-patch","content":"http://jira.codehaus.org/secure/attachment/34495/PLXUTILS-75-plexus-utils.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":1800,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14031","id":"14031","description":"","name":"1.4.5","archived":false,"released":true,"releaseDate":"2007-07-31"}],"customfield_10170":null,"environment":null,"timeestimate":1800,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":1800,"percent":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/67681/comment/134668","id":"134668","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jroberts","name":"jroberts","emailAddress":"jlr787s@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jared Roberts","active":true},"body":"A patch and test case to fix this issue.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jroberts","name":"jroberts","emailAddress":"jlr787s@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jared Roberts","active":true},"created":"2008-05-13T09:13:52.442-0500","updated":"2008-05-13T09:13:52.442-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/67681/comment/159214","id":"159214","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"body":"done in [r7969|http://fisheye.codehaus.org/changelog/plexus/?cs=7969]","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"created":"2008-12-26T07:59:36.692-0600","updated":"2008-12-26T07:59:36.692-0600"}]},"timeoriginalestimate":1800,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-76.json b/jira/PLXUTILS-76.json new file mode 100644 index 00000000..f66a816f --- /dev/null +++ b/jira/PLXUTILS-76.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"68995","self":"http://jira.codehaus.org/rest/api/latest/issue/68995","key":"PLXUTILS-76","fields":{"progress":{"progress":0,"total":0},"summary":"Add validation for Windows dirname for FileUtils#mkdir()","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-76/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14100","id":"14100","description":"","name":"1.5.2","archived":false,"released":true,"releaseDate":"2008-06-13"}],"resolutiondate":"2008-06-04T07:31:53.798-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["siveton(siveton)"],"customfield_10160":null,"updated":"2008-06-04T07:31:53.793-0500","created":"2008-06-04T07:23:21.001-0500","description":"Calling this snippet on a windows os, the dir is not created and no exception is thrown\n{noformat}\n File dir = new File( \"D:\\\\temp\", \"test\\\"2bla\" );\n FileUtils.mkdir( dir.getAbsolutePath() );\n System.out.println( dir.exists() );\n{noformat}\n\n[1] describes the allowed characters (\":\", \"*\", \"?\", \"\\\"\", \"<\", \">\", \"|\") in filename.\n\n[1] http://support.microsoft.com/?scid=kb%3Ben-us%3B177506&x=12&y=13","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"208742400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-76/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14086","id":"14086","description":"","name":"1.5.1","archived":false,"released":true,"releaseDate":"2008-02-21"}],"customfield_10170":null,"environment":"win os","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/68995/comment/137360","id":"137360","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"done in r7357","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2008-06-04T07:31:53.770-0500","updated":"2008-06-04T07:31:53.770-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-77.json b/jira/PLXUTILS-77.json new file mode 100644 index 00000000..5257d3a3 --- /dev/null +++ b/jira/PLXUTILS-77.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"69021","self":"http://jira.codehaus.org/rest/api/latest/issue/69021","key":"PLXUTILS-77","fields":{"progress":{"progress":0,"total":0},"summary":"BourneShell doesn't escape workingdir/executable if containing an apostrophe","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-77/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14100","id":"14100","description":"","name":"1.5.2","archived":false,"released":true,"releaseDate":"2008-06-13"}],"resolutiondate":"2008-06-04T18:43:09.620-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["siveton(siveton)"],"customfield_10160":null,"updated":"2008-06-04T18:43:09.616-0500","created":"2008-06-04T18:28:42.299-0500","description":"Working on MJAVADOC-144, I found that having a path with an apostrophe and no space, BourneShell fails","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"19767","self":"http://jira.codehaus.org/rest/api/2/issueLink/19767","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"55860","key":"MJAVADOC-144","self":"http://jira.codehaus.org/rest/api/2/issue/55860","fields":{"summary":"Cannot generate Javadoc on Mac OS X if path contains space characters","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"208656000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-77/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14086","id":"14086","description":"","name":"1.5.1","archived":false,"released":true,"releaseDate":"2008-02-21"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/69021/comment/137427","id":"137427","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"fixed in r7358, snapshot deployed","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2008-06-04T18:43:09.592-0500","updated":"2008-06-04T18:43:09.592-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-78.json b/jira/PLXUTILS-78.json new file mode 100644 index 00000000..a16eaee7 --- /dev/null +++ b/jira/PLXUTILS-78.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"69404","self":"http://jira.codehaus.org/rest/api/latest/issue/69404","key":"PLXUTILS-78","fields":{"progress":{"progress":0,"total":0},"summary":"BourneShell doesn't quote arguments containing ; and &","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-78/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14383","id":"14383","description":"","name":"1.5.3","archived":false,"released":true,"releaseDate":"2008-06-13"}],"resolutiondate":"2008-06-13T17:07:38.177-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","mkoch(mkoch)","olamy(olamy)","siveton(siveton)"],"customfield_10160":null,"updated":"2008-08-04T06:08:20.595-0500","created":"2008-06-12T15:31:48.284-0500","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[{"id":"19842","self":"http://jira.codehaus.org/rest/api/2/issueLink/19842","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"54843","key":"SCM-334","self":"http://jira.codehaus.org/rest/api/2/issue/54843","fields":{"summary":"Faulty svn commandline is generated for passwords containing special chars","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/2","iconUrl":"http://jira.codehaus.org/images/icons/priorities/critical.png","name":"Critical","id":"2"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"203472000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-78/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":5,"total":5,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/69404/comment/138400","id":"138400","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"fixed in rev 7367","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2008-06-12T16:14:33.694-0500","updated":"2008-06-12T16:14:33.694-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/69404/comment/138491","id":"138491","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mkoch","name":"mkoch","emailAddress":"mkoch@rowa.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Koch","active":true},"body":"I think that there are more chars which are special to the shell and which need to be covered. I stumbled upon SCM-334 because my password contained a ')'. I haven't had a look at the source code and how the quoting works, though.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mkoch","name":"mkoch","emailAddress":"mkoch@rowa.de","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Koch","active":true},"created":"2008-06-13T00:53:19.311-0500","updated":"2008-06-13T00:53:19.311-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/69404/comment/138580","id":"138580","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"Olivier, testArgumentsWithsemicolon() failed on unix\r\n\r\n{noformat}\r\ntestArgumentsWithsemicolon(org.codehaus.plexus.util.cli.shell.BourneShellTest) Time elapsed: 0.063 sec <<< FAILURE!\r\njunit.framework.ComparisonFailure: expected: but was:\r\n\tat junit.framework.Assert.assertEquals(Assert.java:81)\r\n\tat junit.framework.Assert.assertEquals(Assert.java:87)\r\n\tat org.codehaus.plexus.util.cli.shell.BourneShellTest.testArgumentsWithsemicolon(BourneShellTest.java:138)\r\n...\r\n{noformat}\r\n\r\nBTW I am agree with Michael: you need to include *all* specific characters, see bourne shell doc, Appendix B [1]\r\n\r\n[1] http://steve-parker.org/sh/bourne.shtml ","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2008-06-13T14:55:02.229-0500","updated":"2008-06-13T14:55:02.229-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/69404/comment/138588","id":"138588","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"fixed in rev 7373.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2008-06-13T17:07:38.159-0500","updated":"2008-06-13T17:07:38.159-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/69404/comment/144037","id":"144037","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Note: This escaping makes it impossible to construct a command line like\r\n{noformat}\r\npatch < patchfile\r\n{noformat}\r\ni.e. there is no way of getting the redirection character through to the shell. Hence, clients may need to use alternative command line parameters to accomplish this or will break.The subtle point is that this works on Windows until we fix the escaping of metacharacters there, too.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-08-04T06:08:20.560-0500","updated":"2008-08-04T06:08:20.560-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-79.json b/jira/PLXUTILS-79.json new file mode 100644 index 00000000..5a625091 --- /dev/null +++ b/jira/PLXUTILS-79.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"69471","self":"http://jira.codehaus.org/rest/api/latest/issue/69471","key":"PLXUTILS-79","fields":{"progress":{"progress":0,"total":0},"summary":"restore backward compatibility in interpolation package","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-79/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14384","id":"14384","description":"","name":"1.5.4","archived":false,"released":true,"releaseDate":"2008-06-18"}],"resolutiondate":"2008-06-14T03:00:19.729-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["olamy(olamy)"],"customfield_10160":null,"updated":"2008-06-14T03:00:19.722-0500","created":"2008-06-14T02:32:56.470-0500","description":"The shade of org.codehaus.plexus.util.interpolation breaks backward compatibility.\nSome methods need to be restored (example from org.codehaus.plexus.util.interpolation.RegexBasedInterpolator, we must have a method\n{code:java}\n public void addValueSource( org.codehaus.plexus.util.interpolation.ValueSource valueSource )\n {\n super.addValueSource( valueSource );\n }\n{code}","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[],"customfield_10163":"207878400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-79/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14100","id":"14100","description":"","name":"1.5.2","archived":false,"released":true,"releaseDate":"2008-06-13"},{"self":"http://jira.codehaus.org/rest/api/2/version/14383","id":"14383","description":"","name":"1.5.3","archived":false,"released":true,"releaseDate":"2008-06-13"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/69471/comment/138607","id":"138607","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"only backward comp for continuum start restored in rev 7391.\r\nThe end later.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2008-06-14T02:51:46.120-0500","updated":"2008-06-14T02:51:46.120-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/69471/comment/138608","id":"138608","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"fixed in rev 7392","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2008-06-14T03:00:19.714-0500","updated":"2008-06-14T03:00:19.714-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-8.json b/jira/PLXUTILS-8.json new file mode 100644 index 00000000..8875a346 --- /dev/null +++ b/jira/PLXUTILS-8.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"18597","self":"http://jira.codehaus.org/rest/api/latest/issue/18597","key":"PLXUTILS-8","fields":{"progress":{"progress":0,"total":0},"summary":"The DirectoryScanner seems to have a problem with directories containing hypens","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-8/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/5","id":"5","description":"All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.","name":"Cannot Reproduce"},"fixVersions":[],"resolutiondate":"2008-07-20T13:32:10.153-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=trygvis","name":"trygvis","emailAddress":"trygvis@inamo.no","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Trygve Laugstøl","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","trygvis(trygvis)","wfay(wfay)"],"customfield_10160":null,"updated":"2008-07-20T13:32:10.147-0500","created":"2004-10-17T18:26:32.000-0500","description":"While using doxia to generate html from my apt sources I noticed this behaviour:\n\nGiven \"docs/apt/releases/1.0-alpha-1\" as a source directory, \"target/site/releases/1\" was generated.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"204681600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-8/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/29070","id":"29070","filename":"plxutils-8_1.diff","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=wfay","name":"wfay","emailAddress":"waynefay@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Wayne Fay","active":true},"created":"2007-08-21T20:52:50.937-0500","size":2054,"mimeType":"application/octet-stream","content":"http://jira.codehaus.org/secure/attachment/29070/plxutils-8_1.diff"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/18597/comment/105382","id":"105382","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=wfay","name":"wfay","emailAddress":"waynefay@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Wayne Fay","active":true},"body":"Obviously this is a very old bug, so I don't know when or how the bug got fixed or if it was even a bug in Plexus Utils in the first place, but here is a patch to the DirectoryScannerTest file which demonstrates that DirectoryScanner has no problems with directories with hyphens in their names.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=wfay","name":"wfay","emailAddress":"waynefay@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Wayne Fay","active":true},"created":"2007-08-21T20:52:50.956-0500","updated":"2007-08-21T20:52:50.956-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/18597/comment/142527","id":"142527","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Added unit test in [r7526|http://fisheye.codehaus.org/changelog/plexus/?cs=7526], thanks Wayne!","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-07-20T13:32:10.137-0500","updated":"2008-07-20T13:32:10.137-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-80.json b/jira/PLXUTILS-80.json new file mode 100644 index 00000000..016dc3c5 --- /dev/null +++ b/jira/PLXUTILS-80.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"69599","self":"http://jira.codehaus.org/rest/api/latest/issue/69599","key":"PLXUTILS-80","fields":{"progress":{"progress":0,"total":0},"summary":"Merge code from AntBuildWriterUtil into a new XmlWriterUtil class","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-80/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14384","id":"14384","description":"","name":"1.5.4","archived":false,"released":true,"releaseDate":"2008-06-18"}],"resolutiondate":"2008-06-17T13:46:35.884-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["siveton(siveton)"],"customfield_10160":null,"updated":"2008-06-17T13:47:48.071-0500","created":"2008-06-17T13:40:02.697-0500","description":"AntBuildWriterUtil [1] contains some useful methods to play with XmlWriter and comments. I propose to merge them in p-u so the it will be reusable. \n\n[1] https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"19879","self":"http://jira.codehaus.org/rest/api/2/issueLink/19879","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"69600","key":"MANT-42","self":"http://jira.codehaus.org/rest/api/2/issue/69600","fields":{"summary":"Update to p-u 1.5.4","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false}}}}],"customfield_10163":"207532800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-80/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14383","id":"14383","description":"","name":"1.5.3","archived":false,"released":true,"releaseDate":"2008-06-13"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/69599/comment/138865","id":"138865","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"fixed in r7396","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2008-06-17T13:46:35.866-0500","updated":"2008-06-17T13:46:35.866-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-81.json b/jira/PLXUTILS-81.json new file mode 100644 index 00000000..ee6a78b3 --- /dev/null +++ b/jira/PLXUTILS-81.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"70462","self":"http://jira.codehaus.org/rest/api/latest/issue/70462","key":"PLXUTILS-81","fields":{"progress":{"progress":0,"total":0},"summary":"Exclusion Pattern does not include Serena Dimensions .metadata pattern","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-81/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2009-01-02T14:36:42.957-0600","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=kamdars","name":"kamdars","emailAddress":"sachinkamdar@hotmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"sachin kamdar","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["kamdars(kamdars)","siveton(siveton)"],"customfield_10160":null,"updated":"2009-01-02T15:22:31.724-0600","created":"2008-07-07T01:03:59.391-0500","description":"Exclusion Patterns defined in the DirectoryScanner.java does not include Serena Dimensions .metadata pattern. As a result, maven build packages hidden metadata files created by the Source Control tool. This makes the resulting artifact files unnecessarily larger and complicated. ","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"21698","self":"http://jira.codehaus.org/rest/api/2/issueLink/21698","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"79303","key":"PLXUTILS-100","self":"http://jira.codehaus.org/rest/api/2/issue/79303","fields":{"summary":"DirectoryScanner#DEFAULTEXCLUDES should exclude other SCMs like Mercury or GIT","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"190339200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-81/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/35639","id":"35639","filename":"DirectoryScanner.java","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=kamdars","name":"kamdars","emailAddress":"sachinkamdar@hotmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"sachin kamdar","active":true},"created":"2008-07-07T01:03:59.434-0500","size":38276,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/35639/DirectoryScanner.java"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14043","id":"14043","description":"","name":"1.0-alpha-1","archived":true,"released":true,"releaseDate":"2005-01-18"},{"self":"http://jira.codehaus.org/rest/api/2/version/14044","id":"14044","description":"","name":"1.0","archived":true,"released":true,"releaseDate":"2005-05-27"},{"self":"http://jira.codehaus.org/rest/api/2/version/14045","id":"14045","description":"","name":"1.0.1","archived":true,"released":true,"releaseDate":"2005-07-10"},{"self":"http://jira.codehaus.org/rest/api/2/version/14046","id":"14046","description":"","name":"1.0.2","archived":true,"released":true,"releaseDate":"2005-09-13"},{"self":"http://jira.codehaus.org/rest/api/2/version/14047","id":"14047","description":"","name":"1.0.3","archived":true,"released":true,"releaseDate":"2005-09-15"},{"self":"http://jira.codehaus.org/rest/api/2/version/14048","id":"14048","description":"","name":"1.0.4","archived":true,"released":true,"releaseDate":"2005-10-11"},{"self":"http://jira.codehaus.org/rest/api/2/version/14049","id":"14049","description":"","name":"1.0.5","archived":true,"released":true,"releaseDate":"2005-12-07"},{"self":"http://jira.codehaus.org/rest/api/2/version/14037","id":"14037","description":"","name":"1.1","archived":true,"released":true,"releaseDate":"2006-01-11"},{"self":"http://jira.codehaus.org/rest/api/2/version/14038","id":"14038","description":"","name":"1.2","archived":false,"released":true,"releaseDate":"2006-04-19"},{"self":"http://jira.codehaus.org/rest/api/2/version/14039","id":"14039","description":"","name":"1.3","archived":false,"released":true,"releaseDate":"2006-09-28"},{"self":"http://jira.codehaus.org/rest/api/2/version/14040","id":"14040","description":"","name":"1.4","archived":false,"released":true,"releaseDate":"2007-01-09"},{"self":"http://jira.codehaus.org/rest/api/2/version/14041","id":"14041","description":"","name":"1.4.1","archived":false,"released":true,"releaseDate":"2007-03-10"},{"self":"http://jira.codehaus.org/rest/api/2/version/14042","id":"14042","description":"","name":"1.4.2","archived":false,"released":true,"releaseDate":"2007-05-20"},{"self":"http://jira.codehaus.org/rest/api/2/version/14029","id":"14029","description":"","name":"1.4.3","archived":false,"released":true,"releaseDate":"2007-07-13"},{"self":"http://jira.codehaus.org/rest/api/2/version/14030","id":"14030","description":"","name":"1.4.4","archived":false,"released":true,"releaseDate":"2007-07-20"},{"self":"http://jira.codehaus.org/rest/api/2/version/14031","id":"14031","description":"","name":"1.4.5","archived":false,"released":true,"releaseDate":"2007-07-31"},{"self":"http://jira.codehaus.org/rest/api/2/version/14032","id":"14032","description":"","name":"1.4.6","archived":false,"released":true,"releaseDate":"2007-09-13"},{"self":"http://jira.codehaus.org/rest/api/2/version/14033","id":"14033","description":"","name":"1.4.7","archived":false,"released":true,"releaseDate":"2007-10-16"},{"self":"http://jira.codehaus.org/rest/api/2/version/14034","id":"14034","description":"","name":"1.4.8","archived":false,"released":true,"releaseDate":"2007-11-27"},{"self":"http://jira.codehaus.org/rest/api/2/version/14035","id":"14035","description":"","name":"1.4.9","archived":false,"released":true,"releaseDate":"2007-12-19"},{"self":"http://jira.codehaus.org/rest/api/2/version/14036","id":"14036","description":"","name":"1.5","archived":false,"released":true,"releaseDate":"2008-02-18"},{"self":"http://jira.codehaus.org/rest/api/2/version/14086","id":"14086","description":"","name":"1.5.1","archived":false,"released":true,"releaseDate":"2008-02-21"},{"self":"http://jira.codehaus.org/rest/api/2/version/14100","id":"14100","description":"","name":"1.5.2","archived":false,"released":true,"releaseDate":"2008-06-13"},{"self":"http://jira.codehaus.org/rest/api/2/version/14383","id":"14383","description":"","name":"1.5.3","archived":false,"released":true,"releaseDate":"2008-06-13"},{"self":"http://jira.codehaus.org/rest/api/2/version/14384","id":"14384","description":"","name":"1.5.4","archived":false,"released":true,"releaseDate":"2008-06-18"}],"customfield_10170":null,"environment":"All","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/70462/comment/159744","id":"159744","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"patch applied in r7996","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-01-02T14:36:42.925-0600","updated":"2009-01-02T14:36:42.925-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-82.json b/jira/PLXUTILS-82.json new file mode 100644 index 00000000..f4481f30 --- /dev/null +++ b/jira/PLXUTILS-82.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"70948","self":"http://jira.codehaus.org/rest/api/latest/issue/70948","key":"PLXUTILS-82","fields":{"progress":{"progress":0,"total":0},"summary":"Make CommandLineUtils.getSystemEnvVars() use casing rule of platform","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-82/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"resolutiondate":"2008-07-20T12:03:49.770-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","siveton(siveton)"],"customfield_10160":null,"updated":"2008-12-23T11:50:33.735-0600","created":"2008-07-16T17:26:49.905-0500","description":"Is there a good reason why calling {{CommandLineUtils.getSystemEnvVars()}} on Windows insists on returning a case-sensitive mapping whereas the Windows shell environment is case-insensitive? This makes the method quite useless with regard to platform-independent code.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"21638","self":"http://jira.codehaus.org/rest/api/2/issueLink/21638","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"78994","key":"MNG-3940","self":"http://jira.codehaus.org/rest/api/2/issue/78994","fields":{"summary":"Interpolation of environment variables is not case-insensitive on Windows","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"204681600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-82/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/35894","id":"35894","filename":"os-aware-env.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-07-16T17:26:49.912-0500","size":549,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/35894/os-aware-env.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14408","id":"14408","description":"","name":"1.5.5","archived":false,"released":true,"releaseDate":"2008-07-03"}],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":"Windows","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/70948/comment/142514","id":"142514","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"Agree with you. Please applied.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2008-07-20T10:35:46.542-0500","updated":"2008-07-20T10:35:46.542-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/70948/comment/142520","id":"142520","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"Fixed in [r7522|http://fisheye.codehaus.org/changelog/plexus/?cs=7522], thanks for reviewing Vincent!","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-07-20T12:03:49.721-0500","updated":"2008-07-20T12:03:49.721-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-83.json b/jira/PLXUTILS-83.json new file mode 100644 index 00000000..01d7fdc5 --- /dev/null +++ b/jira/PLXUTILS-83.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"34490","self":"http://jira.codehaus.org/rest/api/latest/issue/34490","key":"PLXUTILS-83","fields":{"progress":{"progress":0,"total":0},"summary":"new lines inside attributes are not escaped in xml","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-83/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14038","id":"14038","description":"","name":"1.2","archived":false,"released":true,"releaseDate":"2006-04-19"}],"resolutiondate":"2006-03-04T11:16:46.010-0600","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=elpunzalan","name":"elpunzalan","emailAddress":"epunzalan@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Edwin Punzalan","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["elpunzalan(elpunzalan)"],"customfield_10160":null,"updated":"2008-07-27T16:52:39.743-0500","created":"2006-03-04T10:01:06.529-0600","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"duedate":null,"issuelinks":[{"id":"13725","self":"http://jira.codehaus.org/rest/api/2/issueLink/13725","type":{"id":"10020","name":"Supercedes","inward":"is superceded by","outward":"supercedes","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10020"},"outwardIssue":{"id":"27512","key":"MIDEA-5","self":"http://jira.codehaus.org/rest/api/2/issue/27512","fields":{"summary":"using copyright plugin gets converted back differently to original, corrupting ipr","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"279763200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-83/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=elpunzalan","name":"elpunzalan","emailAddress":"epunzalan@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Edwin Punzalan","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/19423","id":"19423","filename":"PLX-204-plexus-utils.patch","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=elpunzalan","name":"elpunzalan","emailAddress":"epunzalan@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Edwin Punzalan","active":true},"created":"2006-03-04T10:12:39.971-0600","size":2003,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/19423/PLX-204-plexus-utils.patch"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14037","id":"14037","description":"","name":"1.1","archived":true,"released":true,"releaseDate":"2006-01-11"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/34490/comment/60061","id":"60061","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=elpunzalan","name":"elpunzalan","emailAddress":"epunzalan@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Edwin Punzalan","active":true},"body":"Attached patch with unit test proof","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=elpunzalan","name":"elpunzalan","emailAddress":"epunzalan@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Edwin Punzalan","active":true},"created":"2006-03-04T10:12:40.013-0600","updated":"2006-03-04T10:12:40.013-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/34490/comment/60065","id":"60065","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=elpunzalan","name":"elpunzalan","emailAddress":"epunzalan@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Edwin Punzalan","active":true},"body":"Patch applied. Thanks for the commit access. ^_^","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=elpunzalan","name":"elpunzalan","emailAddress":"epunzalan@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Edwin Punzalan","active":true},"created":"2006-03-04T11:16:45.998-0600","updated":"2006-03-04T11:16:45.998-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-84.json b/jira/PLXUTILS-84.json new file mode 100644 index 00000000..e5a72536 --- /dev/null +++ b/jira/PLXUTILS-84.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"41769","self":"http://jira.codehaus.org/rest/api/latest/issue/41769","key":"PLXUTILS-84","fields":{"progress":{"progress":0,"total":0},"summary":"plexus-utils: NullPointerException in Xpp3Dom.equals()","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-84/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14040","id":"14040","description":"","name":"1.4","archived":false,"released":true,"releaseDate":"2007-01-09"}],"resolutiondate":"2006-10-15T12:57:41.253-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=klaus.brunner","name":"klaus.brunner","emailAddress":"klaus.brunner@uniqa.at","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Klaus Brunner","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["handyande(handyande)","klaus.brunner(klaus.brunner)"],"customfield_10160":null,"updated":"2008-07-27T16:54:43.208-0500","created":"2006-09-20T04:49:04.065-0500","description":"org.codehaus.plexus.util.xml.Xpp3Dom.equals() fails with a NullPointerException if (this.value != null) && (obj.value == null). The code wrongly assumes that if this.value is non-null, obj.value must be non-null as well. Same thing for the \"name\" field.\n\nSuggested fix:\n\n public boolean equals( Object obj )\n {\n .......\n if ( name == null ? dom.name != null : (dom.name == null) || !dom.name.equals( name ) )\n {\n return false;\n }\n else if ( value == null ? dom.value != null : (dom.value == null) || !dom.value.equals( value ) )\n {\n return false;\n }\n ........\n }","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"20124","self":"http://jira.codehaus.org/rest/api/2/issueLink/20124","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"outwardIssue":{"id":"61808","key":"PLXUTILS-63","self":"http://jira.codehaus.org/rest/api/2/issue/61808","fields":{"summary":"plexus-utils: NullPointerException in Xpp3Dom.equals()","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"260323200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-84/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=handyande","name":"handyande","emailAddress":"andy@handyande.co.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andrew Williams","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14039","id":"14039","description":"","name":"1.3","archived":false,"released":true,"releaseDate":"2006-09-28"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10053","value":"Yes","id":"10053"},"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/41769/comment/75282","id":"75282","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=klaus.brunner","name":"klaus.brunner","emailAddress":"klaus.brunner@uniqa.at","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Klaus Brunner","active":true},"body":"This applies to the \"attributes\" and \"childList\" fields as well.\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=klaus.brunner","name":"klaus.brunner","emailAddress":"klaus.brunner@uniqa.at","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Klaus Brunner","active":true},"created":"2006-09-20T04:54:00.297-0500","updated":"2006-09-20T04:54:00.297-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/41769/comment/77693","id":"77693","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=handyande","name":"handyande","emailAddress":"andy@handyande.co.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andrew Williams","active":true},"body":"Fixed in subversion","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=handyande","name":"handyande","emailAddress":"andy@handyande.co.uk","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andrew Williams","active":true},"created":"2006-10-15T12:57:41.223-0500","updated":"2006-10-15T12:57:41.223-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-85.json b/jira/PLXUTILS-85.json new file mode 100644 index 00000000..074ade83 --- /dev/null +++ b/jira/PLXUTILS-85.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"27795","self":"http://jira.codehaus.org/rest/api/latest/issue/27795","key":"PLXUTILS-85","fields":{"progress":{"progress":0,"total":0},"summary":"under windows when executing java classpaths with embedded spaces cause the execution to fail","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-85/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14038","id":"14038","description":"","name":"1.2","archived":false,"released":true,"releaseDate":"2006-04-19"}],"resolutiondate":"2006-04-19T06:08:28.347-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=andyglick","name":"andyglick","emailAddress":"andyglick@acm.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andy Glick","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["andyglick(andyglick)","brettporter(brettporter)","carlos(carlos)","lacostej(lacostej)"],"customfield_10160":null,"updated":"2008-07-27T16:47:24.748-0500","created":"2005-10-02T13:44:09.868-0500","description":"using plexus.util.cli as a runtime package, i am constructing command lines to run forked surefire processes - the maven repo is located at c:\\documents and settings\\\\.m2\\repository - so any repository based jar has spaces embedded in its file spec - even when the classpath string is placed into its own arg element the java runtime seems to be parsing it and breaking it up into tokens on the white space - the error message is\n\njava -classpath and \nclass and not found\n\nant's low level java excution class Java13CommandLauncher doesn't exhibit this behavior, using maven1 with the Ant java task and the -X option enabled the arguments that are displayed are 1) the executable 2) -classpath and 3) the whole classpath as a single argument which contains embedded spaces\n\ni suppose that plexus-utils lacks some critical logic that is present in ant's set of java execution classes\n\nhere is a sample output from executing the Ant java task in a maven 1 environment: the lines are wrapped cause I cut and pasted them from a cmd window\n\n [java] [DEBUG] Execute:Java13CommandLauncher: Executing 'F:\\java-1.4.2\\jre\\b\nin\\java.exe' with arguments:\n'-classpath'\n'F:\\devel4\\beanshellscripts\\target\\classes;C:\\Documents and Settings\\Administrat\nor\\.maven\\repository\\bsh\\jars\\bsh-2.0b2.jar;C:\\Documents and Settings\\Administra\ntor\\.maven\\repository\\commons-collections\\jars\\commons-collections-3.1.jar;C:\\Do\ncuments and Settings\\Administrator\\.maven\\repository\\commons-configuration\\jars\\\ncommons-configuration-1.0.jar;C:\\Documents and Settings\\Administrator\\.maven\\rep\nository\\commons-jxpath\\jars\\commons-jxpath-1.2.jar;C:\\Documents and Settings\\Adm\ninistrator\\.maven\\repository\\commons-lang\\jars\\commons-lang-2.0.jar;C:\\Documents\n and Settings\\Administrator\\.maven\\repository\\commons-logging\\jars\\commons-loggi\nng-1.0.4.jar;C:\\Documents and Settings\\Administrator\\.maven\\repository\\junit\\jar\ns\\junit-3.8.1.jar;C:\\Documents and Settings\\Administrator\\.maven\\repository\\jdom\n\\jars\\jdom-1.0.jar;C:\\Documents and Settings\\Administrator\\.maven\\repository\\mys\nql\\jars\\mysql-connector-java-3.0.15-ga-bin.jar;C:\\Documents and Settings\\Adminis\ntrator\\.maven\\repository\\zrgs\\jars\\cicerone-1.0.jar'\n'bsh.Console'\n\nThe ' characters around the executable and arguments are\nnot part of the command.\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"13916","self":"http://jira.codehaus.org/rest/api/2/issueLink/13916","type":{"id":"10000","name":"Duplicate","inward":"is duplicated by","outward":"duplicates","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10000"},"inwardIssue":{"id":"26628","key":"PLXUTILS-6","self":"http://jira.codehaus.org/rest/api/2/issue/26628","fields":{"summary":"Commandline: Command not found when executable has a in its path","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"16490","self":"http://jira.codehaus.org/rest/api/2/issueLink/16490","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"49571","key":"PLXUTILS-31","self":"http://jira.codehaus.org/rest/api/2/issue/49571","fields":{"summary":"Quoting issue on Windows. Potential regression ?","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"13918","self":"http://jira.codehaus.org/rest/api/2/issueLink/13918","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"35559","key":"MCOMPILER-30","self":"http://jira.codehaus.org/rest/api/2/issue/35559","fields":{"summary":"Compiler fork executable fails when the path has spaces","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}},{"id":"13924","self":"http://jira.codehaus.org/rest/api/2/issueLink/13924","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"35677","key":"SUREFIRE-77","self":"http://jira.codehaus.org/rest/api/2/issue/35677","fields":{"summary":"Surefire fork fails under windows when command has several quotes","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"275875200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-85/watchers","watchCount":2,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14047","id":"14047","description":"","name":"1.0.3","archived":true,"released":true,"releaseDate":"2005-09-15"}],"customfield_10170":null,"environment":"win 2k - jdk 1.4.2 - attempting to fork surefire tests for maven2","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":8,"total":8,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/27795/comment/47634","id":"47634","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"body":"Slightly off topic:\r\n\r\nAndy, I know that plexus developers are thinking about reusing commons-exec (currently inside Jakarta Commons Sandbox) inside m2/continuum and maybe plexus.\r\nCommons-exec is the ant code taken out for reusability. There's some talk to make the API more usable, but this process just started, so the API is not yet stable.\r\nI don't know when commons-exec will be ready but you may want to follow what's going on there. \r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2005-10-02T14:53:06.999-0500","updated":"2005-10-02T14:53:06.999-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/27795/comment/47831","id":"47831","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"body":"andy - how is your progress on this?\r\n\r\nIf you have anything pending to commit, it'd be great if you could do so - I'd like to take a stab at getting this resolved.\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"created":"2005-10-05T01:46:14.821-0500","updated":"2005-10-05T01:46:14.821-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/27795/comment/47988","id":"47988","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=andyglick","name":"andyglick","emailAddress":"andyglick@acm.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andy Glick","active":true},"body":"Brett,\r\n\r\nSorry, I took the easy way out. I discussed it with Jason and possibly you, at least for part of it, via irc. It turns out that someone who uses windows can move an M2 repository simply by changing the setting for repo.local in the main settings.xml file in user.home. So I moved my M2 repo to a location that didn't include spaces and disappeared the problem in a non-hack manner - even if that is a hack, its nowhere near as severe as \"~1\" - ;) - anyway - I suggested to jason that we should add doco that explained same in a prominent location on the M2 site and to the M2 start up guide - and that a marketing pitch similar to \"M2 users on Windows - prepare for M2 forking - migrate your M2 repository to a file system location that doesn't contain spaces\" might be eye catching enough to get people to both notice and execute the suggestion. especially if they find that it breaks if they don't do it - Jason asked me to send him an email which restated the above and I did do that, my marketing pitch may not have been stated as succinctly, but the message included the necessary content.\r\n\r\nThe alternative is to work out why spaces are causing the problem on Windows in plexus.util in the 1st place, or to get commons-exec ready for prime time, and you seemed to think that such was a way off.\r\n\r\nOn a different level, when I went to check in some of my updates I found that I couldn't commit to svn because of an authentication problem. I'm communicating with Jason about that now, I have already sent him an email with my questions and I am awaiting his reply.\r\n\r\nI also expect to start up a Confluence page under the Maven project about Surefire - there doesn't seem to be a separate Confluence entry for Surefire at the codehaus. I'd like to set up a discussion forum that discusses how surefire is supposed to work with the current concerns for web and xmlrpc and how that relates, if it does, to integrating testing frameworks like testng","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=andyglick","name":"andyglick","emailAddress":"andyglick@acm.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Andy Glick","active":true},"created":"2005-10-06T17:33:05.224-0500","updated":"2005-10-06T17:33:05.224-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/27795/comment/62671","id":"62671","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"body":"I think I found the cause, cmd fails in win xp when two arguments have quotes,\r\n\r\nWorks:\r\ncmd /X /C \"C:\\Program Files\\Java\\jdk1.3.1_18\\bin\\javac\" xxx\r\n\r\nDoesn't work:\r\ncmd /X /C \"C:\\Program Files\\Java\\jdk1.3.1_18\\bin\\javac\" \"xxx\"\r\n\r\nwith error:\r\n'C:\\Program' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n\r\nThe solution is not calling cmd under windows, and call the executable directly, but it may break in other systems","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"created":"2006-04-03T13:56:35.653-0500","updated":"2006-04-03T13:56:35.653-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/27795/comment/62672","id":"62672","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"body":"btw I didn't see any problem with the classpath entries, they are correctly quoted","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"created":"2006-04-03T13:57:45.639-0500","updated":"2006-04-03T13:57:45.639-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/27795/comment/62674","id":"62674","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"body":"The solution is adding quotes at the beggining and the end\r\ncmd /X /C \"\"C:\\Program Files\\Java\\jdk1.3.1_18\\bin\\javac\" \"xxx\"\"","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"created":"2006-04-03T14:11:00.352-0500","updated":"2006-04-03T14:11:00.352-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/27795/comment/62699","id":"62699","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"body":"Fixed in plexus-utils 1.2-SNAPSHOT, will check the plugins","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"created":"2006-04-03T18:14:48.030-0500","updated":"2006-04-03T18:14:48.030-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/27795/comment/63761","id":"63761","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"body":"Individual arguments shouldn't be quoted","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=carlos","name":"carlos","emailAddress":"codehaus@carlossanchez.eu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=carlos&avatarId=12550","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=carlos&avatarId=12550","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=carlos&avatarId=12550","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=carlos&avatarId=12550"},"displayName":"Carlos Sanchez","active":true},"created":"2006-04-18T19:29:32.352-0500","updated":"2006-04-18T19:29:32.352-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-86.json b/jira/PLXUTILS-86.json new file mode 100644 index 00000000..017a38f2 --- /dev/null +++ b/jira/PLXUTILS-86.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"20648","self":"http://jira.codehaus.org/rest/api/latest/issue/20648","key":"PLXUTILS-86","fields":{"progress":{"progress":0,"total":3600,"percent":0},"summary":"InterpolationFilterReader bounds-checking is broken","timetracking":{"originalEstimate":"1h","remainingEstimate":"1h","originalEstimateSeconds":3600,"remainingEstimateSeconds":3600},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-86/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14045","id":"14045","description":"","name":"1.0.1","archived":true,"released":true,"releaseDate":"2005-07-10"}],"resolutiondate":"2005-06-20T10:12:11.562-0500","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=jdcasey","name":"jdcasey","emailAddress":"jdcasey@commonjava.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"John Casey","active":true},"aggregatetimeoriginalestimate":3600,"customfield_10161":["brettporter(brettporter)","jdcasey(jdcasey)","kenneyw(kenneyw)"],"customfield_10160":null,"updated":"2008-07-27T16:57:21.582-0500","created":"2005-02-03T17:36:49.000-0600","description":"The InterpolationFilterReader leaves the end-token of an expression in the resulting data. This is because it doesn't skip() past the end of the end-token when it encounters it.\n\nWill fix when I have time and a high enough level of sado-masochism.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"302054400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-86/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":0,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/14284","id":"14284","filename":"PLX-106-patch.gz","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=kenneyw","name":"kenneyw","emailAddress":"kenney@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=kenneyw&avatarId=12410","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=kenneyw&avatarId=12410","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=kenneyw&avatarId=12410","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=kenneyw&avatarId=12410"},"displayName":"Kenney Westerhof","active":true},"created":"2005-04-15T12:15:08.939-0500","size":1893,"mimeType":"application/gzip","content":"http://jira.codehaus.org/secure/attachment/14284/PLX-106-patch.gz"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":3600,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14044","id":"14044","description":"","name":"1.0","archived":true,"released":true,"releaseDate":"2005-05-27"}],"customfield_10170":null,"environment":"all","timeestimate":3600,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":3600,"percent":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":3,"total":3,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/20648/comment/32068","id":"32068","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=kenneyw","name":"kenneyw","emailAddress":"kenney@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=kenneyw&avatarId=12410","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=kenneyw&avatarId=12410","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=kenneyw&avatarId=12410","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=kenneyw&avatarId=12410"},"displayName":"Kenney Westerhof","active":true},"body":"Fixed this bug and some others.\r\nAdded (REAL!) support for multichar start/end delimiters,\r\nand added 4 unit testcases to demonstrate them.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=kenneyw","name":"kenneyw","emailAddress":"kenney@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=kenneyw&avatarId=12410","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=kenneyw&avatarId=12410","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=kenneyw&avatarId=12410","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=kenneyw&avatarId=12410"},"displayName":"Kenney Westerhof","active":true},"created":"2005-04-15T12:15:08.945-0500","updated":"2005-04-15T12:15:08.945-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/20648/comment/37931","id":"37931","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"body":"John, can you take a look at the patch, see if it is appropriate?\r\nOr was this class meant to be replaced with something else?","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"created":"2005-04-22T02:54:11.386-0500","updated":"2005-04-22T02:54:11.386-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/20648/comment/41710","id":"41710","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"body":"applied Kenney's patch.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"created":"2005-06-20T10:12:11.464-0500","updated":"2005-06-20T10:12:11.464-0500"}]},"timeoriginalestimate":3600,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-87.json b/jira/PLXUTILS-87.json new file mode 100644 index 00000000..48456fa3 --- /dev/null +++ b/jira/PLXUTILS-87.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"44703","self":"http://jira.codehaus.org/rest/api/latest/issue/44703","key":"PLXUTILS-87","fields":{"progress":{"progress":0,"total":0},"summary":"SweeperPool does not clean up thread correctly","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10040","value":"yes","id":"10040"},"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-87/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14040","id":"14040","description":"","name":"1.4","archived":false,"released":true,"releaseDate":"2007-01-09"}],"resolutiondate":"2006-12-26T17:47:58.133-0600","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=baerrach","name":"baerrach","emailAddress":"baerrach@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrie Treloar","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["baerrach(baerrach)","brettporter(brettporter)","wsmoak(wsmoak)"],"customfield_10160":null,"updated":"2008-07-27T16:58:59.750-0500","created":"2006-12-11T00:59:01.465-0600","description":"SweeperPool.dispose() does not wait for the thread to complete processing and when run in a junit test suite this causes the forked JVM to hang.\n\nUnit test and patch attached.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"254102400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-87/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/24565","id":"24565","filename":"PLX-310-patch.txt","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=baerrach","name":"baerrach","emailAddress":"baerrach@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Barrie Treloar","active":true},"created":"2006-12-11T00:59:26.654-0600","size":4022,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/24565/PLX-310-patch.txt"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14039","id":"14039","description":"","name":"1.3","archived":false,"released":true,"releaseDate":"2006-09-28"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10053","value":"Yes","id":"10053"},"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/44703/comment/83208","id":"83208","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=wsmoak","name":"wsmoak","emailAddress":"wsmoak@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Wendy Smoak","active":true},"body":"Just ran into this one, SweeperPoolTest hangs, and ctrl-c leaves a java process running with the test output file locked.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=wsmoak","name":"wsmoak","emailAddress":"wsmoak@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Wendy Smoak","active":true},"created":"2006-12-21T22:09:30.815-0600","updated":"2006-12-21T22:09:30.815-0600"},{"self":"http://jira.codehaus.org/rest/api/2/issue/44703/comment/83401","id":"83401","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"body":"applied","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"created":"2006-12-26T17:47:58.109-0600","updated":"2006-12-26T17:47:58.109-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-88.json b/jira/PLXUTILS-88.json new file mode 100644 index 00000000..fd1639e3 --- /dev/null +++ b/jira/PLXUTILS-88.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"32327","self":"http://jira.codehaus.org/rest/api/latest/issue/32327","key":"PLXUTILS-88","fields":{"progress":{"progress":0,"total":0},"summary":"Wrong encoding in xml documents","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-88/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14038","id":"14038","description":"","name":"1.2","archived":false,"released":true,"releaseDate":"2006-04-19"}],"resolutiondate":"2006-01-23T17:09:32.164-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=mcetnarski","name":"mcetnarski","emailAddress":"marcin.cetnarski@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Marcin Cetnarski","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["brettporter(brettporter)","gslowikowski(gslowikowski)","mcetnarski(mcetnarski)"],"customfield_10160":null,"updated":"2008-07-27T17:01:50.524-0500","created":"2006-01-14T12:44:38.971-0600","description":"In class Xpp3DomWriter following method is missing\n\n public static void write( PrintWriter writer, Xpp3Dom dom )\n {\n write( new PrettyPrintXMLWriter( writer ), dom );\n }\n\nNow, when we pass an instance of PrintWriter it is casted to Writer interface and after that wrong contructor in PrettyPrintXMLWriter class is used. This problem appears in generation of maven surefire test results contain non ascii letters.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"283132800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-88/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14037","id":"14037","description":"","name":"1.1","archived":true,"released":true,"releaseDate":"2006-01-11"}],"customfield_10170":null,"environment":"All","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/32327/comment/56912","id":"56912","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=gslowikowski","name":"gslowikowski","emailAddress":"gslowikowski@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Grzegorz Slowikowski","active":true},"body":"This change made by Brett [ plexus commit no 3016] is not necessary. Some changes \"here and there\", which means some new versions of reporting plugins fixed this error. We tried to find out, what exactly did the fix, but we had no luck.\r\nSo this commit can be reverted. Everything works without this change.\r\n","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=gslowikowski","name":"gslowikowski","emailAddress":"gslowikowski@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Grzegorz Slowikowski","active":true},"created":"2006-01-25T09:48:12.901-0600","updated":"2006-01-25T09:48:12.901-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-89.json b/jira/PLXUTILS-89.json new file mode 100644 index 00000000..2ee1454d --- /dev/null +++ b/jira/PLXUTILS-89.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"41088","self":"http://jira.codehaus.org/rest/api/latest/issue/41088","key":"PLXUTILS-89","fields":{"progress":{"progress":0,"total":0},"summary":"FileUtils.copyDirectoryStructure truncates all files when source==target","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-89/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14039","id":"14039","description":"","name":"1.3","archived":false,"released":true,"releaseDate":"2006-09-28"}],"resolutiondate":"2006-08-31T14:31:27.932-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=kenneyw","name":"kenneyw","emailAddress":"kenney@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&ownerId=kenneyw&avatarId=12410","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&ownerId=kenneyw&avatarId=12410","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&ownerId=kenneyw&avatarId=12410","48x48":"http://jira.codehaus.org/secure/useravatar?ownerId=kenneyw&avatarId=12410"},"displayName":"Kenney Westerhof","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["evenisse(evenisse)","kenneyw(kenneyw)"],"customfield_10160":null,"updated":"2008-07-27T17:03:22.571-0500","created":"2006-08-31T10:02:02.543-0500","description":"plexus-utils 1.2","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"264211200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-89/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14038","id":"14038","description":"","name":"1.2","archived":false,"released":true,"releaseDate":"2006-04-19"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/41088/comment/73831","id":"73831","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"body":"Fixed in plexus-utils 1.3","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"created":"2006-08-31T14:31:27.873-0500","updated":"2006-08-31T14:31:27.873-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/41088/comment/73832","id":"73832","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"body":"Now, we throws an IOException when source == target","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=evenisse","name":"evenisse","emailAddress":"emmanuel.venisse@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Emmanuel Venisse","active":true},"created":"2006-08-31T14:31:55.834-0500","updated":"2006-08-31T14:31:55.834-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-9.json b/jira/PLXUTILS-9.json new file mode 100644 index 00000000..15c7687a --- /dev/null +++ b/jira/PLXUTILS-9.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"36231","self":"http://jira.codehaus.org/rest/api/latest/issue/36231","key":"PLXUTILS-9","fields":{"progress":{"progress":0,"total":0},"summary":"PlexusUtils.getSystemEnvVars doesn't clean up resources","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-9/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/5","id":"5","description":"All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.","name":"Cannot Reproduce"},"fixVersions":[],"resolutiondate":"2006-04-21T11:47:21.192-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["lacostej(lacostej)"],"customfield_10160":null,"updated":"2007-01-13T01:01:53.452-0600","created":"2006-04-21T11:06:00.641-0500","description":"Using the embedder I am hitting the following issue;\n\njava 7399 jerome 7u sock 0,4 25306792 can't identify protocol\njava 7399 jerome 8u IPv6 25306796 TCP *:8181 (LISTEN)\njava 7399 jerome 9r REG 3,66 90 34656 /home/jerome/.mailcap\njava 7399 jerome 10w FIFO 0,5 25416706 pipe\njava 7399 jerome 11w FIFO 0,5 25436577 pipe\njava 7399 jerome 12w FIFO 0,5 25320121 pipe\njava 7399 jerome 13r FIFO 0,5 25320122 pipe\njava 7399 jerome 14w FIFO 0,5 25328530 pipe\njava 7399 jerome 15r FIFO 0,5 25320123 pipe\njava 7399 jerome 16w FIFO 0,5 25315686 pipe\njava 7399 jerome 17r FIFO 0,5 25315687 pipe\njava 7399 jerome 18w FIFO 0,5 25320126 pipe\njava 7399 jerome 19r FIFO 0,5 25315688 pipe\njava 7399 jerome 20r FIFO 0,5 25320127 pipe\njava 7399 jerome 21r FIFO 0,5 25328531 pipe\njava 7399 jerome 22r FIFO 0,5 25320128 pipe\n\n[...]\n\njava 7399 jerome 1007r FIFO 0,5 26391458 pipe\njava 7399 jerome 1008r FIFO 0,5 26416550 pipe\njava 7399 jerome 1009w FIFO 0,5 26421728 pipe\njava 7399 jerome 1010r FIFO 0,5 26416551 pipe\njava 7399 jerome 1011r FIFO 0,5 26421729 pipe\njava 7399 jerome 1012w FIFO 0,5 26421776 pipe\njava 7399 jerome 1013r FIFO 0,5 26421730 pipe\njava 7399 jerome 1014r FIFO 0,5 26421777 pipe\njava 7399 jerome 1015w FIFO 0,5 26425995 pipe\njava 7399 jerome 1016r FIFO 0,5 26421778 pipe\njava 7399 jerome 1017r FIFO 0,5 26425996 pipe\njava 7399 jerome 1019r FIFO 0,5 26425997 pipe\njava 7399 jerome 1020r FIFO 0,5 26434244 pipe\n\n\nException in thread \"Thread-1796\" java.io.IOException: java.io.IOException: Too many open files\n at java.lang.UNIXProcess.(UNIXProcess.java:148)\n at java.lang.ProcessImpl.start(ProcessImpl.java:65)\n at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)\n at java.lang.Runtime.exec(Runtime.java:591)\n at java.lang.Runtime.exec(Runtime.java:429)\n at java.lang.Runtime.exec(Runtime.java:326)\n at org.codehaus.plexus.util.cli.CommandLineUtils.getSystemEnvVars(CommandLineUtils.java:177)\n at org.apache.maven.project.interpolation.RegexBasedModelInterpolator.(RegexBasedModelInterpolator.java:60)\n at sun.reflect.GeneratedConstructorAccessor56.newInstance(Unknown Source)\n at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)\n at java.lang.reflect.Constructor.newInstance(Constructor.java:494)\n at java.lang.Class.newInstance0(Class.java:350)\n at java.lang.Class.newInstance(Class.java:303)\n at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44)\n at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1464)\n at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:93)\n at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92)\n at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)\n at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:129)\n at org.codehaus.plexus.component.composition.FieldComponentComposer.assembleComponent(FieldComponentComposer.java:73)\n at org.codehaus.plexus.component.composition.DefaultComponentComposerManager.assembleComponent(DefaultComponentComposerManager.java:68)\n at org.codehaus.plexus.DefaultPlexusContainer.composeComponent(DefaultPlexusContainer.java:1486)\n at org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:29)\n at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:101)\n at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:105) at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:95)\n at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92)\n at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)\n at org.codehaus.plexus.embed.Embedder.lookup(Embedder.java:78)\n at org.apache.maven.embedder.MavenEmbedder.start(MavenEmbedder.java:610)\n[...]\n\n\nThe aforementionned method doesn't clean up the Process resources. Blocker as it makes it impossible to reuse the embedder.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[],"customfield_10163":"275616000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-9/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":null,"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/36231/comment/63947","id":"63947","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"body":"I wasn't able to reproduce it yet. I've used the following code snippet from kenney\r\n\r\nimport java.io.*;\r\n\r\npublic class TestIt\r\n{\r\n public static void main(String argv[])\r\n throws java.io.IOException, InterruptedException\r\n {\r\n for ( int i = 0; ; i++)\r\n {\r\n if ( i % 10 == 0 )\r\n System.out.println( i );\r\n// Thread.sleep(50);\r\n/* new Thread(new Runnable() {\r\n public void run() {\r\n try {\r\n*/\r\n test();\r\n/* } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }).start();\r\n*/\r\n }\r\n }\r\n\r\n private static void test()\r\n throws java.io.IOException\r\n {\r\n Process p = Runtime.getRuntime().exec(\"env | cat\");\r\n BufferedReader br = new BufferedReader( new InputStreamReader( p.getInputStream() ) );\r\n while (br.readLine() != null ) {}\r\n\r\n }\r\n}\r\n\r\n\r\nIt ran up to 40k without issues. I tried adding threads but that didn't trigger it. I monitored the number of open descriptors and it went between 1 and 650. My limit is 1024.\r\n\r\nDoing:\r\n\r\nulimit -n 500 && java TestIt reproduced the issue easily but that's kind of cheating :)\r\n\r\n\r\nMaybe another part of the system generates these pipes and they are uncovered by this call? I will close the issue until I find the real culprit...\r\n\r\nFor reference: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4784692","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=lacostej","name":"lacostej","emailAddress":"jerome.lacoste@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Jerome Lacoste","active":true},"created":"2006-04-21T11:46:53.227-0500","updated":"2006-04-21T11:46:53.227-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-90.json b/jira/PLXUTILS-90.json new file mode 100644 index 00000000..c13bdea7 --- /dev/null +++ b/jira/PLXUTILS-90.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"20340","self":"http://jira.codehaus.org/rest/api/latest/issue/20340","key":"PLXUTILS-90","fields":{"progress":{"progress":0,"total":0},"summary":"release 1.0-alpha-1","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/task.png","name":"Task","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-90/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[],"resolutiondate":"2005-01-18T07:07:43.000-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["brettporter(brettporter)","trygvis(trygvis)"],"customfield_10160":null,"updated":"2008-07-20T13:05:07.590-0500","created":"2005-01-14T06:44:06.000-0600","description":"Release (in this order):\n plexus-utils 1.0-alpha-1\n plexus-containers (POM) 1.0-alpha-1\n * current POM is 1.0, but depends on utils a1 SNAP\n plexus-container-default 1.0-alpha-1\n * current POM is 1.0-alpha-2-SNAPSHOT, revert back to that\n afterwards\n\nRequired for each:\n- update POM version, commit\n- tag\n- checkout clean\n- build jar\n- publish jar (with md5, asc) and pom\n- push to dist.codehaus.org\n\nDon't need to do this time around:\n- release JIRA version. it currently covers -all- of plexus, so we need to setup a proper release strategy and separation for alpha-2.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/1","iconUrl":"http://jira.codehaus.org/images/icons/priorities/blocker.png","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[],"customfield_10163":"315273600","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-90/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=trygvis","name":"trygvis","emailAddress":"trygvis@inamo.no","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Trygve Laugstøl","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/20340/comment/29034","id":"29034","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"body":"confirmed - closed.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=brettporter","name":"brettporter","emailAddress":"brett@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Brett Porter","active":true},"created":"2005-01-18T07:50:25.000-0600","updated":"2005-01-18T07:50:25.000-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-91.json b/jira/PLXUTILS-91.json new file mode 100644 index 00000000..a7764c8e --- /dev/null +++ b/jira/PLXUTILS-91.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"73599","self":"http://jira.codehaus.org/rest/api/latest/issue/73599","key":"PLXUTILS-91","fields":{"progress":{"progress":0,"total":0},"summary":"add a copyDirectoryLayout which support excludes and includes","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-91/votes","votes":1,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[],"resolutiondate":"2014-11-25T15:38:07.423-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["bentmann(bentmann)","michael-o(michael-o)","olamy(olamy)"],"customfield_10160":null,"updated":"2014-11-25T15:38:07.458-0600","created":"2008-09-15T14:56:26.265-0500","description":null,"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"20507","self":"http://jira.codehaus.org/rest/api/2/issueLink/20507","type":{"id":"10010","name":"Related","inward":"is related to","outward":"relates to","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10010"},"inwardIssue":{"id":"32432","key":"PLXUTILS-26","self":"http://jira.codehaus.org/rest/api/2/issue/32432","fields":{"summary":"Allow to deep copy directories with includes/excludes","status":{"self":"http://jira.codehaus.org/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/open.png","name":"Open","id":"1"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/4","iconUrl":"http://jira.codehaus.org/images/icons/priorities/minor.png","name":"Minor","id":"4"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}},{"id":"20503","self":"http://jira.codehaus.org/rest/api/2/issueLink/20503","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"73538","key":"MSHARED-68","self":"http://jira.codehaus.org/rest/api/2/issue/73538","fields":{"summary":"Parameter to copy empty directory.","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}}],"customfield_10163":"4320000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-91/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":4,"total":4,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/73599/comment/148028","id":"148028","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"fixed in rev 7723.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2008-09-15T16:59:29.165-0500","updated":"2008-09-15T16:59:29.165-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/73599/comment/148070","id":"148070","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"body":"PLXUTILS-26 is about the same feature, its patch might serve as another inspiration.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=bentmann","name":"bentmann","emailAddress":"benjamin.bentmann@udo.edu","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Benjamin Bentmann","active":true},"created":"2008-09-16T03:44:01.363-0500","updated":"2008-09-16T03:44:01.363-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/73599/comment/148072","id":"148072","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"body":"need more jobs :-)\r\nlook at InvokerMojo copyDirectoryStructure.\r\nFor my use case (in the resources plugin I need only the structure not the content files), I need a new parameter (something like includeFiles)","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=olamy","name":"olamy","emailAddress":"olamy@apache.org","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Olivier Lamy","active":true},"created":"2008-09-16T05:14:46.416-0500","updated":"2008-09-16T05:19:54.849-0500"},{"self":"http://jira.codehaus.org/rest/api/2/issue/73599/comment/357826","id":"357826","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"body":"Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.\r\n\r\nAssignee, if you think you can fix this bug anytime soon, please reopen and proceed appropriately.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=michael-o","name":"michael-o","emailAddress":"1983-01-06@gmx.net","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Michael Osipov","active":true},"created":"2014-11-25T15:38:07.451-0600","updated":"2014-11-25T15:38:07.451-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-92.json b/jira/PLXUTILS-92.json new file mode 100644 index 00000000..2105539a --- /dev/null +++ b/jira/PLXUTILS-92.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"74186","self":"http://jira.codehaus.org/rest/api/latest/issue/74186","key":"PLXUTILS-92","fields":{"progress":{"progress":0,"total":0},"summary":"Ability to change the line separator in PrettyPrintXMLWriter","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-92/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2008-09-26T06:07:15.076-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["siveton(siveton)"],"customfield_10160":null,"updated":"2008-09-26T06:07:15.072-0500","created":"2008-09-26T06:04:04.153-0500","description":"Actually, PrettyPrintXMLWriter uses the System property \"line.separator\" to write EOL. It should be a good addon if we could specify another one.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"198892800","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-92/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/74186/comment/149066","id":"149066","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"fixed in r7755","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2008-09-26T06:07:15.069-0500","updated":"2008-09-26T06:07:15.069-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-93.json b/jira/PLXUTILS-93.json new file mode 100644 index 00000000..83de36e6 --- /dev/null +++ b/jira/PLXUTILS-93.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"74293","self":"http://jira.codehaus.org/rest/api/latest/issue/74293","key":"PLXUTILS-93","fields":{"progress":{"progress":0,"total":0},"summary":"Plexus-util's FileUtil does not delete the temp files","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-93/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/2","id":"2","description":"The problem described is an issue which will never be fixed.","name":"Won't Fix"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2008-12-27T07:20:58.991-0600","customfield_10210":"1.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=paranoiabla","name":"paranoiabla","emailAddress":"paranoiabla@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Petar Tahchiev","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["paranoiabla(paranoiabla)","siveton(siveton)"],"customfield_10160":null,"updated":"2008-12-27T07:20:58.983-0600","created":"2008-09-29T10:00:28.693-0500","description":"There is an issue regarding the Maven-assembly plugin that the plugin creates a log of temp files in the user home directory without deleting them ever (MASSEMBLY-259). The Maven-assembly-plugin uses Plexus's file-utils class to create the temp directory. I have created a patch that simply tells that the created temp file should be deleted onexit.\n\n ","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"20700","self":"http://jira.codehaus.org/rest/api/2/issueLink/20700","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"61112","key":"MASSEMBLY-259","self":"http://jira.codehaus.org/rest/api/2/issue/61112","fields":{"summary":"Delete archived-file-set folders in home","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/4","id":"4","description":"An improvement or enhancement to an existing feature or task.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/improvement.png","name":"Improvement","subtask":false}}}}],"customfield_10163":"190944000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-93/watchers","watchCount":1,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[{"self":"http://jira.codehaus.org/rest/api/2/attachment/37261","id":"37261","filename":"plexus-utils.txt","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=paranoiabla","name":"paranoiabla","emailAddress":"paranoiabla@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Petar Tahchiev","active":true},"created":"2008-09-29T10:00:28.700-0500","size":513,"mimeType":"text/plain","content":"http://jira.codehaus.org/secure/attachment/37261/plexus-utils.txt"}],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"customfield_10170":[{"self":"http://jira.codehaus.org/rest/api/2/customFieldOption/10070","value":"Yes","id":"10070"}],"environment":"all","timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/74293/comment/159272","id":"159272","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"createTempFile() is a part of temp file facility, so the assembly-plugin needs to call deleteOnExit(). \r\nI updated the javadoc.","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2008-12-27T07:20:58.968-0600","updated":"2008-12-27T07:20:58.968-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-94.json b/jira/PLXUTILS-94.json new file mode 100644 index 00000000..54bee20b --- /dev/null +++ b/jira/PLXUTILS-94.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"75432","self":"http://jira.codehaus.org/rest/api/latest/issue/75432","key":"PLXUTILS-94","fields":{"progress":{"progress":0,"total":0},"summary":"XML Pull parser doesn't handle XmlPullParser.PROCESSING_INSTRUCTION event","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-94/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2008-10-22T07:48:51.694-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["siveton(siveton)"],"customfield_10160":null,"updated":"2008-10-22T07:48:51.690-0500","created":"2008-10-22T07:43:57.504-0500","description":"Using the following xml\n\n{code:xml} \n\n\n atext\n\n{code} \n\nand the following Java code\n\n{code:borderStyle=solid}\n XmlPullParser parser = new MXParser();\n parser.setInput( reader );\n\n int eventType = parser.getEventType();\n while ( eventType != XmlPullParser.END_DOCUMENT )\n {\n if ( eventType == XmlPullParser.PROCESSING_INSTRUCTION )\n {\n System.err.println( \"process instruction:\" + parser.getText() );\n }\n\n eventType = parser.nextToken();\n }\n{code} \n\nThe XmlPullParser.PROCESSING_INSTRUCTION is never call.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"196646400","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-94/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/75432/comment/151567","id":"151567","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"Fixed in [r7796|http://fisheye.codehaus.org/changelog/plexus/?cs=7796], snapshot deployed","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2008-10-22T07:48:51.685-0500","updated":"2008-10-22T07:48:51.685-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-95.json b/jira/PLXUTILS-95.json new file mode 100644 index 00000000..edef18ad --- /dev/null +++ b/jira/PLXUTILS-95.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"75862","self":"http://jira.codehaus.org/rest/api/latest/issue/75862","key":"PLXUTILS-95","fields":{"progress":{"progress":0,"total":0},"summary":"Add StringUtils#removeDuplicateWhitespace()","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-95/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2008-10-29T17:35:56.708-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["siveton(siveton)"],"customfield_10160":null,"updated":"2008-10-29T17:35:56.704-0500","created":"2008-10-29T17:34:22.379-0500","description":"Add a new method which removes duplicate whitespace, i.e.:\n\n{noformat}\nthis is test \n{noformat}\n\nshould become\n{noformat}\nthis is test \n{noformat}\n","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"195955200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-95/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/75862/comment/152361","id":"152361","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"fixed in [r7801|http://fisheye.codehaus.org/changelog/plexus/?cs=7801]","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2008-10-29T17:35:56.701-0500","updated":"2008-10-29T17:35:56.701-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-96.json b/jira/PLXUTILS-96.json new file mode 100644 index 00000000..1aaf5aac --- /dev/null +++ b/jira/PLXUTILS-96.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"75864","self":"http://jira.codehaus.org/rest/api/latest/issue/75864","key":"PLXUTILS-96","fields":{"progress":{"progress":0,"total":0},"summary":"Add an XmlUtil class","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-96/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2008-10-29T17:38:39.999-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["siveton(siveton)"],"customfield_10160":null,"updated":"2008-10-29T17:38:39.995-0500","created":"2008-10-29T17:38:08.881-0500","description":"WIth an isXml(File) method which checks if a file is an xml one or note","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"195955200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-96/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/75864/comment/152362","id":"152362","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"fixed in [r7800|http://fisheye.codehaus.org/changelog/plexus/?cs=7800]","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2008-10-29T17:38:39.992-0500","updated":"2008-10-29T17:38:39.992-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-97.json b/jira/PLXUTILS-97.json new file mode 100644 index 00000000..1d7059bb --- /dev/null +++ b/jira/PLXUTILS-97.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"75865","self":"http://jira.codehaus.org/rest/api/latest/issue/75865","key":"PLXUTILS-97","fields":{"progress":{"progress":0,"total":0},"summary":"Add new prettyFormat( Reader reader, Writer writer ) in XmlUtil","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/2","id":"2","description":"A new feature of the product, which has yet to be developed.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/newfeature.png","name":"New Feature","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-97/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2008-10-29T18:19:13.005-0500","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["siveton(siveton)"],"customfield_10160":null,"updated":"2008-10-29T18:19:36.884-0500","created":"2008-10-29T18:17:42.163-0500","description":"Add a new method which pretty format an xml input.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"195955200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-97/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/75865/comment/152369","id":"152369","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"fixed in [r7802|http://fisheye.codehaus.org/changelog/plexus/?cs=7802]","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2008-10-29T18:19:12.993-0500","updated":"2008-10-29T18:19:12.993-0500"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-98.json b/jira/PLXUTILS-98.json new file mode 100644 index 00000000..551f0ae0 --- /dev/null +++ b/jira/PLXUTILS-98.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"79056","self":"http://jira.codehaus.org/rest/api/latest/issue/79056","key":"PLXUTILS-98","fields":{"progress":{"progress":0,"total":0},"summary":"EOL is not handled consistently in PrettyPrintXMLWriter","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-98/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2009-01-03T06:43:14.247-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=hboutemy","name":"hboutemy","emailAddress":"herve.boutemy@free.fr","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10218","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10218","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10218","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10218"},"displayName":"Herve Boutemy","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["hboutemy(hboutemy)","siveton(siveton)"],"customfield_10160":null,"updated":"2009-01-03T06:43:14.237-0600","created":"2008-12-26T08:04:42.941-0600","description":"PrettyPrintXMLWriter uses System EOL [1] for generated XML content.\nWe need to be sure that writeText( text ) uses the same EOL inside text written in XML.\n\n[1] http://plexus.codehaus.org/plexus-utils/xref/org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.html#34","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[{"id":"21650","self":"http://jira.codehaus.org/rest/api/2/issueLink/21650","type":{"id":"10001","name":"dependent","inward":"is depended upon by","outward":"depends upon","self":"http://jira.codehaus.org/rest/api/2/issueLinkType/10001"},"inwardIssue":{"id":"78432","key":"MODELLO-142","self":"http://jira.codehaus.org/rest/api/2/issue/78432","fields":{"summary":"EOL is not handled correctly in the XMLWriter","status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false}}}}],"customfield_10163":"190339200","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-98/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14438","id":"14438","description":"","name":"1.5.6","archived":false,"released":true,"releaseDate":"2008-08-01"}],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/79056/comment/159794","id":"159794","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"Fixed in [r7998|http://fisheye.codehaus.org/changelog/plexus/?cs=7998]","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2009-01-03T06:43:14.234-0600","updated":"2009-01-03T06:43:14.234-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/jira/PLXUTILS-99.json b/jira/PLXUTILS-99.json new file mode 100644 index 00000000..393ae43c --- /dev/null +++ b/jira/PLXUTILS-99.json @@ -0,0 +1 @@ +{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"79082","self":"http://jira.codehaus.org/rest/api/latest/issue/79082","key":"PLXUTILS-99","fields":{"progress":{"progress":0,"total":0},"summary":"FileUtils#createTempFile() could generate same File twice","timetracking":{},"issuetype":{"self":"http://jira.codehaus.org/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"http://jira.codehaus.org/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"customfield_10110":null,"votes":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-99/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://jira.codehaus.org/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[{"self":"http://jira.codehaus.org/rest/api/2/version/14496","id":"14496","description":"","name":"1.5.7","archived":false,"released":true,"releaseDate":"2009-01-16"}],"resolutiondate":"2008-12-27T07:58:49.094-0600","customfield_10210":"0.0","timespent":null,"reporter":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"aggregatetimeoriginalestimate":null,"customfield_10161":["siveton(siveton)"],"customfield_10160":null,"updated":"2008-12-27T07:58:49.090-0600","created":"2008-12-27T07:56:44.884-0600","description":"FileUtils#createTempFile() uses a Random based on the actual system time to generate the file. This method could generate same file twice.","priority":{"self":"http://jira.codehaus.org/rest/api/2/priority/3","iconUrl":"http://jira.codehaus.org/images/icons/priorities/major.png","name":"Major","id":"3"},"duedate":null,"issuelinks":[],"customfield_10163":"190944000","watches":{"self":"http://jira.codehaus.org/rest/api/2/issue/PLXUTILS-99/watchers","watchCount":0,"isWatching":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"subtasks":[],"status":{"self":"http://jira.codehaus.org/rest/api/2/status/6","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"http://jira.codehaus.org/images/icons/statuses/closed.png","name":"Closed","id":"6"},"customfield_10090":null,"labels":[],"workratio":-1,"assignee":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"attachment":[],"customfield_10221":null,"customfield_10220":null,"customfield_10200":null,"aggregatetimeestimate":null,"customfield_10190":null,"project":{"self":"http://jira.codehaus.org/rest/api/2/project/11432","id":"11432","key":"PLXUTILS","name":"Plexus Utils","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/projectavatar?size=xsmall&pid=11432&avatarId=10011","24x24":"http://jira.codehaus.org/secure/projectavatar?size=small&pid=11432&avatarId=10011","32x32":"http://jira.codehaus.org/secure/projectavatar?size=medium&pid=11432&avatarId=10011","48x48":"http://jira.codehaus.org/secure/projectavatar?pid=11432&avatarId=10011"},"projectCategory":{"self":"http://jira.codehaus.org/rest/api/2/projectCategory/10003","id":"10003","description":"various containers","name":"containers"}},"versions":[],"customfield_10170":null,"environment":null,"timeestimate":null,"customfield_10130":null,"aggregateprogress":{"progress":0,"total":0},"lastViewed":null,"components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://jira.codehaus.org/rest/api/2/issue/79082/comment/159273","id":"159273","author":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"body":"Fixed in r7972","updateAuthor":{"self":"http://jira.codehaus.org/rest/api/2/user?username=siveton","name":"siveton","emailAddress":"vincent.siveton@gmail.com","avatarUrls":{"16x16":"http://jira.codehaus.org/secure/useravatar?size=xsmall&avatarId=10232","24x24":"http://jira.codehaus.org/secure/useravatar?size=small&avatarId=10232","32x32":"http://jira.codehaus.org/secure/useravatar?size=medium&avatarId=10232","48x48":"http://jira.codehaus.org/secure/useravatar?avatarId=10232"},"displayName":"Vincent Siveton","active":true},"created":"2008-12-27T07:58:49.087-0600","updated":"2008-12-27T07:58:49.087-0600"}]},"timeoriginalestimate":null,"aggregatetimespent":null}} \ No newline at end of file diff --git a/pom.xml b/pom.xml index d9206e26..164b7b15 100644 --- a/pom.xml +++ b/pom.xml @@ -22,32 +22,62 @@ limitations under the License. org.codehaus.plexus plexus - 2.0.2 - ../pom/pom.xml + 8 plexus-utils - 1.5.8-SNAPSHOT + 3.4.1 Plexus Common Utilities - A collection of various utility classes to ease working with strings, files, command lines, XML and more. - http://plexus.codehaus.org/plexus-utils + A collection of various utility classes to ease working with strings, files, command lines, XML and + more. + - scm:svn:http://svn.codehaus.org/plexus/plexus-utils/trunk/ - scm:svn:https://svn.codehaus.org/plexus/plexus-utils/trunk - http://fisheye.codehaus.org/browse/plexus/plexus-utils/trunk/ + scm:git:git@github.com:codehaus-plexus/plexus-utils.git + scm:git:git@github.com:codehaus-plexus/plexus-utils.git + http://github.com/codehaus-plexus/plexus-utils + plexus-utils-3.4.1 - JIRA - http://jira.codehaus.org/browse/PLXUTILS + github + http://github.com/codehaus-plexus/plexus-utils/issues + + + github:gh-pages + ${project.scm.developerConnection} + + + + + 2021-08-27T00:06:38Z + - org.codehaus.plexus - plexus-interpolation - 1.3 + org.apache.maven.shared + maven-plugin-testing-harness + 1.1 + test + + + org.openjdk.jmh + jmh-core + 1.33 + test + + + org.openjdk.jmh + jmh-generator-annprocess + 1.33 + test + + + junit + junit + 4.13.2 + test @@ -56,25 +86,47 @@ limitations under the License. org.apache.maven.plugins - maven-shade-plugin - 1.0.1 - - - org.apache.maven.plugins - maven-release-plugin - 2.0-beta-7 + maven-resources-plugin + + 2.7 - org.apache.maven.plugins maven-compiler-plugin + + + default-compile + + compile + + + 1.8 + 1.8 + + + + + + org.apache.maven.plugins + maven-scm-publish-plugin - - 1.3 - 1.3 + ${project.reporting.outputDirectory} + + + scm-publish + site-deploy + + publish-scm + + + org.apache.maven.plugins @@ -99,37 +151,13 @@ limitations under the License. - org.apache.maven.plugins - maven-shade-plugin - - - shade - - shade - - - - - org.codehaus.plexus:plexus-interpolation - - - - - org.codehaus.plexus.interpolation - - - true - - - - - - org.apache.maven.plugins - maven-release-plugin + maven-jar-plugin - true - https://svn.codehaus.org/plexus/plexus-utils/tags/ - -Prelease + + + true + + @@ -137,30 +165,84 @@ limitations under the License. - release + jdk9+ + + [9,) + + + + + + maven-compiler-plugin + + + compile-java-9 + + compile + + + 9 + + ${project.basedir}/src/main/java9 + + true + + + + + + + + + + jdk10+ + + [10,) + + + + + + maven-compiler-plugin + + + compile-java-10 + + compile + + + 10 + + ${project.basedir}/src/main/java10 + + true + + + + + + + + + + plexus-release - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar - - - - - - org.apache.maven.plugins - maven-javadoc-plugin + maven-enforcer-plugin - attach-javadocs + enforce-java - jar + enforce + + + + 11 + + + @@ -168,20 +250,4 @@ limitations under the License. - - - - - maven-javadoc-plugin - - - http://java.sun.com/j2se/1.4.2/docs/api/ - - - - - maven-jxr-plugin - - -
diff --git a/src/main/java/org/codehaus/plexus/util/AbstractScanner.java b/src/main/java/org/codehaus/plexus/util/AbstractScanner.java index 154ce196..af3fbc4a 100644 --- a/src/main/java/org/codehaus/plexus/util/AbstractScanner.java +++ b/src/main/java/org/codehaus/plexus/util/AbstractScanner.java @@ -16,262 +16,220 @@ * limitations under the License. */ - import java.io.File; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; -public abstract class AbstractScanner - implements Scanner +/** + * Scan a directory tree for files, with specified inclusions and exclusions. + */ +public abstract class AbstractScanner + implements Scanner { /** * Patterns which should be excluded by default, like SCM files *
    - *
  • Misc: **/*~, **/#*#, **/.#*, **/%*%, **/._*
  • + *
  • Misc: **/*~, **/#*#, **/.#*, **/%*%, **/._*
  • *
  • CVS: **/CVS, **/CVS/**, **/.cvsignore
  • *
  • RCS: **/RCS, **/RCS/**
  • *
  • SCCS: **/SCCS, **/SCCS/**
  • *
  • VSSercer: **/vssver.scc
  • + *
  • MKS: **/project.pj
  • *
  • SVN: **/.svn, **/.svn/**
  • *
  • GNU: **/.arch-ids, **/.arch-ids/**
  • *
  • Bazaar: **/.bzr, **/.bzr/**
  • *
  • SurroundSCM: **/.MySCMServerInfo
  • *
  • Mac: **/.DS_Store
  • *
  • Serena Dimension: **/.metadata, **/.metadata/**
  • - *
  • Mercurial: **/.hg, **/.hg/**
  • - *
  • GIT: **/.git, **/.git/**
  • - *
  • Bitkeeper: **/BitKeeper, **/BitKeeper/**, **/ChangeSet, **/ChangeSet/**
  • - *
  • Darcs: **/_darcs, **/_darcs/**, **/.darcsrepo, **/.darcsrepo/****/-darcs-backup*, **/.darcs-temp-mail + *
  • Mercurial: **/.hg, **/.hg/**, **/.hgignore
  • + *
  • GIT: **/.git, **/.gitignore, **/.gitattributes, **/.git/**
  • + *
  • Bitkeeper: **/BitKeeper, **/BitKeeper/**, **/ChangeSet, + * **/ChangeSet/**
  • + *
  • Darcs: **/_darcs, **/_darcs/**, **/.darcsrepo, + * **/.darcsrepo/****/-darcs-backup*, **/.darcs-temp-mail *
* * @see #addDefaultExcludes() */ public static final String[] DEFAULTEXCLUDES = { // Miscellaneous typical temporary files - "**/*~", - "**/#*#", - "**/.#*", - "**/%*%", - "**/._*", - + "**/*~", "**/#*#", "**/.#*", "**/%*%", "**/._*", + // CVS - "**/CVS", - "**/CVS/**", - "**/.cvsignore", - + "**/CVS", "**/CVS/**", "**/.cvsignore", + // RCS - "**/RCS", - "**/RCS/**", - + "**/RCS", "**/RCS/**", + // SCCS - "**/SCCS", - "**/SCCS/**", - + "**/SCCS", "**/SCCS/**", + // Visual SourceSafe "**/vssver.scc", - + + // MKS + "**/project.pj", + // Subversion - "**/.svn", - "**/.svn/**", - + "**/.svn", "**/.svn/**", + // Arch - "**/.arch-ids", - "**/.arch-ids/**", - - //Bazaar - "**/.bzr", - "**/.bzr/**", - - //SurroundSCM + "**/.arch-ids", "**/.arch-ids/**", + + // Bazaar + "**/.bzr", "**/.bzr/**", + + // SurroundSCM "**/.MySCMServerInfo", - + // Mac "**/.DS_Store", - + // Serena Dimensions Version 10 - "**/.metadata", - "**/.metadata/**", - + "**/.metadata", "**/.metadata/**", + // Mercurial - "**/.hg", - "**/.hg/**", - + "**/.hg", "**/.hgignore", "**/.hg/**", + // git - "**/.git", - "**/.git/**", - + "**/.git", "**/.gitignore", "**/.gitattributes", "**/.git/**", + // BitKeeper - "**/BitKeeper", - "**/BitKeeper/**", - "**/ChangeSet", - "**/ChangeSet/**", - + "**/BitKeeper", "**/BitKeeper/**", "**/ChangeSet", "**/ChangeSet/**", + // darcs - "**/_darcs", - "**/_darcs/**", - "**/.darcsrepo", - "**/.darcsrepo/**", - "**/-darcs-backup*", - "**/.darcs-temp-mail" - }; - - /** The patterns for the files to be included. */ + "**/_darcs", "**/_darcs/**", "**/.darcsrepo", "**/.darcsrepo/**", "**/-darcs-backup*", "**/.darcs-temp-mail" }; + + /** + * The patterns for the files to be included. + */ protected String[] includes; - - /** The patterns for the files to be excluded. */ + + private MatchPatterns includesPatterns; + + /** + * The patterns for the files to be excluded. + */ protected String[] excludes; - + + private MatchPatterns excludesPatterns; + /** - * Whether or not the file system should be treated as a case sensitive - * one. + * Whether or not the file system should be treated as a case sensitive one. */ protected boolean isCaseSensitive = true; - + + /** + * @since 3.3.0 + */ + protected Comparator filenameComparator; + /** * Sets whether or not the file system should be regarded as case sensitive. * - * @param isCaseSensitive whether or not the file system should be - * regarded as a case sensitive one + * @param isCaseSensitive whether or not the file system should be regarded as a case sensitive one */ public void setCaseSensitive( boolean isCaseSensitive ) { this.isCaseSensitive = isCaseSensitive; } - + /** - * Tests whether or not a given path matches the start of a given - * pattern up to the first "**". - *

- * This is not a general purpose test and should only be used if you - * can live with false positives. For example, pattern=**\a - * and str=b will yield true. + *

Tests whether or not a given path matches the start of a given pattern up to the first "**".

+ * + *

This is not a general purpose test and should only be used if you can live with false positives. For example, + * pattern=**\a and str=b will yield true.

* - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * - * @return whether or not a given path matches the start of a given - * pattern up to the first "**". + * @param pattern The pattern to match against. Must not be null. + * @param str The path to match, as a String. Must not be null. + * @return whether or not a given path matches the start of a given pattern up to the first "**". */ protected static boolean matchPatternStart( String pattern, String str ) { return SelectorUtils.matchPatternStart( pattern, str ); } - + /** - * Tests whether or not a given path matches the start of a given - * pattern up to the first "**". - *

- * This is not a general purpose test and should only be used if you - * can live with false positives. For example, pattern=**\a - * and str=b will yield true. - * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * @param isCaseSensitive Whether or not matching should be performed - * case sensitively. + *

Tests whether or not a given path matches the start of a given pattern up to the first "**".

+ * + *

This is not a general purpose test and should only be used if you can live with false positives. For example, + * pattern=**\a and str=b will yield true.

* - * @return whether or not a given path matches the start of a given - * pattern up to the first "**". + * @param pattern The pattern to match against. Must not be null. + * @param str The path to match, as a String. Must not be null. + * @param isCaseSensitive Whether or not matching should be performed case sensitively. + * @return whether or not a given path matches the start of a given pattern up to the first "**". */ - protected static boolean matchPatternStart( String pattern, String str, - boolean isCaseSensitive ) + protected static boolean matchPatternStart( String pattern, String str, boolean isCaseSensitive ) { return SelectorUtils.matchPatternStart( pattern, str, isCaseSensitive ); } - + /** * Tests whether or not a given path matches a given pattern. * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * - * @return true if the pattern matches against the string, - * or false otherwise. + * @param pattern The pattern to match against. Must not be null. + * @param str The path to match, as a String. Must not be null. + * @return true if the pattern matches against the string, or false otherwise. */ protected static boolean matchPath( String pattern, String str ) { return SelectorUtils.matchPath( pattern, str ); } - + /** * Tests whether or not a given path matches a given pattern. * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * @param isCaseSensitive Whether or not matching should be performed - * case sensitively. - * - * @return true if the pattern matches against the string, - * or false otherwise. + * @param pattern The pattern to match against. Must not be null. + * @param str The path to match, as a String. Must not be null. + * @param isCaseSensitive Whether or not matching should be performed case sensitively. + * @return true if the pattern matches against the string, or false otherwise. */ - protected static boolean matchPath( String pattern, String str, - boolean isCaseSensitive ) + protected static boolean matchPath( String pattern, String str, boolean isCaseSensitive ) { return SelectorUtils.matchPath( pattern, str, isCaseSensitive ); } - + /** - * Tests whether or not a string matches against a pattern. - * The pattern may contain two special characters:
+ * Tests whether or not a string matches against a pattern. The pattern may contain two special characters:
* '*' means zero or more characters
* '?' means one and only one character * - * @param pattern The pattern to match against. - * Must not be null. - * @param str The string which must be matched against the pattern. - * Must not be null. - * - * @return true if the string matches against the pattern, - * or false otherwise. + * @param pattern The pattern to match against. Must not be null. + * @param str The string which must be matched against the pattern. Must not be null. + * @return true if the string matches against the pattern, or false otherwise. */ public static boolean match( String pattern, String str ) { return SelectorUtils.match( pattern, str ); } - + /** - * Tests whether or not a string matches against a pattern. - * The pattern may contain two special characters:
+ * Tests whether or not a string matches against a pattern. The pattern may contain two special characters:
* '*' means zero or more characters
* '?' means one and only one character * - * @param pattern The pattern to match against. - * Must not be null. - * @param str The string which must be matched against the pattern. - * Must not be null. - * @param isCaseSensitive Whether or not matching should be performed - * case sensitively. - * - * - * @return true if the string matches against the pattern, - * or false otherwise. + * @param pattern The pattern to match against. Must not be null. + * @param str The string which must be matched against the pattern. Must not be null. + * @param isCaseSensitive Whether or not matching should be performed case sensitively. + * @return true if the string matches against the pattern, or false otherwise. */ - protected static boolean match( String pattern, String str, - boolean isCaseSensitive ) + protected static boolean match( String pattern, String str, boolean isCaseSensitive ) { return SelectorUtils.match( pattern, str, isCaseSensitive ); } - - + /** - * Sets the list of include patterns to use. All '/' and '\' characters - * are replaced by File.separatorChar, so the separator used - * need not match File.separatorChar. - *

- * When a pattern ends with a '/' or '\', "**" is appended. + *

Sets the list of include patterns to use. All '/' and '\' characters are replaced by + * File.separatorChar, so the separator used need not match File.separatorChar.

+ * + *

When a pattern ends with a '/' or '\', "**" is appended.

* - * @param includes A list of include patterns. - * May be null, indicating that all files - * should be included. If a non-null - * list is given, all elements must be - * non-null. + * @param includes A list of include patterns. May be null, indicating that all files should be + * included. If a non-null list is given, all elements must be non-null. */ + @Override public void setIncludes( String[] includes ) { if ( includes == null ) @@ -280,33 +238,28 @@ public void setIncludes( String[] includes ) } else { - this.includes = new String[includes.length]; - for ( int i = 0; i < includes.length; i++ ) + final List list = new ArrayList( includes.length ); + for ( String include : includes ) { - String pattern; - pattern = includes[i].trim().replace( '/', File.separatorChar ).replace( - '\\', File.separatorChar ); - if ( pattern.endsWith( File.separator ) ) + if ( include != null ) { - pattern += "**"; + list.add( normalizePattern( include ) ); } - this.includes[i] = pattern; } + this.includes = list.toArray( new String[0] ); } } - + /** - * Sets the list of exclude patterns to use. All '/' and '\' characters - * are replaced by File.separatorChar, so the separator used - * need not match File.separatorChar. - *

- * When a pattern ends with a '/' or '\', "**" is appended. + *

Sets the list of exclude patterns to use. All '/' and '\' characters are replaced by + * File.separatorChar, so the separator used need not match File.separatorChar.

+ * + *

When a pattern ends with a '/' or '\', "**" is appended.

* - * @param excludes A list of exclude patterns. - * May be null, indicating that no files - * should be excluded. If a non-null list is - * given, all elements must be non-null. + * @param excludes A list of exclude patterns. May be null, indicating that no files should be + * excluded. If a non-null list is given, all elements must be non-null. */ + @Override public void setExcludes( String[] excludes ) { if ( excludes == null ) @@ -315,85 +268,112 @@ public void setExcludes( String[] excludes ) } else { - this.excludes = new String[excludes.length]; - for ( int i = 0; i < excludes.length; i++ ) + final List list = new ArrayList( excludes.length ); + for ( String exclude : excludes ) { - String pattern; - pattern = excludes[i].trim().replace( '/', File.separatorChar ).replace( - '\\', File.separatorChar ); - if ( pattern.endsWith( File.separator ) ) + if ( exclude != null ) { - pattern += "**"; + list.add( normalizePattern( exclude ) ); } - this.excludes[i] = pattern; } + this.excludes = list.toArray( new String[0] ); } } - - + /** - * Tests whether or not a name matches against at least one include - * pattern. + * Normalizes the pattern, e.g. converts forward and backward slashes to the platform-specific file separator. * - * @param name The name to match. Must not be null. - * @return true when the name matches against at least one - * include pattern, or false otherwise. + * @param pattern The pattern to normalize, must not be null. + * @return The normalized pattern, never null. */ - protected boolean isIncluded( String name ) + private String normalizePattern( String pattern ) { - for ( int i = 0; i < includes.length; i++ ) + pattern = pattern.trim(); + + if ( pattern.startsWith( SelectorUtils.REGEX_HANDLER_PREFIX ) ) { - if ( matchPath( includes[i], name, isCaseSensitive ) ) + if ( File.separatorChar == '\\' ) { - return true; + pattern = StringUtils.replace( pattern, "/", "\\\\" ); + } + else + { + pattern = StringUtils.replace( pattern, "\\\\", "/" ); + } + } + else + { + pattern = pattern.replace( File.separatorChar == '/' ? '\\' : '/', File.separatorChar ); + + if ( pattern.endsWith( File.separator ) ) + { + pattern += "**"; } } - return false; + + return pattern; + } + + /** + * Tests whether or not a name matches against at least one include pattern. + * + * @param name The name to match. Must not be null. + * @return true when the name matches against at least one include pattern, or false + * otherwise. + */ + protected boolean isIncluded( String name ) + { + return includesPatterns.matches( name, isCaseSensitive ); + } + + protected boolean isIncluded( String name, String[] tokenizedName ) + { + return includesPatterns.matches( name, tokenizedName, isCaseSensitive ); + } + + protected boolean isIncluded( String name, char[][] tokenizedName ) + { + return includesPatterns.matches( name, tokenizedName, isCaseSensitive ); } - + /** - * Tests whether or not a name matches the start of at least one include - * pattern. + * Tests whether or not a name matches the start of at least one include pattern. * * @param name The name to match. Must not be null. - * @return true when the name matches against the start of at - * least one include pattern, or false otherwise. + * @return true when the name matches against the start of at least one include pattern, or + * false otherwise. */ protected boolean couldHoldIncluded( String name ) { - for ( int i = 0; i < includes.length; i++ ) - { - if ( matchPatternStart( includes[i], name, isCaseSensitive ) ) - { - return true; - } - } - return false; + return includesPatterns.matchesPatternStart( name, isCaseSensitive ); } - + /** - * Tests whether or not a name matches against at least one exclude - * pattern. + * Tests whether or not a name matches against at least one exclude pattern. * * @param name The name to match. Must not be null. - * @return true when the name matches against at least one - * exclude pattern, or false otherwise. + * @return true when the name matches against at least one exclude pattern, or false + * otherwise. */ protected boolean isExcluded( String name ) { - for ( int i = 0; i < excludes.length; i++ ) - { - if ( matchPath( excludes[i], name, isCaseSensitive ) ) - { - return true; - } - } - return false; + return excludesPatterns.matches( name, isCaseSensitive ); + } + + protected boolean isExcluded( String name, String[] tokenizedName ) + { + return excludesPatterns.matches( name, tokenizedName, isCaseSensitive ); } - + + protected boolean isExcluded( String name, char[][] tokenizedName ) + { + return excludesPatterns.matches( name, tokenizedName, isCaseSensitive ); + } + /** * Adds default exclusions to the current exclusions set. */ + @Override public void addDefaultExcludes() { int excludesLength = excludes == null ? 0 : excludes.length; @@ -405,13 +385,12 @@ public void addDefaultExcludes() } for ( int i = 0; i < DEFAULTEXCLUDES.length; i++ ) { - newExcludes[i + excludesLength] = DEFAULTEXCLUDES[i].replace( '/', - File.separatorChar ).replace( '\\', File.separatorChar ); + newExcludes[i + excludesLength] = DEFAULTEXCLUDES[i].replace( '/', File.separatorChar ); } excludes = newExcludes; } - - protected void setupDefaultFilters() + + protected void setupDefaultFilters() { if ( includes == null ) { @@ -424,4 +403,16 @@ protected void setupDefaultFilters() excludes = new String[0]; } } + + protected void setupMatchPatterns() + { + includesPatterns = MatchPatterns.from( includes ); + excludesPatterns = MatchPatterns.from( excludes ); + } + + @Override + public void setFilenameComparator( Comparator filenameComparator ) + { + this.filenameComparator = filenameComparator; + } } diff --git a/src/main/java/org/codehaus/plexus/util/Base64.java b/src/main/java/org/codehaus/plexus/util/Base64.java index b5391d9b..120feb8f 100644 --- a/src/main/java/org/codehaus/plexus/util/Base64.java +++ b/src/main/java/org/codehaus/plexus/util/Base64.java @@ -18,27 +18,29 @@ /** * Provides Base64 encoding and decoding as defined by RFC 2045. - * - *

This class implements section 6.8. Base64 Content-Transfer-Encoding - * from RFC 2045 Multipurpose Internet Mail Extensions (MIME) Part One: - * Format of Internet Message Bodies by Freed and Borenstein.

+ *

+ * This class implements section 6.8. Base64 Content-Transfer-Encoding from RFC 2045 Multipurpose + * Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies by Freed and Borenstein. + *

* * @see RFC 2045 * @author Apache Software Foundation * @since 1.0-dev - * @version $Id$ + * */ -public class Base64 { +public class Base64 +{ - // - // Source Id: Base64.java 161350 2005-04-14 20:39:46Z ggregory - // + // + // Source Id: Base64.java 161350 2005-04-14 20:39:46Z ggregory + // /** * Chunk size per RFC 2045 section 6.8. - * - *

The {@value} character limit does not count the trailing CRLF, but counts - * all other characters, including any equal signs.

+ *

+ * The {@value} character limit does not count the trailing CRLF, but counts all other characters, including any + * equal signs. + *

* * @see RFC 2045 section 6.8 */ @@ -119,33 +121,41 @@ public class Base64 { private static byte[] lookUpBase64Alphabet = new byte[LOOKUPLENGTH]; // Populating the lookup and character arrays - static { - for (int i = 0; i < BASELENGTH; i++) { + static + { + for ( int i = 0; i < BASELENGTH; i++ ) + { base64Alphabet[i] = (byte) -1; } - for (int i = 'Z'; i >= 'A'; i--) { - base64Alphabet[i] = (byte) (i - 'A'); + for ( int i = 'Z'; i >= 'A'; i-- ) + { + base64Alphabet[i] = (byte) ( i - 'A' ); } - for (int i = 'z'; i >= 'a'; i--) { - base64Alphabet[i] = (byte) (i - 'a' + 26); + for ( int i = 'z'; i >= 'a'; i-- ) + { + base64Alphabet[i] = (byte) ( i - 'a' + 26 ); } - for (int i = '9'; i >= '0'; i--) { - base64Alphabet[i] = (byte) (i - '0' + 52); + for ( int i = '9'; i >= '0'; i-- ) + { + base64Alphabet[i] = (byte) ( i - '0' + 52 ); } base64Alphabet['+'] = 62; base64Alphabet['/'] = 63; - for (int i = 0; i <= 25; i++) { - lookUpBase64Alphabet[i] = (byte) ('A' + i); + for ( int i = 0; i <= 25; i++ ) + { + lookUpBase64Alphabet[i] = (byte) ( 'A' + i ); } - for (int i = 26, j = 0; i <= 51; i++, j++) { - lookUpBase64Alphabet[i] = (byte) ('a' + j); + for ( int i = 26, j = 0; i <= 51; i++, j++ ) + { + lookUpBase64Alphabet[i] = (byte) ( 'a' + j ); } - for (int i = 52, j = 0; i <= 61; i++, j++) { - lookUpBase64Alphabet[i] = (byte) ('0' + j); + for ( int i = 52, j = 0; i <= 61; i++, j++ ) + { + lookUpBase64Alphabet[i] = (byte) ( '0' + j ); } lookUpBase64Alphabet[62] = (byte) '+'; @@ -158,36 +168,45 @@ public class Base64 { * @param octect The value to test * @return true if the value is defined in the the base 64 alphabet, false otherwise. */ - private static boolean isBase64(byte octect) { - if (octect == PAD) { + private static boolean isBase64( byte octect ) + { + if ( octect == PAD ) + { return true; - } else if (octect < 0 || base64Alphabet[octect] == -1) { + } + else if ( octect < 0 || base64Alphabet[octect] == -1 ) + { return false; - } else { + } + else + { return true; } } /** - * Tests a given byte array to see if it contains - * only valid characters within the Base64 alphabet. + * Tests a given byte array to see if it contains only valid characters within the Base64 alphabet. * * @param arrayOctect byte array to test - * @return true if all bytes are valid characters in the Base64 - * alphabet or if the byte array is empty; false, otherwise + * @return true if all bytes are valid characters in the Base64 alphabet or if the byte array is empty; + * false, otherwise */ - public static boolean isArrayByteBase64(byte[] arrayOctect) { + public static boolean isArrayByteBase64( byte[] arrayOctect ) + { - arrayOctect = discardWhitespace(arrayOctect); + arrayOctect = discardWhitespace( arrayOctect ); int length = arrayOctect.length; - if (length == 0) { + if ( length == 0 ) + { // shouldn't a 0 length array be valid base64 data? // return false; return true; } - for (int i = 0; i < length; i++) { - if (!isBase64(arrayOctect[i])) { + for ( byte anArrayOctect : arrayOctect ) + { + if ( !isBase64( anArrayOctect ) ) + { return false; } } @@ -195,49 +214,47 @@ public static boolean isArrayByteBase64(byte[] arrayOctect) { } /** - * Encodes binary data using the base64 algorithm but - * does not chunk the output. + * Encodes binary data using the base64 algorithm but does not chunk the output. * * @param binaryData binary data to encode * @return Base64 characters */ - public static byte[] encodeBase64(byte[] binaryData) { - return encodeBase64(binaryData, false); + public static byte[] encodeBase64( byte[] binaryData ) + { + return encodeBase64( binaryData, false ); } /** - * Encodes binary data using the base64 algorithm and chunks - * the encoded output into 76 character blocks + * Encodes binary data using the base64 algorithm and chunks the encoded output into 76 character blocks * * @param binaryData binary data to encode * @return Base64 characters chunked in 76 character blocks */ - public static byte[] encodeBase64Chunked(byte[] binaryData) { - return encodeBase64(binaryData, true); + public static byte[] encodeBase64Chunked( byte[] binaryData ) + { + return encodeBase64( binaryData, true ); } - /** - * Decodes a byte[] containing containing - * characters in the Base64 alphabet. + * Decodes a byte[] containing containing characters in the Base64 alphabet. * * @param pArray A byte array containing Base64 character data * @return a byte array containing binary data */ - public byte[] decode(byte[] pArray) { - return decodeBase64(pArray); + public byte[] decode( byte[] pArray ) + { + return decodeBase64( pArray ); } /** - * Encodes binary data using the base64 algorithm, optionally - * chunking the output into 76 character blocks. + * Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks. * * @param binaryData Array containing binary data to encode. - * @param isChunked if true this encoder will chunk - * the base64 output into 76 character blocks + * @param isChunked if true this encoder will chunk the base64 output into 76 character blocks * @return Base64-encoded data. */ - public static byte[] encodeBase64(byte[] binaryData, boolean isChunked) { + public static byte[] encodeBase64( byte[] binaryData, boolean isChunked ) + { int lengthDataBits = binaryData.length * EIGHTBIT; int fewerThan24bits = lengthDataBits % TWENTYFOURBITGROUP; int numberTriplets = lengthDataBits / TWENTYFOURBITGROUP; @@ -245,10 +262,13 @@ public static byte[] encodeBase64(byte[] binaryData, boolean isChunked) { int encodedDataLength = 0; int nbrChunks = 0; - if (fewerThan24bits != 0) { - //data not divisible by 24 bit - encodedDataLength = (numberTriplets + 1) * 4; - } else { + if ( fewerThan24bits != 0 ) + { + // data not divisible by 24 bit + encodedDataLength = ( numberTriplets + 1 ) * 4; + } + else + { // 16 or 8 bit encodedDataLength = numberTriplets * 4; } @@ -256,10 +276,10 @@ public static byte[] encodeBase64(byte[] binaryData, boolean isChunked) { // If the output is to be "chunked" into 76 character sections, // for compliance with RFC 2045 MIME, then it is important to // allow for extra length to account for the separator(s) - if (isChunked) { + if ( isChunked ) + { - nbrChunks = - (CHUNK_SEPARATOR.length == 0 ? 0 : (int) Math.ceil((float) encodedDataLength / CHUNK_SIZE)); + nbrChunks = ( CHUNK_SEPARATOR.length == 0 ? 0 : (int) Math.ceil( (float) encodedDataLength / CHUNK_SIZE ) ); encodedDataLength += nbrChunks * CHUNK_SEPARATOR.length; } @@ -273,51 +293,43 @@ public static byte[] encodeBase64(byte[] binaryData, boolean isChunked) { int nextSeparatorIndex = CHUNK_SIZE; int chunksSoFar = 0; - //log.debug("number of triplets = " + numberTriplets); - for (i = 0; i < numberTriplets; i++) { + // log.debug("number of triplets = " + numberTriplets); + for ( i = 0; i < numberTriplets; i++ ) + { dataIndex = i * 3; b1 = binaryData[dataIndex]; b2 = binaryData[dataIndex + 1]; b3 = binaryData[dataIndex + 2]; - //log.debug("b1= " + b1 +", b2= " + b2 + ", b3= " + b3); + // log.debug("b1= " + b1 +", b2= " + b2 + ", b3= " + b3); - l = (byte) (b2 & 0x0f); - k = (byte) (b1 & 0x03); + l = (byte) ( b2 & 0x0f ); + k = (byte) ( b1 & 0x03 ); - byte val1 = - ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); - byte val2 = - ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0); - byte val3 = - ((b3 & SIGN) == 0) ? (byte) (b3 >> 6) : (byte) ((b3) >> 6 ^ 0xfc); + byte val1 = ( ( b1 & SIGN ) == 0 ) ? (byte) ( b1 >> 2 ) : (byte) ( ( b1 ) >> 2 ^ 0xc0 ); + byte val2 = ( ( b2 & SIGN ) == 0 ) ? (byte) ( b2 >> 4 ) : (byte) ( ( b2 ) >> 4 ^ 0xf0 ); + byte val3 = ( ( b3 & SIGN ) == 0 ) ? (byte) ( b3 >> 6 ) : (byte) ( ( b3 ) >> 6 ^ 0xfc ); encodedData[encodedIndex] = lookUpBase64Alphabet[val1]; - //log.debug( "val2 = " + val2 ); - //log.debug( "k4 = " + (k<<4) ); - //log.debug( "vak = " + (val2 | (k<<4)) ); - encodedData[encodedIndex + 1] = - lookUpBase64Alphabet[val2 | (k << 4)]; - encodedData[encodedIndex + 2] = - lookUpBase64Alphabet[(l << 2) | val3]; + // log.debug( "val2 = " + val2 ); + // log.debug( "k4 = " + (k<<4) ); + // log.debug( "vak = " + (val2 | (k<<4)) ); + encodedData[encodedIndex + 1] = lookUpBase64Alphabet[val2 | ( k << 4 )]; + encodedData[encodedIndex + 2] = lookUpBase64Alphabet[( l << 2 ) | val3]; encodedData[encodedIndex + 3] = lookUpBase64Alphabet[b3 & 0x3f]; encodedIndex += 4; // If we are chunking, let's put a chunk separator down. - if (isChunked) { + if ( isChunked ) + { // this assumes that CHUNK_SIZE % 4 == 0 - if (encodedIndex == nextSeparatorIndex) { - System.arraycopy( - CHUNK_SEPARATOR, - 0, - encodedData, - encodedIndex, - CHUNK_SEPARATOR.length); + if ( encodedIndex == nextSeparatorIndex ) + { + System.arraycopy( CHUNK_SEPARATOR, 0, encodedData, encodedIndex, CHUNK_SEPARATOR.length ); chunksSoFar++; nextSeparatorIndex = - (CHUNK_SIZE * (chunksSoFar + 1)) + - (chunksSoFar * CHUNK_SEPARATOR.length); + ( CHUNK_SIZE * ( chunksSoFar + 1 ) ) + ( chunksSoFar * CHUNK_SEPARATOR.length ); encodedIndex += CHUNK_SEPARATOR.length; } } @@ -326,45 +338,42 @@ public static byte[] encodeBase64(byte[] binaryData, boolean isChunked) { // form integral number of 6-bit groups dataIndex = i * 3; - if (fewerThan24bits == EIGHTBIT) { + if ( fewerThan24bits == EIGHTBIT ) + { b1 = binaryData[dataIndex]; - k = (byte) (b1 & 0x03); - //log.debug("b1=" + b1); - //log.debug("b1<<2 = " + (b1>>2) ); - byte val1 = - ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); + k = (byte) ( b1 & 0x03 ); + // log.debug("b1=" + b1); + // log.debug("b1<<2 = " + (b1>>2) ); + byte val1 = ( ( b1 & SIGN ) == 0 ) ? (byte) ( b1 >> 2 ) : (byte) ( ( b1 ) >> 2 ^ 0xc0 ); encodedData[encodedIndex] = lookUpBase64Alphabet[val1]; encodedData[encodedIndex + 1] = lookUpBase64Alphabet[k << 4]; encodedData[encodedIndex + 2] = PAD; encodedData[encodedIndex + 3] = PAD; - } else if (fewerThan24bits == SIXTEENBIT) { + } + else if ( fewerThan24bits == SIXTEENBIT ) + { b1 = binaryData[dataIndex]; b2 = binaryData[dataIndex + 1]; - l = (byte) (b2 & 0x0f); - k = (byte) (b1 & 0x03); + l = (byte) ( b2 & 0x0f ); + k = (byte) ( b1 & 0x03 ); - byte val1 = - ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); - byte val2 = - ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0); + byte val1 = ( ( b1 & SIGN ) == 0 ) ? (byte) ( b1 >> 2 ) : (byte) ( ( b1 ) >> 2 ^ 0xc0 ); + byte val2 = ( ( b2 & SIGN ) == 0 ) ? (byte) ( b2 >> 4 ) : (byte) ( ( b2 ) >> 4 ^ 0xf0 ); encodedData[encodedIndex] = lookUpBase64Alphabet[val1]; - encodedData[encodedIndex + 1] = - lookUpBase64Alphabet[val2 | (k << 4)]; + encodedData[encodedIndex + 1] = lookUpBase64Alphabet[val2 | ( k << 4 )]; encodedData[encodedIndex + 2] = lookUpBase64Alphabet[l << 2]; encodedData[encodedIndex + 3] = PAD; } - if (isChunked) { + if ( isChunked ) + { // we also add a separator to the end of the final chunk. - if (chunksSoFar < nbrChunks) { - System.arraycopy( - CHUNK_SEPARATOR, - 0, - encodedData, - encodedDataLength - CHUNK_SEPARATOR.length, - CHUNK_SEPARATOR.length); + if ( chunksSoFar < nbrChunks ) + { + System.arraycopy( CHUNK_SEPARATOR, 0, encodedData, encodedDataLength - CHUNK_SEPARATOR.length, + CHUNK_SEPARATOR.length ); } } @@ -377,12 +386,14 @@ public static byte[] encodeBase64(byte[] binaryData, boolean isChunked) { * @param base64Data Byte array containing Base64 data * @return Array containing decoded data. */ - public static byte[] decodeBase64(byte[] base64Data) { + public static byte[] decodeBase64( byte[] base64Data ) + { // RFC 2045 requires that we discard ALL non-Base64 characters - base64Data = discardNonBase64(base64Data); + base64Data = discardNonBase64( base64Data ); // handle the edge case, so we don't have to worry about it later - if (base64Data.length == 0) { + if ( base64Data.length == 0 ) + { return new byte[0]; } @@ -398,15 +409,18 @@ public static byte[] decodeBase64(byte[] base64Data) { // this sizes the output array properly - rlw int lastData = base64Data.length; // ignore the '=' padding - while (base64Data[lastData - 1] == PAD) { - if (--lastData == 0) { + while ( base64Data[lastData - 1] == PAD ) + { + if ( --lastData == 0 ) + { return new byte[0]; } } decodedData = new byte[lastData - numberQuadruple]; } - for (int i = 0; i < numberQuadruple; i++) { + for ( int i = 0; i < numberQuadruple; i++ ) + { dataIndex = i * 4; marker0 = base64Data[dataIndex + 2]; marker1 = base64Data[dataIndex + 3]; @@ -414,25 +428,28 @@ public static byte[] decodeBase64(byte[] base64Data) { b1 = base64Alphabet[base64Data[dataIndex]]; b2 = base64Alphabet[base64Data[dataIndex + 1]]; - if (marker0 != PAD && marker1 != PAD) { - //No PAD e.g 3cQl + if ( marker0 != PAD && marker1 != PAD ) + { + // No PAD e.g 3cQl b3 = base64Alphabet[marker0]; b4 = base64Alphabet[marker1]; - decodedData[encodedIndex] = (byte) (b1 << 2 | b2 >> 4); - decodedData[encodedIndex + 1] = - (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)); - decodedData[encodedIndex + 2] = (byte) (b3 << 6 | b4); - } else if (marker0 == PAD) { - //Two PAD e.g. 3c[Pad][Pad] - decodedData[encodedIndex] = (byte) (b1 << 2 | b2 >> 4); - } else if (marker1 == PAD) { - //One PAD e.g. 3cQ[Pad] + decodedData[encodedIndex] = (byte) ( b1 << 2 | b2 >> 4 ); + decodedData[encodedIndex + 1] = (byte) ( ( ( b2 & 0xf ) << 4 ) | ( ( b3 >> 2 ) & 0xf ) ); + decodedData[encodedIndex + 2] = (byte) ( b3 << 6 | b4 ); + } + else if ( marker0 == PAD ) + { + // Two PAD e.g. 3c[Pad][Pad] + decodedData[encodedIndex] = (byte) ( b1 << 2 | b2 >> 4 ); + } + else if ( marker1 == PAD ) + { + // One PAD e.g. 3cQ[Pad] b3 = base64Alphabet[marker0]; - decodedData[encodedIndex] = (byte) (b1 << 2 | b2 >> 4); - decodedData[encodedIndex + 1] = - (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)); + decodedData[encodedIndex] = (byte) ( b1 << 2 | b2 >> 4 ); + decodedData[encodedIndex + 1] = (byte) ( ( ( b2 & 0xf ) << 4 ) | ( ( b3 >> 2 ) & 0xf ) ); } encodedIndex += 3; } @@ -442,68 +459,71 @@ public static byte[] decodeBase64(byte[] base64Data) { /** * Discards any whitespace from a base-64 encoded block. * - * @param data The base-64 encoded data to discard the whitespace - * from. + * @param data The base-64 encoded data to discard the whitespace from. * @return The data, less whitespace (see RFC 2045). */ - static byte[] discardWhitespace(byte[] data) { + static byte[] discardWhitespace( byte[] data ) + { byte groomedData[] = new byte[data.length]; int bytesCopied = 0; - for (int i = 0; i < data.length; i++) { - switch (data[i]) { - case (byte) ' ' : - case (byte) '\n' : - case (byte) '\r' : - case (byte) '\t' : + for ( byte aData : data ) + { + switch ( aData ) + { + case (byte) ' ': + case (byte) '\n': + case (byte) '\r': + case (byte) '\t': break; - default: - groomedData[bytesCopied++] = data[i]; + default: + groomedData[bytesCopied++] = aData; } } byte packedData[] = new byte[bytesCopied]; - System.arraycopy(groomedData, 0, packedData, 0, bytesCopied); + System.arraycopy( groomedData, 0, packedData, 0, bytesCopied ); return packedData; } /** - * Discards any characters outside of the base64 alphabet, per - * the requirements on page 25 of RFC 2045 - "Any characters - * outside of the base64 alphabet are to be ignored in base64 - * encoded data." + * Discards any characters outside of the base64 alphabet, per the requirements on page 25 of RFC 2045 - "Any + * characters outside of the base64 alphabet are to be ignored in base64 encoded data." * * @param data The base-64 encoded data to groom * @return The data, less non-base64 characters (see RFC 2045). */ - static byte[] discardNonBase64(byte[] data) { + static byte[] discardNonBase64( byte[] data ) + { byte groomedData[] = new byte[data.length]; int bytesCopied = 0; - for (int i = 0; i < data.length; i++) { - if (isBase64(data[i])) { - groomedData[bytesCopied++] = data[i]; + for ( byte aData : data ) + { + if ( isBase64( aData ) ) + { + groomedData[bytesCopied++] = aData; } } byte packedData[] = new byte[bytesCopied]; - System.arraycopy(groomedData, 0, packedData, 0, bytesCopied); + System.arraycopy( groomedData, 0, packedData, 0, bytesCopied ); return packedData; } /** - * Encodes a byte[] containing binary data, into a byte[] containing - * characters in the Base64 alphabet. + * Encodes a byte[] containing binary data, into a byte[] containing characters in the Base64 alphabet. * * @param pArray a byte array containing binary data * @return A byte array containing only Base64 character data */ - public byte[] encode(byte[] pArray) { - return encodeBase64(pArray, false); + public byte[] encode( byte[] pArray ) + { + return encodeBase64( pArray, false ); } } diff --git a/src/main/java/org/codehaus/plexus/util/BaseIOUtil.java b/src/main/java/org/codehaus/plexus/util/BaseIOUtil.java new file mode 100644 index 00000000..ac2ade02 --- /dev/null +++ b/src/main/java/org/codehaus/plexus/util/BaseIOUtil.java @@ -0,0 +1,27 @@ +package org.codehaus.plexus.util; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.Reader; +import java.io.Writer; + +/** + * Implementation specific to Java SE 8 version. + */ +abstract class BaseIOUtil +{ + private static final int DEFAULT_BUFFER_SIZE = 1024 * 16; + + static void copy( final InputStream input, final OutputStream output ) + throws IOException + { + IOUtil.copy( input, output, DEFAULT_BUFFER_SIZE ); + } + + static void copy( final Reader input, final Writer output ) + throws IOException + { + IOUtil.copy( input, output, DEFAULT_BUFFER_SIZE ); + } +} diff --git a/src/main/java/org/codehaus/plexus/util/CachedMap.java b/src/main/java/org/codehaus/plexus/util/CachedMap.java index 6a8386c8..c77d2180 100644 --- a/src/main/java/org/codehaus/plexus/util/CachedMap.java +++ b/src/main/java/org/codehaus/plexus/util/CachedMap.java @@ -1,49 +1,53 @@ +package org.codehaus.plexus.util; + /* * J.A.D.E. Java(TM) Addition to Default Environment. * Latest release available at http://jade.dautelle.com/ * This class is public domain (not copyrighted). */ -package org.codehaus.plexus.util; + import java.util.Collection; import java.util.Collections; -import java.util.Iterator; import java.util.Map; import java.util.Set; /** - *

This class provides cache access to Map collections.

- * - *

Instance of this class can be used as "proxy" for any collection - * implementing the java.util.Map interface.

- * - *

Typically, {@link CachedMap} are used to accelerate access to - * large collections when the access to the collection is not evenly - * distributed (associative cache). The performance gain is about - * 50% for the fastest hash map collections (e.g. {@link FastMap}). - * For slower collections such as java.util.TreeMap, - * non-resizable {@link FastMap} (real-time) or database access, - * performance can be of several orders of magnitude.

- * - *

Note: The keys used to access elements of a {@link CachedMap} do - * not need to be immutable as they are not stored in the cache - * (only keys specified by the {@link #put} method are). - * In other words, access can be performed using mutable keys as long - * as these keys can be compared for equality with the real map's keys - * (e.g. same hashCode values).

- * - *

This implementation is not synchronized. Multiple threads accessing - * or modifying the collection must be synchronized externally.

- * - *

This class is public domain (not copyrighted).

+ *

+ * This class provides cache access to Map collections. + *

+ *

+ * Instance of this class can be used as "proxy" for any collection implementing the java.util.Map + * interface. + *

+ *

+ * Typically, {@link CachedMap} are used to accelerate access to large collections when the access to the collection is + * not evenly distributed (associative cache). The performance gain is about 50% for the fastest hash map collections + * (e.g. {@link FastMap}). For slower collections such as java.util.TreeMap, non-resizable {@link FastMap} + * (real-time) or database access, performance can be of several orders of magnitude. + *

+ *

+ * Note: The keys used to access elements of a {@link CachedMap} do not need to be immutable as they are not + * stored in the cache (only keys specified by the {@link #put} method are). In other words, access can be performed + * using mutable keys as long as these keys can be compared for equality with the real map's keys (e.g. same + * hashCode values). + *

+ *

+ * This implementation is not synchronized. Multiple threads accessing or modifying the collection must be synchronized + * externally. + *

+ *

+ * This class is public domain (not copyrighted). + *

* - * @author Jean-Marie Dautelle + * @author Jean-Marie Dautelle * @version 5.3, October 30, 2003 */ -public final class CachedMap implements Map { +public final class CachedMap + implements Map +{ /** - * Holds the FastMap backing this collection - * (null if generic backing map). + * Holds the FastMap backing this collection (null if generic backing map). */ private final FastMap _backingFastMap; @@ -53,8 +57,7 @@ public final class CachedMap implements Map { private final Map _backingMap; /** - * Holds the keys of the backing map (key-to-key mapping). - * (null if FastMap backing map). + * Holds the keys of the backing map (key-to-key mapping). (null if FastMap backing map). */ private final FastMap _keysMap; @@ -74,41 +77,41 @@ public final class CachedMap implements Map { private final Object[] _values; /** - * Creates a cached map backed by a {@link FastMap}. - * The default cache size and map capacity is set to 256 - * entries. + * Creates a cached map backed by a {@link FastMap}. The default cache size and map capacity is set to + * 256 entries. */ - public CachedMap() { - this(256, new FastMap()); + public CachedMap() + { + this( 256, new FastMap() ); } /** - * Creates a cached map backed by a {@link FastMap} and having the - * specified cache size. + * Creates a cached map backed by a {@link FastMap} and having the specified cache size. * - * @param cacheSize the cache size, the actual cache size is the - * first power of 2 greater or equal to cacheSize. - * This is also the initial capacity of the backing map. + * @param cacheSize the cache size, the actual cache size is the first power of 2 greater or equal to + * cacheSize. This is also the initial capacity of the backing map. */ - public CachedMap(int cacheSize) { - this(cacheSize, new FastMap(cacheSize)); + public CachedMap( int cacheSize ) + { + this( cacheSize, new FastMap( cacheSize ) ); } /** - * Creates a cached map backed by the specified map and having the specified - * cache size. In order to maitain cache veracity, it is critical - * that all update to the backing map is accomplished through the - * {@link CachedMap} instance; otherwise {@link #flush} has to be called. + * Creates a cached map backed by the specified map and having the specified cache size. In order to maintain cache + * veracity, it is critical that all update to the backing map is accomplished through the {@link CachedMap} + * instance; otherwise {@link #flush} has to be called. * - * @param cacheSize the cache size, the actual cache size is the - * first power of 2 greater or equal to cacheSize. - * @param backingMap the backing map to be "wrapped" in a cached map. + * @param cacheSize the cache size, the actual cache size is the first power of 2 greater or equal to + * cacheSize. + * @param backingMap the backing map to be "wrapped" in a cached map. */ - public CachedMap(int cacheSize, Map backingMap) { + public CachedMap( int cacheSize, Map backingMap ) + { // Find a power of 2 >= minimalCache int actualCacheSize = 1; - while (actualCacheSize < cacheSize) { + while ( actualCacheSize < cacheSize ) + { actualCacheSize <<= 1; } @@ -118,17 +121,20 @@ public CachedMap(int cacheSize, Map backingMap) { _mask = actualCacheSize - 1; // Sets backing map references. - if (backingMap instanceof FastMap) { - _backingFastMap = (FastMap)backingMap; + if ( backingMap instanceof FastMap ) + { + _backingFastMap = (FastMap) backingMap; _backingMap = _backingFastMap; _keysMap = null; - } else { + } + else + { _backingFastMap = null; _backingMap = backingMap; - _keysMap = new FastMap(backingMap.size()); - for (Iterator i= backingMap.keySet().iterator(); i.hasNext();) { - Object key = i.next(); - _keysMap.put(key, key); + _keysMap = new FastMap( backingMap.size() ); + for ( Object key : backingMap.keySet() ) + { + _keysMap.put( key, key ); } } } @@ -138,77 +144,89 @@ public CachedMap(int cacheSize, Map backingMap) { * * @return the cache size (power of 2). */ - public int getCacheSize() { + public int getCacheSize() + { return _keys.length; } /** - * Returns the backing map. If the backing map is modified directly, - * this {@link CachedMap} has to be flushed. + * Returns the backing map. If the backing map is modified directly, this {@link CachedMap} has to be flushed. * - * @return the backing map. - * @see #flush + * @return the backing map. + * @see #flush */ - public Map getBackingMap() { - return (_backingFastMap != null) ? _backingFastMap : _backingMap; + public Map getBackingMap() + { + return ( _backingFastMap != null ) ? _backingFastMap : _backingMap; } /** - * Flushes the key/value pairs being cached. This method should be called - * if the backing map is externally modified. + * Flushes the key/value pairs being cached. This method should be called if the backing map is externally modified. */ - public void flush() { - for (int i=0; i < _keys.length; i++) { + public void flush() + { + for ( int i = 0; i < _keys.length; i++ ) + { _keys[i] = null; _values[i] = null; } - if (_keysMap != null) { + if ( _keysMap != null ) + { // Re-populates keys from backing map. - for (Iterator i= _backingMap.keySet().iterator(); i.hasNext();) { - Object key = i.next(); - _keysMap.put(key, key); + for ( Object key : _backingMap.keySet() ) + { + _keysMap.put( key, key ); } } } /** - * Returns the value to which this map maps the specified key. - * First, the cache is being checked, then if the cache does not contains - * the specified key, the backing map is accessed and the key/value - * pair is stored in the cache. + * Returns the value to which this map maps the specified key. First, the cache is being checked, then if the cache + * does not contains the specified key, the backing map is accessed and the key/value pair is stored in the cache. * - * @param key the key whose associated value is to be returned. - * @return the value to which this map maps the specified key, or - * null if the map contains no mapping for this key. - * @throws ClassCastException if the key is of an inappropriate type for - * the backing map (optional). + * @param key the key whose associated value is to be returned. + * @return the value to which this map maps the specified key, or null if the map contains no mapping + * for this key. + * @throws ClassCastException if the key is of an inappropriate type for the backing map (optional). * @throws NullPointerException if the key is null. */ - public Object get(Object key) { + @Override + public Object get( Object key ) + { int index = key.hashCode() & _mask; - return key.equals(_keys[index]) ? - _values[index] : getCacheMissed(key, index); + return key.equals( _keys[index] ) ? _values[index] : getCacheMissed( key, index ); } - private Object getCacheMissed(Object key, int index) { - if (_backingFastMap != null) { - Map.Entry entry = _backingFastMap.getEntry(key); - if (entry != null) { + + private Object getCacheMissed( Object key, int index ) + { + if ( _backingFastMap != null ) + { + Map.Entry entry = _backingFastMap.getEntry( key ); + if ( entry != null ) + { _keys[index] = entry.getKey(); Object value = entry.getValue(); _values[index] = value; return value; - } else { + } + else + { return null; } - } else { // Generic backing map. - Object mapKey = _keysMap.get(key); - if (mapKey != null) { + } + else + { // Generic backing map. + Object mapKey = _keysMap.get( key ); + if ( mapKey != null ) + { _keys[index] = mapKey; - Object value = _backingMap.get(key); + Object value = _backingMap.get( key ); _values[index] = value; return value; - } else { + } + else + { return null; } } @@ -217,82 +235,90 @@ private Object getCacheMissed(Object key, int index) { /** * Associates the specified value with the specified key in this map. * - * @param key the key with which the specified value is to be associated. - * @param value the value to be associated with the specified key. - * @return the previous value associated with specified key, or - * null if there was no mapping for the key. - * @throws UnsupportedOperationException if the put operation - * is not supported by the backing map. - * @throws ClassCastException if the class of the specified key or value - * prevents it from being stored in this map. - * @throws IllegalArgumentException if some aspect of this key or value - * prevents it from being stored in this map. + * @param key the key with which the specified value is to be associated. + * @param value the value to be associated with the specified key. + * @return the previous value associated with specified key, or null if there was no mapping for the + * key. + * @throws UnsupportedOperationException if the put operation is not supported by the backing map. + * @throws ClassCastException if the class of the specified key or value prevents it from being stored in this map. + * @throws IllegalArgumentException if some aspect of this key or value prevents it from being stored in this map. * @throws NullPointerException if the key is null. */ - public Object put(Object key, Object value) { + @Override + public Object put( Object key, Object value ) + { // Updates the cache. int index = key.hashCode() & _mask; - if (key.equals(_keys[index]) ) { + if ( key.equals( _keys[index] ) ) + { _values[index] = value; - } else if (_keysMap != null) { // Possibly a new key. - _keysMap.put(key, key); + } + else if ( _keysMap != null ) + { // Possibly a new key. + _keysMap.put( key, key ); } // Updates the backing map. - return _backingMap.put(key, value); + return _backingMap.put( key, value ); } /** * Removes the mapping for this key from this map if it is present. * - * @param key key whose mapping is to be removed from the map. - * @return previous value associated with specified key, - * or null if there was no mapping for key. - * @throws ClassCastException if the key is of an inappropriate type for - * the backing map (optional). + * @param key key whose mapping is to be removed from the map. + * @return previous value associated with specified key, or null if there was no mapping for key. + * @throws ClassCastException if the key is of an inappropriate type for the backing map (optional). * @throws NullPointerException if the key is null. - * @throws UnsupportedOperationException if the remove method - * is not supported by the backing map. + * @throws UnsupportedOperationException if the remove method is not supported by the backing map. */ - public Object remove(Object key) { + @Override + public Object remove( Object key ) + { // Removes from cache. int index = key.hashCode() & _mask; - if (key.equals(_keys[index]) ) { + if ( key.equals( _keys[index] ) ) + { _keys[index] = null; } // Removes from key map. - if (_keysMap != null) { - _keysMap.remove(key); + if ( _keysMap != null ) + { + _keysMap.remove( key ); } // Removes from backing map. - return _backingMap.remove(key); + return _backingMap.remove( key ); } /** * Indicates if this map contains a mapping for the specified key. * - * @param key the key whose presence in this map is to be tested. - * @return true if this map contains a mapping for the - * specified key; false otherwise. + * @param key the key whose presence in this map is to be tested. + * @return true if this map contains a mapping for the specified key; false otherwise. */ - public boolean containsKey(Object key) { + @Override + public boolean containsKey( Object key ) + { // Checks the cache. int index = key.hashCode() & _mask; - if (key.equals(_keys[index]) ) { + if ( key.equals( _keys[index] ) ) + { return true; - } else { // Checks the backing map. - return _backingMap.containsKey(key); + } + else + { // Checks the backing map. + return _backingMap.containsKey( key ); } } /** - * Returns the number of key-value mappings in this map. If the - * map contains more than Integer.MAX_VALUE elements, - * returns Integer.MAX_VALUE. + * Returns the number of key-value mappings in this map. If the map contains more than + * Integer.MAX_VALUE elements, returns Integer.MAX_VALUE. * * @return the number of key-value mappings in this map. */ - public int size() { + @Override + public int size() + { return _backingMap.size(); } @@ -301,67 +327,68 @@ public int size() { * * @return true if this map contains no key-value mappings. */ - public boolean isEmpty() { + @Override + public boolean isEmpty() + { return _backingMap.isEmpty(); } /** - * Returns true if this map maps one or more keys to the - * specified value. + * Returns true if this map maps one or more keys to the specified value. * - * @param value value whose presence in this map is to be tested. - * @return true if this map maps one or more keys to the - * specified value. - * @throws ClassCastException if the value is of an inappropriate type for - * the backing map (optional). - * @throws NullPointerException if the value is null and the - * backing map does not not permit null values. + * @param value value whose presence in this map is to be tested. + * @return true if this map maps one or more keys to the specified value. + * @throws ClassCastException if the value is of an inappropriate type for the backing map (optional). + * @throws NullPointerException if the value is null and the backing map does not not permit + * null values. */ - public boolean containsValue(Object value) { - return _backingMap.containsValue(value); + @Override + public boolean containsValue( Object value ) + { + return _backingMap.containsValue( value ); } /** - * Copies all of the mappings from the specified map to this map - * (optional operation). This method automatically flushes the cache. + * Copies all of the mappings from the specified map to this map (optional operation). This method automatically + * flushes the cache. * * @param map the mappings to be stored in this map. - * @throws UnsupportedOperationException if the putAll method - * is not supported by the backing map. - * @throws ClassCastException if the class of a key or value in the - * specified map prevents it from being stored in this map. - * @throws IllegalArgumentException some aspect of a key or value in the - * specified map prevents it from being stored in this map. - * @throws NullPointerException the specified map is null, or - * if the backing map does not permit null keys or - * values, and the specified map contains null keys or - * values. + * @throws UnsupportedOperationException if the putAll method is not supported by the backing map. + * @throws ClassCastException if the class of a key or value in the specified map prevents it from being stored in + * this map. + * @throws IllegalArgumentException some aspect of a key or value in the specified map prevents it from being stored + * in this map. + * @throws NullPointerException the specified map is null, or if the backing map does not permit + * null keys or values, and the specified map contains null keys or values. */ - public void putAll(Map map) { - _backingMap.putAll(map); + @Override + public void putAll( Map map ) + { + _backingMap.putAll( map ); flush(); } /** - * Removes all mappings from this map (optional operation). This method - * automatically flushes the cache. + * Removes all mappings from this map (optional operation). This method automatically flushes the cache. * - * @throws UnsupportedOperationException if clear is not supported by the - * backing map. + * @throws UnsupportedOperationException if clear is not supported by the backing map. */ - public void clear() { + @Override + public void clear() + { _backingMap.clear(); flush(); } /** - * Returns an unmodifiable view of the keys contained in this - * map. + * Returns an unmodifiable view of the keys contained in this map. * * @return an unmodifiable view of the keys contained in this map. */ - public Set keySet() { - return Collections.unmodifiableSet(_backingMap.keySet()); + @Override + public Set keySet() + { + return Collections.unmodifiableSet( _backingMap.keySet() ); } /** @@ -369,31 +396,35 @@ public Set keySet() { * * @return an unmodifiable view of the values contained in this map. */ - public Collection values() { - return Collections.unmodifiableCollection(_backingMap.values()); + @Override + public Collection values() + { + return Collections.unmodifiableCollection( _backingMap.values() ); } /** - * Returns an unmodifiable view of the mappings contained in this - * map. Each element in the returned set is a Map.Entry. + * Returns an unmodifiable view of the mappings contained in this map. Each element in the returned set is a + * Map.Entry. * * @return an unmodifiable view of the mappings contained in this map. */ - public Set entrySet() { - return Collections.unmodifiableSet(_backingMap.entrySet()); + @Override + public Set entrySet() + { + return Collections.unmodifiableSet( _backingMap.entrySet() ); } - /** - * Compares the specified object with this map for equality. Returns - * true if the given object is also a map and the two Maps - * represent the same mappings. + * Compares the specified object with this map for equality. Returns true if the given object is also a map + * and the two Maps represent the same mappings. * - * @param o object to be compared for equality with this map. + * @param o object to be compared for equality with this map. * @return true if the specified object is equal to this map. */ - public boolean equals(Object o) { - return _backingMap.equals(o); + @Override + public boolean equals( Object o ) + { + return _backingMap.equals( o ); } /** @@ -401,7 +432,9 @@ public boolean equals(Object o) { * * @return the hash code value for this map. */ - public int hashCode() { + @Override + public int hashCode() + { return _backingMap.hashCode(); } -} \ No newline at end of file +} diff --git a/src/main/java/org/codehaus/plexus/util/CollectionUtils.java b/src/main/java/org/codehaus/plexus/util/CollectionUtils.java index 4192b79f..b16200fd 100644 --- a/src/main/java/org/codehaus/plexus/util/CollectionUtils.java +++ b/src/main/java/org/codehaus/plexus/util/CollectionUtils.java @@ -28,7 +28,7 @@ /** * @author olamy - * @version $Id$ + * */ public class CollectionUtils { @@ -37,25 +37,18 @@ public class CollectionUtils // ---------------------------------------------------------------------- /** - * Take a dominant and recessive Map and merge the key:value - * pairs where the recessive Map may add key:value pairs to the dominant - * Map but may not override any existing key:value pairs. - * - * If we have two Maps, a dominant and recessive, and - * their respective keys are as follows: - * - * dominantMapKeys = { a, b, c, d, e, f } - * recessiveMapKeys = { a, b, c, x, y, z } - * - * Then the result should be the following: - * - * resultantKeys = { a, b, c, d, e, f, x, y, z } + * Take a dominant and recessive Map and merge the key:value pairs where the recessive Map may add key:value pairs + * to the dominant Map but may not override any existing key:value pairs. If we have two Maps, a dominant and + * recessive, and their respective keys are as follows: dominantMapKeys = { a, b, c, d, e, f } recessiveMapKeys = { + * a, b, c, x, y, z } Then the result should be the following: resultantKeys = { a, b, c, d, e, f, x, y, z } * * @param dominantMap Dominant Map. * @param recessiveMap Recessive Map. + * @param type + * @param type * @return The result map with combined dominant and recessive values. */ - public static Map mergeMaps( Map dominantMap, Map recessiveMap ) + public static Map mergeMaps( Map dominantMap, Map recessiveMap ) { if ( dominantMap == null && recessiveMap == null ) @@ -68,21 +61,21 @@ public static Map mergeMaps( Map dominantMap, Map recessiveMap ) return dominantMap; } - if ( dominantMap == null && recessiveMap != null ) + if ( dominantMap == null ) { return recessiveMap; } - Map result = new HashMap(); + Map result = new HashMap<>(); // Grab the keys from the dominant and recessive maps. - Set dominantMapKeys = dominantMap.keySet(); - Set recessiveMapKeys = recessiveMap.keySet(); + Set dominantMapKeys = dominantMap.keySet(); + Set recessiveMapKeys = recessiveMap.keySet(); // Create the set of keys that will be contributed by the // recessive Map by subtracting the intersection of keys // from the recessive Map's keys. - Collection contributingRecessiveKeys = + Collection contributingRecessiveKeys = CollectionUtils.subtract( recessiveMapKeys, CollectionUtils.intersection( dominantMapKeys, recessiveMapKeys ) ); @@ -90,9 +83,8 @@ public static Map mergeMaps( Map dominantMap, Map recessiveMap ) // Now take the keys we just found and extract the values from // the recessiveMap and put the key:value pairs into the dominantMap. - for ( Iterator i = contributingRecessiveKeys.iterator(); i.hasNext(); ) + for ( K key : contributingRecessiveKeys ) { - Object key = i.next(); result.put( key, recessiveMap.get( key ) ); } @@ -100,16 +92,17 @@ public static Map mergeMaps( Map dominantMap, Map recessiveMap ) } /** - * Take a series of Maps and merge - * them where the ordering of the array from 0..n - * is the dominant order. + * Take a series of Maps and merge them where the ordering of the array from 0..n is the dominant + * order. * * @param maps An array of Maps to merge. + * @param type + * @param type * @return Map The result Map produced after the merging process. */ - public static Map mergeMaps( Map[] maps ) + public static Map mergeMaps( Map[] maps ) { - Map result = null; + Map result; if ( maps.length == 0 ) { @@ -133,27 +126,28 @@ else if ( maps.length == 1 ) } /** - * Returns a {@link Collection} containing the intersection - * of the given {@link Collection}s. *

- * The cardinality of each element in the returned {@link Collection} - * will be equal to the minimum of the cardinality of that element - * in the two given {@link Collection}s. + * Returns a {@link Collection} containing the intersection of the given {@link Collection}s. + *

+ * The cardinality of each element in the returned {@link Collection} will be equal to the minimum of the + * cardinality of that element in the two given {@link Collection}s. * + * @param a The first collection + * @param b The second collection + * @param the type * @see Collection#retainAll + * @return The intersection of a and b, never null */ - public static Collection intersection( final Collection a, final Collection b ) + public static Collection intersection( final Collection a, final Collection b ) { - ArrayList list = new ArrayList(); - Map mapa = getCardinalityMap( a ); - Map mapb = getCardinalityMap( b ); - Set elts = new HashSet( a ); + ArrayList list = new ArrayList<>(); + Map mapa = getCardinalityMap( a ); + Map mapb = getCardinalityMap( b ); + Set elts = new HashSet<>( a ); elts.addAll( b ); - Iterator it = elts.iterator(); - while ( it.hasNext() ) + for ( E obj : elts ) { - Object obj = it.next(); - for ( int i = 0,m = Math.min( getFreq( obj, mapa ), getFreq( obj, mapb ) ); i < m; i++ ) + for ( int i = 0, m = Math.min( getFreq( obj, mapa ), getFreq( obj, mapb ) ); i < m; i++ ) { list.add( obj ); } @@ -162,60 +156,61 @@ public static Collection intersection( final Collection a, final Collection b ) } /** - * Returns a {@link Collection} containing a - b. - * The cardinality of each element e in the returned {@link Collection} - * will be the cardinality of e in a minus the cardinality - * of e in b, or zero, whichever is greater. + * Returns a {@link Collection} containing a - b. The cardinality of each element e in + * the returned {@link Collection} will be the cardinality of e in a minus the cardinality of e + * in b, or zero, whichever is greater. * + * @param a The start collection + * @param b The collection that will be subtracted + * @param the type * @see Collection#removeAll + * @return The result of the subtraction */ - public static Collection subtract( final Collection a, final Collection b ) + public static Collection subtract( final Collection a, final Collection b ) { - ArrayList list = new ArrayList( a ); - Iterator it = b.iterator(); - while ( it.hasNext() ) + ArrayList list = new ArrayList<>( a ); + for ( T aB : b ) { - list.remove( it.next() ); + list.remove( aB ); } return list; } /** - * Returns a {@link Map} mapping each unique element in - * the given {@link Collection} to an {@link Integer} - * representing the number of occurances of that element - * in the {@link Collection}. - * An entry that maps to null indicates that the - * element does not appear in the given {@link Collection}. + * Returns a {@link Map} mapping each unique element in the given {@link Collection} to an {@link Integer} + * representing the number of occurrences of that element in the {@link Collection}. An entry that maps to + * null indicates that the element does not appear in the given {@link Collection}. + * + * @param col The collection to count cardinalities for + * @param the type + * @return A map of counts, indexed on each element in the collection */ - public static Map getCardinalityMap( final Collection col ) + public static Map getCardinalityMap( final Collection col ) { - HashMap count = new HashMap(); - Iterator it = col.iterator(); - while ( it.hasNext() ) + HashMap count = new HashMap<>(); + for ( E obj : col ) { - Object obj = it.next(); - Integer c = (Integer) ( count.get( obj ) ); + Integer c = count.get( obj ); if ( null == c ) { - count.put( obj, new Integer( 1 ) ); + count.put( obj, 1 ); } else { - count.put( obj, new Integer( c.intValue() + 1 ) ); + count.put( obj, c + 1 ); } } return count; } - public static List iteratorToList( Iterator it ) + public static List iteratorToList( Iterator it ) { if ( it == null ) { throw new NullPointerException( "it cannot be null." ); } - List list = new ArrayList(); + List list = new ArrayList(); while ( it.hasNext() ) { @@ -229,23 +224,18 @@ public static List iteratorToList( Iterator it ) // // ---------------------------------------------------------------------- - private static final int getFreq( final Object obj, final Map freqMap ) + private static int getFreq( final E obj, final Map freqMap ) { try { - Object o = freqMap.get( obj ); - if ( o != null ) // minimize NullPointerExceptions + Integer o = freqMap.get( obj ); + if ( o != null ) // minimize NullPointerExceptions { - return ( (Integer) o ).intValue(); + return o; } } - catch ( NullPointerException e ) - { - // ignored - } - catch ( NoSuchElementException e ) + catch ( NullPointerException | NoSuchElementException ignore ) { - // ignored } return 0; } diff --git a/src/main/java/org/codehaus/plexus/util/DirectoryScanner.java b/src/main/java/org/codehaus/plexus/util/DirectoryScanner.java index b7155406..5db6a903 100644 --- a/src/main/java/org/codehaus/plexus/util/DirectoryScanner.java +++ b/src/main/java/org/codehaus/plexus/util/DirectoryScanner.java @@ -1,3 +1,5 @@ +package org.codehaus.plexus.util; + /* * The Apache Software License, Version 1.1 * @@ -17,11 +19,11 @@ * distribution. * * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: + * any, must include the following acknowledgement: * "This product includes software developed by the * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * Alternately, this acknowledgement may appear in the software itself, + * if and wherever such third-party acknowledgements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived @@ -52,145 +54,137 @@ * . */ -package org.codehaus.plexus.util; - import java.io.File; import java.io.IOException; -import java.util.Vector; +import java.util.ArrayList; +import java.util.Arrays; /** - * Class for scanning a directory for files/directories which match certain - * criteria. - *

- * These criteria consist of selectors and patterns which have been specified. - * With the selectors you can select which files you want to have included. - * Files which are not selected are excluded. With patterns you can include - * or exclude files based on their filename. - *

- * The idea is simple. A given directory is recursively scanned for all files - * and directories. Each file/directory is matched against a set of selectors, - * including special support for matching against filenames with include and - * and exclude patterns. Only files/directories which match at least one - * pattern of the include pattern list or other file selector, and don't match - * any pattern of the exclude pattern list or fail to match against a required - * selector will be placed in the list of files/directories found. - *

- * When no list of include patterns is supplied, "**" will be used, which - * means that everything will be matched. When no list of exclude patterns is - * supplied, an empty list is used, such that nothing will be excluded. When - * no selectors are supplied, none are applied. - *

- * The filename pattern matching is done as follows: - * The name to be matched is split up in path segments. A path segment is the - * name of a directory or file, which is bounded by - * File.separator ('/' under UNIX, '\' under Windows). - * For example, "abc/def/ghi/xyz.java" is split up in the segments "abc", - * "def","ghi" and "xyz.java". - * The same is done for the pattern against which should be matched. - *

- * The segments of the name and the pattern are then matched against each - * other. When '**' is used for a path segment in the pattern, it matches - * zero or more path segments of the name. - *

- * There is a special case regarding the use of File.separators - * at the beginning of the pattern and the string to match:
- * When a pattern starts with a File.separator, the string - * to match must also start with a File.separator. - * When a pattern does not start with a File.separator, the - * string to match may not start with a File.separator. - * When one of these rules is not obeyed, the string will not - * match. - *

- * When a name path segment is matched against a pattern path segment, the - * following special characters can be used:
+ *

Class for scanning a directory for files/directories which match certain criteria.

+ * + *

These criteria consist of selectors and patterns which have been specified. With the selectors you can select which + * files you want to have included. Files which are not selected are excluded. With patterns you can include or exclude + * files based on their filename.

+ * + *

The idea is simple. A given directory is recursively scanned for all files and directories. Each file/directory is + * matched against a set of selectors, including special support for matching against filenames with include and and + * exclude patterns. Only files/directories which match at least one pattern of the include pattern list or other file + * selector, and don't match any pattern of the exclude pattern list or fail to match against a required selector will + * be placed in the list of files/directories found.

+ * + *

When no list of include patterns is supplied, "**" will be used, which means that everything will be matched. When no + * list of exclude patterns is supplied, an empty list is used, such that nothing will be excluded. When no selectors + * are supplied, none are applied.

+ * + *

The filename pattern matching is done as follows: The name to be matched is split up in path segments. A path segment + * is the name of a directory or file, which is bounded by File.separator ('/' under UNIX, '\' under + * Windows). For example, "abc/def/ghi/xyz.java" is split up in the segments "abc", "def","ghi" and "xyz.java". The same + * is done for the pattern against which should be matched.

+ * + *

The segments of the name and the pattern are then matched against each other. When '**' is used for a path segment in + * the pattern, it matches zero or more path segments of the name.

+ * + *

There is a special case regarding the use of File.separators at the beginning of the pattern and the + * string to match:
+ * When a pattern starts with a File.separator, the string to match must also start with a + * File.separator. When a pattern does not start with a File.separator, the string to match + * may not start with a File.separator. When one of these rules is not obeyed, the string will not match.

+ * + *

When a name path segment is matched against a pattern path segment, the following special characters can be used:
* '*' matches zero or more characters
- * '?' matches one character. - *

+ * '?' matches one character.

+ * * Examples: - *

- * "**\*.class" matches all .class files/dirs in a directory tree. - *

- * "test\a??.java" matches all files/dirs which start with an 'a', then two - * more characters and then ".java", in a directory called test. - *

- * "**" matches everything in a directory tree. - *

- * "**\test\**\XYZ*" matches all files/dirs which start with "XYZ" and where - * there is a parent directory called test (e.g. "abc\test\def\ghi\XYZ123"). - *

- * Case sensitivity may be turned off if necessary. By default, it is - * turned on. - *

+ *

    + *
  • "**\*.class" matches all .class files/dirs in a directory tree.
  • + *
  • "test\a??.java" matches all files/dirs which start with an 'a', then two more characters and then ".java", in a + * directory called test.
  • + *
  • "**" matches everything in a directory tree.
  • + *
  • "**\test\**\XYZ*" matches all files/dirs which start with "XYZ" and where there is a parent directory called test + * (e.g. "abc\test\def\ghi\XYZ123").
  • + *
+ * + *

Case sensitivity may be turned off if necessary. By default, it is turned on.

* Example of usage: *
- *   String[] includes = {"**\\*.class"};
- *   String[] excludes = {"modules\\*\\**"};
- *   ds.setIncludes(includes);
- *   ds.setExcludes(excludes);
- *   ds.setBasedir(new File("test"));
- *   ds.setCaseSensitive(true);
- *   ds.scan();
+ * String[] includes = { "**\\*.class" };
+ * String[] excludes = { "modules\\*\\**" };
+ * ds.setIncludes( includes );
+ * ds.setExcludes( excludes );
+ * ds.setBasedir( new File( "test" ) );
+ * ds.setCaseSensitive( true );
+ * ds.scan();
  *
- *   System.out.println("FILES:");
- *   String[] files = ds.getIncludedFiles();
- *   for (int i = 0; i < files.length; i++) {
- *     System.out.println(files[i]);
- *   }
+ * System.out.println( "FILES:" );
+ * String[] files = ds.getIncludedFiles();
+ * for ( int i = 0; i < files.length; i++ )
+ * {
+ *     System.out.println( files[i] );
+ * }
  * 
- * This will scan a directory called test for .class files, but excludes all - * files in all proper subdirectories of a directory called "modules" + * + *

This will scan a directory called test for .class files, but excludes all files in all proper subdirectories of a + * directory called "modules"

* - * @author Arnout J. Kuiper - * ajkuiper@wxs.nl + * @author Arnout J. Kuiper ajkuiper@wxs.nl * @author Magesh Umasankar * @author Bruce Atherton * @author Antoine Levy-Lambert */ -public class DirectoryScanner extends AbstractScanner +public class DirectoryScanner + extends AbstractScanner { - /** The base directory to be scanned. */ + private static final String[] EMPTY_STRING_ARRAY = new String[0]; + + /** + * The base directory to be scanned. + */ protected File basedir; - /** The files which matched at least one include and no excludes - * and were selected. + /** + * The files which matched at least one include and no excludes and were selected. */ - protected Vector filesIncluded; + protected ArrayList filesIncluded; - /** The files which did not match any includes or selectors. */ - protected Vector filesNotIncluded; + /** + * The files which did not match any includes or selectors. + */ + protected ArrayList filesNotIncluded; /** - * The files which matched at least one include and at least - * one exclude. + * The files which matched at least one include and at least one exclude. */ - protected Vector filesExcluded; + protected ArrayList filesExcluded; - /** The directories which matched at least one include and no excludes - * and were selected. + /** + * The directories which matched at least one include and no excludes and were selected. */ - protected Vector dirsIncluded; + protected ArrayList dirsIncluded; - /** The directories which were found and did not match any includes. */ - protected Vector dirsNotIncluded; + /** + * The directories which were found and did not match any includes. + */ + protected ArrayList dirsNotIncluded; /** - * The directories which matched at least one include and at least one - * exclude. + * The directories which matched at least one include and at least one exclude. */ - protected Vector dirsExcluded; + protected ArrayList dirsExcluded; - /** The files which matched at least one include and no excludes and - * which a selector discarded. + /** + * The files which matched at least one include and no excludes and which a selector discarded. */ - protected Vector filesDeselected; + protected ArrayList filesDeselected; - /** The directories which matched at least one include and no excludes - * but which a selector discarded. + /** + * The directories which matched at least one include and no excludes but which a selector discarded. */ - protected Vector dirsDeselected; + protected ArrayList dirsDeselected; - /** Whether or not our results were built by a slow scan. */ + /** + * Whether or not our results were built by a slow scan. + */ protected boolean haveSlowResults = false; /** @@ -200,9 +194,13 @@ public class DirectoryScanner extends AbstractScanner */ private boolean followSymlinks = true; - /** Whether or not everything tested so far has been included. */ + /** + * Whether or not everything tested so far has been included. + */ protected boolean everythingIncluded = true; + private final char[][] tokenizedEmpty = MatchPattern.tokenizePathToCharArray( "", File.separator ); + /** * Sole constructor. */ @@ -211,26 +209,21 @@ public DirectoryScanner() } /** - * Sets the base directory to be scanned. This is the directory which is - * scanned recursively. All '/' and '\' characters are replaced by - * File.separatorChar, so the separator used need not match + * Sets the base directory to be scanned. This is the directory which is scanned recursively. All '/' and '\' + * characters are replaced by File.separatorChar, so the separator used need not match * File.separatorChar. * - * @param basedir The base directory to scan. - * Must not be null. + * @param basedir The base directory to scan. Must not be null. */ public void setBasedir( String basedir ) { - setBasedir( new File( basedir.replace( '/', File.separatorChar ).replace( - '\\', File.separatorChar ) ) ); + setBasedir( new File( basedir.replace( '/', File.separatorChar ).replace( '\\', File.separatorChar ) ) ); } /** - * Sets the base directory to be scanned. This is the directory which is - * scanned recursively. + * Sets the base directory to be scanned. This is the directory which is scanned recursively. * - * @param basedir The base directory for scanning. - * Should not be null. + * @param basedir The base directory for scanning. Should not be null. */ public void setBasedir( File basedir ) { @@ -238,11 +231,11 @@ public void setBasedir( File basedir ) } /** - * Returns the base directory to be scanned. - * This is the directory which is scanned recursively. + * Returns the base directory to be scanned. This is the directory which is scanned recursively. * * @return the base directory to be scanned */ + @Override public File getBasedir() { return basedir; @@ -259,11 +252,9 @@ public void setFollowSymlinks( boolean followSymlinks ) } /** - * Returns whether or not the scanner has included all the files or - * directories it has come across so far. + * Returns whether or not the scanner has included all the files or directories it has come across so far. * - * @return true if all files and directories which have - * been found so far have been included. + * @return true if all files and directories which have been found so far have been included. */ public boolean isEverythingIncluded() { @@ -271,15 +262,15 @@ public boolean isEverythingIncluded() } /** - * Scans the base directory for files which match at least one include - * pattern and don't match any exclude patterns. If there are selectors - * then the files must pass muster there, as well. + * Scans the base directory for files which match at least one include pattern and don't match any exclude patterns. + * If there are selectors then the files must pass muster there, as well. * - * @exception IllegalStateException if the base directory was set - * incorrectly (i.e. if it is null, doesn't exist, - * or isn't a directory). + * @throws IllegalStateException if the base directory was set incorrectly (i.e. if it is null, doesn't + * exist, or isn't a directory). */ - public void scan() throws IllegalStateException + @Override + public void scan() + throws IllegalStateException { if ( basedir == null ) { @@ -287,58 +278,57 @@ public void scan() throws IllegalStateException } if ( !basedir.exists() ) { - throw new IllegalStateException( "basedir " + basedir - + " does not exist" ); + throw new IllegalStateException( "basedir " + basedir + " does not exist" ); } if ( !basedir.isDirectory() ) { - throw new IllegalStateException( "basedir " + basedir - + " is not a directory" ); + throw new IllegalStateException( "basedir " + basedir + " is not a directory" ); } setupDefaultFilters(); - - filesIncluded = new Vector(); - filesNotIncluded = new Vector(); - filesExcluded = new Vector(); - filesDeselected = new Vector(); - dirsIncluded = new Vector(); - dirsNotIncluded = new Vector(); - dirsExcluded = new Vector(); - dirsDeselected = new Vector(); - - if ( isIncluded( "" ) ) + setupMatchPatterns(); + + filesIncluded = new ArrayList(); + filesNotIncluded = new ArrayList(); + filesExcluded = new ArrayList(); + filesDeselected = new ArrayList(); + dirsIncluded = new ArrayList(); + dirsNotIncluded = new ArrayList(); + dirsExcluded = new ArrayList(); + dirsDeselected = new ArrayList(); + + if ( isIncluded( "", tokenizedEmpty ) ) { - if ( !isExcluded( "" ) ) + + if ( !isExcluded( "", tokenizedEmpty ) ) { if ( isSelected( "", basedir ) ) { - dirsIncluded.addElement( "" ); + dirsIncluded.add( "" ); } else { - dirsDeselected.addElement( "" ); + dirsDeselected.add( "" ); } } else { - dirsExcluded.addElement( "" ); + dirsExcluded.add( "" ); } } else { - dirsNotIncluded.addElement( "" ); + dirsNotIncluded.add( "" ); } scandir( basedir, "", true ); } /** - * Top level invocation for a slow scan. A slow scan builds up a full - * list of excluded/included files/directories, whereas a fast scan - * will only have full results for included files, as it ignores - * directories which can't possibly hold any included files/directories. - *

- * Returns immediately if a slow scan has already been completed. + *

Top level invocation for a slow scan. A slow scan builds up a full list of excluded/included files/directories, + * whereas a fast scan will only have full results for included files, as it ignores directories which can't + * possibly hold any included files/directories.

+ * + *

Returns immediately if a slow scan has already been completed.

*/ protected void slowScan() { @@ -347,27 +337,22 @@ protected void slowScan() return; } - String[] excl = new String[dirsExcluded.size()]; - dirsExcluded.copyInto( excl ); + String[] excl = dirsExcluded.toArray( EMPTY_STRING_ARRAY ); + String[] notIncl = dirsNotIncluded.toArray( EMPTY_STRING_ARRAY ); - String[] notIncl = new String[dirsNotIncluded.size()]; - dirsNotIncluded.copyInto( notIncl ); - - for ( int i = 0; i < excl.length; i++ ) + for ( String anExcl : excl ) { - if ( !couldHoldIncluded( excl[i] ) ) + if ( !couldHoldIncluded( anExcl ) ) { - scandir( new File( basedir, excl[i] ), - excl[i] + File.separator, false ); + scandir( new File( basedir, anExcl ), anExcl + File.separator, false ); } } - for ( int i = 0; i < notIncl.length; i++ ) + for ( String aNotIncl : notIncl ) { - if ( !couldHoldIncluded( notIncl[i] ) ) + if ( !couldHoldIncluded( aNotIncl ) ) { - scandir( new File( basedir, notIncl[i] ), - notIncl[i] + File.separator, false ); + scandir( new File( basedir, aNotIncl ), aNotIncl + File.separator, false ); } } @@ -375,18 +360,14 @@ protected void slowScan() } /** - * Scans the given directory for files and directories. Found files and - * directories are placed in their respective collections, based on the - * matching of includes, excludes, and the selectors. When a directory - * is found, it is scanned recursively. - * - * @param dir The directory to scan. Must not be null. - * @param vpath The path relative to the base directory (needed to - * prevent problems with an absolute path when using - * dir). Must not be null. - * @param fast Whether or not this call is part of a fast scan. - * @throws IOException + * Scans the given directory for files and directories. Found files and directories are placed in their respective + * collections, based on the matching of includes, excludes, and the selectors. When a directory is found, it is + * scanned recursively. * + * @param dir The directory to scan. Must not be null. + * @param vpath The path relative to the base directory (needed to prevent problems with an absolute path when using + * dir). Must not be null. + * @param fast Whether or not this call is part of a fast scan. * @see #filesIncluded * @see #filesNotIncluded * @see #filesExcluded @@ -402,82 +383,74 @@ protected void scandir( File dir, String vpath, boolean fast ) if ( newfiles == null ) { /* - * two reasons are mentioned in the API docs for File.list - * (1) dir is not a directory. This is impossible as - * we wouldn't get here in this case. - * (2) an IO error occurred (why doesn't it throw an exception - * then???) + * two reasons are mentioned in the API docs for File.list (1) dir is not a directory. This is impossible as + * we wouldn't get here in this case. (2) an IO error occurred (why doesn't it throw an exception then???) */ - /* - * [jdcasey] (2) is apparently happening to me, as this is killing one of my tests... - * this is affecting the assembly plugin, fwiw. I will initialize the newfiles array as - * zero-length for now. - * - * NOTE: I can't find the problematic code, as it appears to come from a native method - * in UnixFileSystem... + * [jdcasey] (2) is apparently happening to me, as this is killing one of my tests... this is affecting the + * assembly plugin, fwiw. I will initialize the newfiles array as zero-length for now. NOTE: I can't find + * the problematic code, as it appears to come from a native method in UnixFileSystem... */ /* * [bentmann] A null array will also be returned from list() on NTFS when dir refers to a soft link or * junction point whose target is not existent. */ - newfiles = new String[0]; + newfiles = EMPTY_STRING_ARRAY; // throw new IOException( "IO error scanning directory " + dir.getAbsolutePath() ); } if ( !followSymlinks ) { - Vector noLinks = new Vector(); - for ( int i = 0; i < newfiles.length; i++ ) + try { - try + if ( isParentSymbolicLink( dir, null ) ) { - if ( isSymbolicLink( dir, newfiles[i] ) ) + for ( String newfile : newfiles ) { - String name = vpath + newfiles[i]; - File file = new File( dir, newfiles[i] ); + String name = vpath + newfile; + File file = new File( dir, newfile ); if ( file.isDirectory() ) { - dirsExcluded.addElement( name ); + dirsExcluded.add( name ); } else { - filesExcluded.addElement( name ); + filesExcluded.add( name ); } } - else - { - noLinks.addElement( newfiles[i] ); - } - } - catch ( IOException ioe ) - { - String msg = "IOException caught while checking " - + "for links, couldn't get cannonical path!"; - // will be caught and redirected to Ant's logging system - System.err.println( msg ); - noLinks.addElement( newfiles[i] ); + return; } } - newfiles = new String[noLinks.size()]; - noLinks.copyInto( newfiles ); + catch ( IOException ioe ) + { + String msg = "IOException caught while checking for links!"; + // will be caught and redirected to Ant's logging system + System.err.println( msg ); + } } - for ( int i = 0; i < newfiles.length; i++ ) + if ( filenameComparator != null ) { - String name = vpath + newfiles[i]; - File file = new File( dir, newfiles[i] ); + Arrays.sort( newfiles, filenameComparator ); + } + + for ( String newfile : newfiles ) + { + String name = vpath + newfile; + char[][] tokenizedName = MatchPattern.tokenizePathToCharArray( name, File.separator ); + File file = new File( dir, newfile ); if ( file.isDirectory() ) { - if ( isIncluded( name ) ) + + if ( isIncluded( name, tokenizedName ) ) { - if ( !isExcluded( name ) ) + if ( !isExcluded( name, tokenizedName ) ) { if ( isSelected( name, file ) ) { - dirsIncluded.addElement( name ); + dirsIncluded.add( name ); if ( fast ) { scandir( file, name + File.separator, fast ); @@ -486,7 +459,7 @@ protected void scandir( File dir, String vpath, boolean fast ) else { everythingIncluded = false; - dirsDeselected.addElement( name ); + dirsDeselected.add( name ); if ( fast && couldHoldIncluded( name ) ) { scandir( file, name + File.separator, fast ); @@ -497,7 +470,7 @@ protected void scandir( File dir, String vpath, boolean fast ) else { everythingIncluded = false; - dirsExcluded.addElement( name ); + dirsExcluded.add( name ); if ( fast && couldHoldIncluded( name ) ) { scandir( file, name + File.separator, fast ); @@ -507,7 +480,7 @@ protected void scandir( File dir, String vpath, boolean fast ) else { everythingIncluded = false; - dirsNotIncluded.addElement( name ); + dirsNotIncluded.add( name ); if ( fast && couldHoldIncluded( name ) ) { scandir( file, name + File.separator, fast ); @@ -520,30 +493,30 @@ protected void scandir( File dir, String vpath, boolean fast ) } else if ( file.isFile() ) { - if ( isIncluded( name ) ) + if ( isIncluded( name, tokenizedName ) ) { - if ( !isExcluded( name ) ) + if ( !isExcluded( name, tokenizedName ) ) { if ( isSelected( name, file ) ) { - filesIncluded.addElement( name ); + filesIncluded.add( name ); } else { everythingIncluded = false; - filesDeselected.addElement( name ); + filesDeselected.add( name ); } } else { everythingIncluded = false; - filesExcluded.addElement( name ); + filesExcluded.add( name ); } } else { everythingIncluded = false; - filesNotIncluded.addElement( name ); + filesNotIncluded.add( name ); } } } @@ -554,8 +527,8 @@ else if ( file.isFile() ) * * @param name the filename to check for selecting * @param file the java.io.File object for this filename - * @return false when the selectors says that the file - * should not be selected, true otherwise. + * @return false when the selectors says that the file should not be selected, true + * otherwise. */ protected boolean isSelected( String name, File file ) { @@ -563,164 +536,151 @@ protected boolean isSelected( String name, File file ) } /** - * Returns the names of the files which matched at least one of the - * include patterns and none of the exclude patterns. - * The names are relative to the base directory. + * Returns the names of the files which matched at least one of the include patterns and none of the exclude + * patterns. The names are relative to the base directory. * - * @return the names of the files which matched at least one of the - * include patterns and none of the exclude patterns. + * @return the names of the files which matched at least one of the include patterns and none of the exclude + * patterns. */ + @Override public String[] getIncludedFiles() { - String[] files = new String[filesIncluded.size()]; - filesIncluded.copyInto( files ); - return files; + return filesIncluded.toArray( EMPTY_STRING_ARRAY ); } /** - * Returns the names of the files which matched none of the include - * patterns. The names are relative to the base directory. This involves - * performing a slow scan if one has not already been completed. - * - * @return the names of the files which matched none of the include - * patterns. + * Returns the names of the files which matched none of the include patterns. The names are relative to the base + * directory. This involves performing a slow scan if one has not already been completed. * + * @return the names of the files which matched none of the include patterns. * @see #slowScan */ public String[] getNotIncludedFiles() { slowScan(); - String[] files = new String[filesNotIncluded.size()]; - filesNotIncluded.copyInto( files ); - return files; + return filesNotIncluded.toArray( EMPTY_STRING_ARRAY ); } /** - * Returns the names of the files which matched at least one of the - * include patterns and at least one of the exclude patterns. - * The names are relative to the base directory. This involves - * performing a slow scan if one has not already been completed. - * - * @return the names of the files which matched at least one of the - * include patterns and at at least one of the exclude patterns. + * Returns the names of the files which matched at least one of the include patterns and at least one of the exclude + * patterns. The names are relative to the base directory. This involves performing a slow scan if one has not + * already been completed. * + * @return the names of the files which matched at least one of the include patterns and at at least one of the + * exclude patterns. * @see #slowScan */ public String[] getExcludedFiles() { slowScan(); - String[] files = new String[filesExcluded.size()]; - filesExcluded.copyInto( files ); - return files; + return filesExcluded.toArray( EMPTY_STRING_ARRAY ); } /** - *

Returns the names of the files which were selected out and - * therefore not ultimately included.

- * - *

The names are relative to the base directory. This involves - * performing a slow scan if one has not already been completed.

+ *

Returns the names of the files which were selected out and therefore not ultimately included.

+ * + *

The names are relative to the base directory. This involves performing a slow scan if one has not already been + * completed.

* * @return the names of the files which were deselected. - * * @see #slowScan */ public String[] getDeselectedFiles() { slowScan(); - String[] files = new String[filesDeselected.size()]; - filesDeselected.copyInto( files ); - return files; + return filesDeselected.toArray( EMPTY_STRING_ARRAY ); } /** - * Returns the names of the directories which matched at least one of the - * include patterns and none of the exclude patterns. - * The names are relative to the base directory. + * Returns the names of the directories which matched at least one of the include patterns and none of the exclude + * patterns. The names are relative to the base directory. * - * @return the names of the directories which matched at least one of the - * include patterns and none of the exclude patterns. + * @return the names of the directories which matched at least one of the include patterns and none of the exclude + * patterns. */ + @Override public String[] getIncludedDirectories() { - String[] directories = new String[dirsIncluded.size()]; - dirsIncluded.copyInto( directories ); - return directories; + return dirsIncluded.toArray( EMPTY_STRING_ARRAY ); } /** - * Returns the names of the directories which matched none of the include - * patterns. The names are relative to the base directory. This involves - * performing a slow scan if one has not already been completed. - * - * @return the names of the directories which matched none of the include - * patterns. + * Returns the names of the directories which matched none of the include patterns. The names are relative to the + * base directory. This involves performing a slow scan if one has not already been completed. * + * @return the names of the directories which matched none of the include patterns. * @see #slowScan */ public String[] getNotIncludedDirectories() { slowScan(); - String[] directories = new String[dirsNotIncluded.size()]; - dirsNotIncluded.copyInto( directories ); - return directories; + return dirsNotIncluded.toArray( EMPTY_STRING_ARRAY ); } /** - * Returns the names of the directories which matched at least one of the - * include patterns and at least one of the exclude patterns. - * The names are relative to the base directory. This involves - * performing a slow scan if one has not already been completed. - * - * @return the names of the directories which matched at least one of the - * include patterns and at least one of the exclude patterns. + * Returns the names of the directories which matched at least one of the include patterns and at least one of the + * exclude patterns. The names are relative to the base directory. This involves performing a slow scan if one has + * not already been completed. * + * @return the names of the directories which matched at least one of the include patterns and at least one of the + * exclude patterns. * @see #slowScan */ public String[] getExcludedDirectories() { slowScan(); - String[] directories = new String[dirsExcluded.size()]; - dirsExcluded.copyInto( directories ); - return directories; + return dirsExcluded.toArray( EMPTY_STRING_ARRAY ); } /** - *

Returns the names of the directories which were selected out and - * therefore not ultimately included.

- * - *

The names are relative to the base directory. This involves - * performing a slow scan if one has not already been completed.

+ *

Returns the names of the directories which were selected out and therefore not ultimately included.

+ * + *

The names are relative to the base directory. This involves performing a slow scan if one has not already been + * completed.

* * @return the names of the directories which were deselected. - * * @see #slowScan */ public String[] getDeselectedDirectories() { slowScan(); - String[] directories = new String[dirsDeselected.size()]; - dirsDeselected.copyInto( directories ); - return directories; + return dirsDeselected.toArray( EMPTY_STRING_ARRAY ); } /** - * Checks whether a given file is a symbolic link. - * - *

It doesn't really test for symbolic links but whether the - * canonical and absolute paths of the file are identical - this - * may lead to false positives on some platforms.

+ *

Checks whether a given file is a symbolic link.

+ * + *

It doesn't really test for symbolic links but whether the canonical and absolute paths of the file are identical + * - this may lead to false positives on some platforms. + *

* * @param parent the parent directory of the file to test * @param name the name of the file to test. - * + * @return true if it's a symbolic link + * @throws java.io.IOException . * @since Ant 1.5 */ public boolean isSymbolicLink( File parent, String name ) throws IOException { - File resolvedParent = new File( parent.getCanonicalPath() ); - File toTest = new File( resolvedParent, name ); - return !toTest.getAbsolutePath().equals( toTest.getCanonicalPath() ); + return NioFiles.isSymbolicLink( new File( parent, name ) ); + } + + /** + *

Checks whether the parent of this file is a symbolic link.

+ * + *

For java versions prior to 7 It doesn't really test for symbolic links but whether the canonical and absolute + * paths of the file are identical - this may lead to false positives on some platforms.

+ * + * @param parent the parent directory of the file to test + * @param name the name of the file to test. + * @return true if it's a symbolic link + * @throws java.io.IOException . + * @since Ant 1.5 + */ + public boolean isParentSymbolicLink( File parent, String name ) + throws IOException + { + return NioFiles.isSymbolicLink( parent ); } } diff --git a/src/main/java/org/codehaus/plexus/util/DirectoryWalkListener.java b/src/main/java/org/codehaus/plexus/util/DirectoryWalkListener.java index a3bb5e2c..8e1fda24 100644 --- a/src/main/java/org/codehaus/plexus/util/DirectoryWalkListener.java +++ b/src/main/java/org/codehaus/plexus/util/DirectoryWalkListener.java @@ -19,8 +19,10 @@ import java.io.File; /** - * DirectoryWalkListener - * @version $Id$ + * Observes the actions of a {@link DirectoryWalker}. + * + * + * @see DirectoryWalker */ public interface DirectoryWalkListener { diff --git a/src/main/java/org/codehaus/plexus/util/DirectoryWalker.java b/src/main/java/org/codehaus/plexus/util/DirectoryWalker.java index 6f621b09..2ffa4b0a 100644 --- a/src/main/java/org/codehaus/plexus/util/DirectoryWalker.java +++ b/src/main/java/org/codehaus/plexus/util/DirectoryWalker.java @@ -24,7 +24,8 @@ /** * DirectoryWalker - * @version $Id$ + * + * */ public class DirectoryWalker { @@ -71,8 +72,7 @@ public DirStackEntry( File d, int length ) } /** - * Calculate the next percentage offset. - * Used by the next DirStackEntry. + * Calculate the next percentage offset. Used by the next DirStackEntry. * * @return the value for the next percentage offset. */ @@ -82,8 +82,7 @@ public double getNextPercentageOffset() } /** - * Calculate the next percentage size. - * Used by the next DirStackEntry. + * Calculate the next percentage size. Used by the next DirStackEntry. * * @return the value for the next percentage size. */ @@ -93,8 +92,7 @@ public double getNextPercentageSize() } /** - * The percentage of the DirStackEntry right now. - * Based on count, index, percentageOffset, and percentageSize. + * The percentage of the DirStackEntry right now. Based on count, index, percentageOffset, and percentageSize. * * @return the percentage right now. */ @@ -104,6 +102,7 @@ public int getPercentage() return (int) Math.floor( percentageOffset + ( percentageWithinDir * percentageSize ) ); } + @Override public String toString() { return "DirStackEntry[" + "dir=" + dir.getAbsolutePath() + ",count=" + count + ",index=" + index @@ -117,38 +116,38 @@ public String toString() private int baseDirOffset; - private Stack dirStack; + private Stack dirStack; - private List excludes; + private List excludes; - private List includes; + private List includes; private boolean isCaseSensitive = true; - private List listeners; + private List listeners; private boolean debugEnabled = false; public DirectoryWalker() { - this.includes = new ArrayList(); - this.excludes = new ArrayList(); - this.listeners = new ArrayList(); + includes = new ArrayList(); + excludes = new ArrayList(); + listeners = new ArrayList(); } public void addDirectoryWalkListener( DirectoryWalkListener listener ) { - this.listeners.add( listener ); + listeners.add( listener ); } public void addExclude( String exclude ) { - this.excludes.add( fixPattern( exclude ) ); + excludes.add( fixPattern( exclude ) ); } public void addInclude( String include ) { - this.includes.add( fixPattern( include ) ); + includes.add( fixPattern( include ) ); } /** @@ -156,52 +155,45 @@ public void addInclude( String include ) */ public void addSCMExcludes() { - String scmexcludes[] = DirectoryScanner.DEFAULTEXCLUDES; - for ( int i = 0; i < scmexcludes.length; i++ ) + String scmexcludes[] = AbstractScanner.DEFAULTEXCLUDES; + for ( String scmexclude : scmexcludes ) { - addExclude( scmexcludes[i] ); + addExclude( scmexclude ); } } private void fireStep( File file ) { - DirStackEntry dsEntry = (DirStackEntry) dirStack.peek(); + DirStackEntry dsEntry = dirStack.peek(); int percentage = dsEntry.getPercentage(); - Iterator it = this.listeners.iterator(); - while ( it.hasNext() ) + for ( Object listener1 : listeners ) { - DirectoryWalkListener listener = (DirectoryWalkListener) it.next(); + DirectoryWalkListener listener = (DirectoryWalkListener) listener1; listener.directoryWalkStep( percentage, file ); } } private void fireWalkFinished() { - Iterator it = this.listeners.iterator(); - while ( it.hasNext() ) + for ( DirectoryWalkListener listener1 : listeners ) { - DirectoryWalkListener listener = (DirectoryWalkListener) it.next(); - listener.directoryWalkFinished(); + listener1.directoryWalkFinished(); } } private void fireWalkStarting() { - Iterator it = this.listeners.iterator(); - while ( it.hasNext() ) + for ( DirectoryWalkListener listener1 : listeners ) { - DirectoryWalkListener listener = (DirectoryWalkListener) it.next(); - listener.directoryWalkStarting( this.baseDir ); + listener1.directoryWalkStarting( baseDir ); } } private void fireDebugMessage( String message ) { - Iterator it = this.listeners.iterator(); - while ( it.hasNext() ) + for ( DirectoryWalkListener listener1 : listeners ) { - DirectoryWalkListener listener = (DirectoryWalkListener) it.next(); - listener.debug( message ); + listener1.debug( message ); } } @@ -238,7 +230,7 @@ public File getBaseDir() /** * @return Returns the excludes. */ - public List getExcludes() + public List getExcludes() { return excludes; } @@ -246,28 +238,26 @@ public List getExcludes() /** * @return Returns the includes. */ - public List getIncludes() + public List getIncludes() { return includes; } private boolean isExcluded( String name ) { - return isMatch( this.excludes, name ); + return isMatch( excludes, name ); } private boolean isIncluded( String name ) { - return isMatch( this.includes, name ); + return isMatch( includes, name ); } - private boolean isMatch( List patterns, String name ) + private boolean isMatch( List patterns, String name ) { - Iterator it = patterns.iterator(); - while ( it.hasNext() ) + for ( String pattern1 : patterns ) { - String pattern = (String) it.next(); - if ( SelectorUtils.matchPath( pattern, name, isCaseSensitive ) ) + if ( SelectorUtils.matchPath( pattern1, name, isCaseSensitive ) ) { return true; } @@ -288,7 +278,7 @@ private String relativeToBaseDir( File file ) */ public void removeDirectoryWalkListener( DirectoryWalkListener listener ) { - this.listeners.remove( listener ); + listeners.remove( listener ); } /** @@ -311,7 +301,7 @@ public void scan() throw new IllegalStateException( "Scan Failure. BaseDir is not a directory." ); } - if ( this.includes.isEmpty() ) + if ( includes.isEmpty() ) { // default to include all. addInclude( "**" ); @@ -319,43 +309,43 @@ public void scan() if ( debugEnabled ) { - Iterator it; - StringBuffer dbg = new StringBuffer(); + Iterator it; + StringBuilder dbg = new StringBuilder(); dbg.append( "DirectoryWalker Scan" ); - dbg.append( "\n Base Dir: " ).append( this.baseDir.getAbsolutePath() ); + dbg.append( "\n Base Dir: " ).append( baseDir.getAbsolutePath() ); dbg.append( "\n Includes: " ); - it = this.includes.iterator(); + it = includes.iterator(); while ( it.hasNext() ) { - String include = (String) it.next(); + String include = it.next(); dbg.append( "\n - \"" ).append( include ).append( "\"" ); } dbg.append( "\n Excludes: " ); - it = this.excludes.iterator(); + it = excludes.iterator(); while ( it.hasNext() ) { - String exclude = (String) it.next(); + String exclude = it.next(); dbg.append( "\n - \"" ).append( exclude ).append( "\"" ); } fireDebugMessage( dbg.toString() ); } fireWalkStarting(); - dirStack = new Stack(); - scanDir( this.baseDir ); + dirStack = new Stack(); + scanDir( baseDir ); fireWalkFinished(); } private void scanDir( File dir ) { - File files[] = dir.listFiles(); + File[] files = dir.listFiles(); if ( files == null ) { return; } - DirStackEntry curStackEntry = new DirStackEntry( dir, files.length ); + DirectoryWalker.DirStackEntry curStackEntry = new DirectoryWalker.DirStackEntry( dir, files.length ); if ( dirStack.isEmpty() ) { curStackEntry.percentageOffset = 0; @@ -363,7 +353,7 @@ private void scanDir( File dir ) } else { - DirStackEntry previousStackEntry = (DirStackEntry) dirStack.peek(); + DirectoryWalker.DirStackEntry previousStackEntry = dirStack.peek(); curStackEntry.percentageOffset = previousStackEntry.getNextPercentageOffset(); curStackEntry.percentageSize = previousStackEntry.getNextPercentageSize(); } @@ -403,22 +393,20 @@ private void scanDir( File dir ) public void setBaseDir( File baseDir ) { this.baseDir = baseDir; - this.baseDirOffset = baseDir.getAbsolutePath().length(); + baseDirOffset = baseDir.getAbsolutePath().length(); } /** * @param entries The excludes to set. */ - public void setExcludes( List entries ) + public void setExcludes( List entries ) { - this.excludes.clear(); + excludes.clear(); if ( entries != null ) { - Iterator it = entries.iterator(); - while ( it.hasNext() ) + for ( String entry : entries ) { - String pattern = (String) it.next(); - this.excludes.add( fixPattern( pattern ) ); + excludes.add( fixPattern( entry ) ); } } } @@ -426,16 +414,14 @@ public void setExcludes( List entries ) /** * @param entries The includes to set. */ - public void setIncludes( List entries ) + public void setIncludes( List entries ) { - this.includes.clear(); + includes.clear(); if ( entries != null ) { - Iterator it = entries.iterator(); - while ( it.hasNext() ) + for ( String entry : entries ) { - String pattern = (String) it.next(); - this.includes.add( fixPattern( pattern ) ); + includes.add( fixPattern( entry ) ); } } } diff --git a/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java b/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java index d86c8844..540dbe98 100644 --- a/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java +++ b/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java @@ -1,3 +1,5 @@ +package org.codehaus.plexus.util; + /* ==================================================================== * The Apache Software License, Version 1.1 * @@ -17,11 +19,11 @@ * distribution. * * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: + * any, must include the following acknowledgement: * "This product includes software developed by the * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * Alternately, this acknowledgement may appear in the software itself, + * if and wherever such third-party acknowledgements normally appear. * * 4. The names "The Jakarta Project", "Commons", and "Apache Software * Foundation" must not be used to endorse or promote products derived @@ -51,7 +53,6 @@ * information on the Apache Software Foundation, please see * . */ -package org.codehaus.plexus.util; import java.io.PrintStream; import java.io.PrintWriter; @@ -67,71 +68,63 @@ import java.util.StringTokenizer; /** - *

ExceptionUtils provides utilities for manipulating - * Throwable objects.

+ *

+ * ExceptionUtils provides utilities for manipulating Throwable objects. + *

* * @author Daniel Rall * @author Dmitri Plotnikov * @author Stephen Colebourne * @since 1.0 - * @version $Id$ + * */ public class ExceptionUtils { /** - * Used when printing stack frames to denote the start of a - * wrapped exception. Package private for accessibility by test - * suite. + * Used when printing stack frames to denote the start of a wrapped exception. Package private for accessibility by + * test suite. */ static final String WRAPPED_MARKER = " [wrapped] "; /** - * The names of methods commonly used to access a wrapped - * exception. + * The names of methods commonly used to access a wrapped exception. */ - protected static String[] CAUSE_METHOD_NAMES = { - "getCause", - "getNextException", - "getTargetException", - "getException", - "getSourceException", - "getRootCause", - "getCausedByException", - "getNested" - }; + protected static String[] CAUSE_METHOD_NAMES = { "getCause", "getNextException", "getTargetException", + "getException", "getSourceException", "getRootCause", "getCausedByException", "getNested" }; /** - * Constructs a new ExceptionUtils. Protected to - * discourage instantiation. + * Constructs a new ExceptionUtils. Protected to discourage instantiation. */ protected ExceptionUtils() { } /** - *

Adds to the list of method names used in the search for Throwable - * objects.

+ *

+ * Adds to the list of method names used in the search for Throwable objects. + *

* - * @param methodName the methodName to add to the list, null and empty strings are ignored + * @param methodName the methodName to add to the list, null and empty strings are ignored */ public static void addCauseMethodName( String methodName ) { if ( methodName != null && methodName.length() > 0 ) { - List list = new ArrayList( Arrays.asList( CAUSE_METHOD_NAMES ) ); + List list = new ArrayList( Arrays.asList( CAUSE_METHOD_NAMES ) ); list.add( methodName ); - CAUSE_METHOD_NAMES = (String[]) list.toArray( new String[list.size()] ); + CAUSE_METHOD_NAMES = list.toArray( new String[0] ); } } /** - *

Introspects the specified Throwable to obtain the cause.

- * - *

The method searches for methods with specific names that return a - * Throwable object. This will pick up most wrapping exceptions, - * including those from JDK 1.4, and - * The method names can be added to using {@link #addCauseMethodName(String)}. - * The default list searched for are:

+ *

+ * Introspects the specified Throwable to obtain the cause. + *

+ *

+ * The method searches for methods with specific names that return a Throwable object. This will pick + * up most wrapping exceptions, including those from JDK 1.4, and The method names can be added to using + * {@link #addCauseMethodName(String)}. The default list searched for are: + *

*
    *
  • getCause() *
  • getNextException() @@ -142,11 +135,13 @@ public static void addCauseMethodName( String methodName ) *
  • getCausedByException() *
  • getNested() *
- * - *

In the absence of any such method, the object is inspected for a - * detail field assignable to a Throwable.

- * - *

If none of the above is found, returns null.

+ *

+ * In the absence of any such method, the object is inspected for a detail field assignable to a + * Throwable. + *

+ *

+ * If none of the above is found, returns null. + *

* * @param throwable The exception to introspect for a cause. * @return The cause of the Throwable. @@ -158,10 +153,12 @@ public static Throwable getCause( Throwable throwable ) } /** - *

Introspects the specified Throwable to obtain the cause - * using a supplied array of method names.

+ *

+ * Introspects the specified Throwable to obtain the cause using a supplied array of method names. + *

* * @param throwable The exception to introspect for a cause. + * @param methodNames the methods names to match * @return The cause of the Throwable. * @throws NullPointerException if the method names array is null or contains null * @throws NullPointerException if the throwable is null @@ -171,9 +168,9 @@ public static Throwable getCause( Throwable throwable, String[] methodNames ) Throwable cause = getCauseUsingWellKnownTypes( throwable ); if ( cause == null ) { - for ( int i = 0; i < methodNames.length; i++ ) + for ( String methodName : methodNames ) { - cause = getCauseUsingMethodName( throwable, methodNames[i] ); + cause = getCauseUsingMethodName( throwable, methodName ); if ( cause != null ) { break; @@ -189,11 +186,12 @@ public static Throwable getCause( Throwable throwable, String[] methodNames ) } /** - *

Walks through the exception chain to the last element -- the - * "root" of the tree -- using {@link #getCause(Throwable)}, and - * returns that exception.

+ *

+ * Walks through the exception chain to the last element -- the "root" of the tree -- using + * {@link #getCause(Throwable)}, and returns that exception. + *

* - * @param throwable the throwable to get the root cause for + * @param throwable the throwable to get the root cause for * @return The root cause of the Throwable. */ public static Throwable getRootCause( Throwable throwable ) @@ -211,13 +209,13 @@ public static Throwable getRootCause( Throwable throwable ) } /** - *

Uses instanceof checks to examine the exception, - * looking for well known types which could contain chained or - * wrapped exceptions.

+ *

+ * Uses instanceof checks to examine the exception, looking for well known types which could contain + * chained or wrapped exceptions. + *

* - * @param throwable the exception to examine - * @return The wrapped exception, or null if not - * found. + * @param throwable the exception to examine + * @return The wrapped exception, or null if not found. */ private static Throwable getCauseUsingWellKnownTypes( Throwable throwable ) { @@ -236,12 +234,13 @@ else if ( throwable instanceof InvocationTargetException ) } /** - *

Find a throwable by method name.

+ *

+ * Find a throwable by method name. + *

* - * @param throwable the exception to examine - * @param methodName the name of the method to find and invoke - * @return The wrapped exception, or null if not - * found. + * @param throwable the exception to examine + * @param methodName the name of the method to find and invoke + * @return The wrapped exception, or null if not found. */ private static Throwable getCauseUsingMethodName( Throwable throwable, String methodName ) { @@ -277,12 +276,13 @@ private static Throwable getCauseUsingMethodName( Throwable throwable, String me } /** - *

Find a throwable by field name.

+ *

+ * Find a throwable by field name. + *

* - * @param throwable the exception to examine - * @param fieldName the name of the attribute to examine - * @return The wrapped exception, or null if not - * found. + * @param throwable the exception to examine + * @param fieldName the name of the attribute to examine + * @return The wrapped exception, or null if not found. */ private static Throwable getCauseUsingFieldName( Throwable throwable, String fieldName ) { @@ -315,10 +315,11 @@ private static Throwable getCauseUsingFieldName( Throwable throwable, String fie } /** - *

Returns the number of Throwable objects in the - * exception chain.

+ *

+ * Returns the number of Throwable objects in the exception chain. + *

* - * @param throwable the exception to inspect + * @param throwable the exception to inspect * @return The throwable count. */ public static int getThrowableCount( Throwable throwable ) @@ -334,27 +335,32 @@ public static int getThrowableCount( Throwable throwable ) } /** - *

Returns the list of Throwable objects in the - * exception chain.

+ *

+ * Returns the list of Throwable objects in the exception chain. + *

* - * @param throwable the exception to inspect + * @param throwable the exception to inspect * @return The list of Throwable objects. */ public static Throwable[] getThrowables( Throwable throwable ) { - List list = new ArrayList(); + List list = new ArrayList<>(); while ( throwable != null ) { list.add( throwable ); - throwable = ExceptionUtils.getCause( throwable ); + throwable = getCause( throwable ); } - return (Throwable[]) list.toArray( new Throwable[list.size()] ); + return list.toArray( new Throwable[0] ); } /** - *

Delegates to {@link #indexOfThrowable(Throwable, Class, int)}, - * starting the search at the beginning of the exception chain.

- * + *

+ * Delegates to {@link #indexOfThrowable(Throwable, Class, int)}, starting the search at the beginning of the + * exception chain. + *

+ * @param throwable the exception to inspect + * @param type Class to look for + * @return index of the stack matching the type * @see #indexOfThrowable(Throwable, Class, int) */ public static int indexOfThrowable( Throwable throwable, Class type ) @@ -363,21 +369,18 @@ public static int indexOfThrowable( Throwable throwable, Class type ) } /** - *

Returns the (zero based) index, of the first - * Throwable that matches the specified type in the - * exception chain of Throwable objects with an index - * greater than or equal to the specified index, or - * -1 if the type is not found.

+ *

+ * Returns the (zero based) index, of the first Throwable that matches the specified type in the + * exception chain of Throwable objects with an index greater than or equal to the specified index, or + * -1 if the type is not found. + *

* - * @param throwable the exception to inspect - * @param type Class to look for - * @param fromIndex the (zero based) index of the starting - * position in the chain to be searched - * @return the first occurrence of the type in the chain, or - * -1 if the type is not found - * @throws IndexOutOfBoundsException If the fromIndex - * argument is negative or not less than the count of - * Throwables in the chain. + * @param throwable the exception to inspect + * @param type Class to look for + * @param fromIndex the (zero based) index of the starting position in the chain to be searched + * @return the first occurrence of the type in the chain, or -1 if the type is not found + * @throws IndexOutOfBoundsException If the fromIndex argument is negative or not less than the count + * of Throwables in the chain. */ public static int indexOfThrowable( Throwable throwable, Class type, int fromIndex ) { @@ -401,27 +404,27 @@ public static int indexOfThrowable( Throwable throwable, Class type, int fromInd } /** - * Prints a compact stack trace for the root cause of a throwable. - * The compact stack trace starts with the root cause and prints - * stack frames up to the place where it was caught and wrapped. - * Then it prints the wrapped exception and continues with stack frames - * until the wrapper exception is caught and wrapped again, etc. + * Prints a compact stack trace for the root cause of a throwable. The compact stack trace starts with the root + * cause and prints stack frames up to the place where it was caught and wrapped. Then it prints the wrapped + * exception and continues with stack frames until the wrapper exception is caught and wrapped again, etc. *

- * The method is equivalent to t.printStackTrace() for throwables - * that don't have nested causes. + * The method is equivalent to t.printStackTrace() for throwables that don't have nested causes. + * @param t the exception + * @param stream the stream */ public static void printRootCauseStackTrace( Throwable t, PrintStream stream ) { String trace[] = getRootCauseStackTrace( t ); - for ( int i = 0; i < trace.length; i++ ) + for ( String aTrace : trace ) { - stream.println( trace[i] ); + stream.println( aTrace ); } stream.flush(); } /** * Equivalent to printRootCauseStackTrace(t, System.err) + * @param t the exception */ public static void printRootCauseStackTrace( Throwable t ) { @@ -429,40 +432,41 @@ public static void printRootCauseStackTrace( Throwable t ) } /** - * Same as printRootCauseStackTrace(t, stream), except it takes - * a PrintWriter as an argument. + * Same as printRootCauseStackTrace(t, stream), except it takes a PrintWriter as an argument. + * @param t the cause + * @param writer the writer */ public static void printRootCauseStackTrace( Throwable t, PrintWriter writer ) { String trace[] = getRootCauseStackTrace( t ); - for ( int i = 0; i < trace.length; i++ ) + for ( String aTrace : trace ) { - writer.println( trace[i] ); + writer.println( aTrace ); } writer.flush(); } /** - * Creates a compact stack trace for the root cause of the supplied - * throwable. - * - * See printRootCauseStackTrace(Throwable t, PrintStream s) + * Creates a compact stack trace for the root cause of the supplied throwable. See + * printRootCauseStackTrace(Throwable t, PrintStream s) + * @param t the cause + * @return the Stack */ public static String[] getRootCauseStackTrace( Throwable t ) { - Throwable throwables[] = getThrowables( t ); + Throwable[] throwables = getThrowables( t ); int count = throwables.length; - ArrayList frames = new ArrayList(); - List nextTrace = getStackFrameList( throwables[count - 1] ); + ArrayList frames = new ArrayList<>(); + List nextTrace = getStackFrameList( throwables[count - 1] ); for ( int i = count; --i >= 0; ) { - List trace = nextTrace; + List trace = nextTrace; if ( i != 0 ) { nextTrace = getStackFrameList( throwables[i - 1] ); removeCommonFrames( trace, nextTrace ); } - if ( i == count - 1 ) + if ( i == ( count - 1 ) ) { frames.add( throwables[i].toString() ); } @@ -470,21 +474,21 @@ public static String[] getRootCauseStackTrace( Throwable t ) { frames.add( WRAPPED_MARKER + throwables[i].toString() ); } - for ( int j = 0; j < trace.size(); j++ ) + for ( String aTrace : trace ) { - frames.add( trace.get( j ) ); + frames.add( aTrace ); } } - return (String[]) frames.toArray( new String[0] ); + return frames.toArray( new String[0] ); } /** * Given two stack traces, removes common frames from the cause trace. * - * @param causeFrames stack trace of a cause throwable + * @param causeFrames stack trace of a cause throwable * @param wrapperFrames stack trace of a wrapper throwable */ - private static void removeCommonFrames( List causeFrames, List wrapperFrames ) + private static void removeCommonFrames( List causeFrames, List wrapperFrames ) { int causeFrameIndex = causeFrames.size() - 1; int wrapperFrameIndex = wrapperFrames.size() - 1; @@ -492,8 +496,8 @@ private static void removeCommonFrames( List causeFrames, List wrapperFrames ) { // Remove the frame from the cause trace if it is the same // as in the wrapper trace - String causeFrame = (String) causeFrames.get( causeFrameIndex ); - String wrapperFrame = (String) wrapperFrames.get( wrapperFrameIndex ); + String causeFrame = causeFrames.get( causeFrameIndex ); + String wrapperFrame = wrapperFrames.get( wrapperFrameIndex ); if ( causeFrame.equals( wrapperFrame ) ) { causeFrames.remove( causeFrameIndex ); @@ -504,12 +508,10 @@ private static void removeCommonFrames( List causeFrames, List wrapperFrames ) } /** - * A convenient way of extracting the stack trace from an - * exception. + * A convenient way of extracting the stack trace from an exception. * * @param t The Throwable. - * @return The stack trace as generated by the exception's - * printStackTrace(PrintWriter) method. + * @return The stack trace as generated by the exception's printStackTrace(PrintWriter) method. */ public static String getStackTrace( Throwable t ) { @@ -530,10 +532,10 @@ public static String getFullStackTrace( Throwable t ) StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter( sw, true ); Throwable[] ts = getThrowables( t ); - for ( int i = 0; i < ts.length; i++ ) + for ( Throwable t1 : ts ) { - ts[i].printStackTrace( pw ); - if ( isNestedThrowable( ts[i] ) ) + t1.printStackTrace( pw ); + if ( isNestedThrowable( t1 ) ) { break; } @@ -563,12 +565,11 @@ else if ( throwable instanceof InvocationTargetException ) return true; } - int sz = CAUSE_METHOD_NAMES.length; - for ( int i = 0; i < sz; i++ ) + for ( String CAUSE_METHOD_NAME : CAUSE_METHOD_NAMES ) { try { - Method method = throwable.getClass().getMethod( CAUSE_METHOD_NAMES[i], null ); + Method method = throwable.getClass().getMethod( CAUSE_METHOD_NAME, null ); if ( method != null ) { return true; @@ -601,12 +602,11 @@ else if ( throwable instanceof InvocationTargetException ) } /** - * Captures the stack trace associated with the specified - * Throwable object, decomposing it into a list of - * stack frames. + * Captures the stack trace associated with the specified Throwable object, decomposing it into a list + * of stack frames. * * @param t The Throwable. - * @return An array of strings describing each stack frame. + * @return An array of strings describing each stack frame. */ public static String[] getStackFrames( Throwable t ) { @@ -614,37 +614,33 @@ public static String[] getStackFrames( Throwable t ) } /** - * Functionality shared between the - * getStackFrames(Throwable) methods of this and the - * classes. + * Functionality shared between the getStackFrames(Throwable) methods of this and the classes. */ static String[] getStackFrames( String stackTrace ) { String linebreak = System.getProperty( "line.separator" ); StringTokenizer frames = new StringTokenizer( stackTrace, linebreak ); - List list = new LinkedList(); + List list = new LinkedList(); while ( frames.hasMoreTokens() ) { list.add( frames.nextToken() ); } - return (String[]) list.toArray( new String[]{ - } ); + return list.toArray( new String[0] ); } /** - * Produces a List of stack frames - the message is not included. - * This works in most cases - it will only fail if the exception message - * contains a line that starts with: " at". + * Produces a List of stack frames - the message is not included. This works in most cases - it will only fail if + * the exception message contains a line that starts with: " at". * * @param t is any throwable * @return List of stack frames */ - static List getStackFrameList( Throwable t ) + static List getStackFrameList( Throwable t ) { String stackTrace = getStackTrace( t ); String linebreak = System.getProperty( "line.separator" ); StringTokenizer frames = new StringTokenizer( stackTrace, linebreak ); - List list = new LinkedList(); + List list = new LinkedList(); boolean traceStarted = false; while ( frames.hasMoreTokens() ) { diff --git a/src/main/java/org/codehaus/plexus/util/Expand.java b/src/main/java/org/codehaus/plexus/util/Expand.java index 7f2534d9..5b195811 100644 --- a/src/main/java/org/codehaus/plexus/util/Expand.java +++ b/src/main/java/org/codehaus/plexus/util/Expand.java @@ -19,11 +19,11 @@ * distribution. * * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: + * any, must include the following acknowledgement: * "This product includes software developed by the * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * Alternately, this acknowledgement may appear in the software itself, + * if and wherever such third-party acknowledgements normally appear. * * 4. The names "The Jakarta Project", "Ant", and "Apache Software * Foundation" must not be used to endorse or promote products derived @@ -55,11 +55,11 @@ */ import java.io.File; -import java.io.FileInputStream; import java.io.FileNotFoundException; -import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import java.io.OutputStream; +import java.nio.file.Files; import java.util.Date; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; @@ -70,13 +70,13 @@ * @author costin@dnt.ro * @author Stefan Bodewig * @author Magesh Umasankar - * @since Ant 1.1 @ant.task category="packaging" name="unzip" name="unjar" - * name="unwar" - * @version $Id$ + * @since Ant 1.1 @ant.task category="packaging" name="unzip" name="unjar" name="unwar" + * */ public class Expand { - private File dest;//req + + private File dest;// req private File source;// req @@ -93,69 +93,37 @@ public void execute() expandFile( source, dest ); } - /* - * This method is to be overridden by extending unarchival tasks. - */ - /** - * Description of the Method - */ - protected void expandFile( File srcF, File dir ) + protected void expandFile( final File srcF, final File dir ) throws Exception { - ZipInputStream zis = null; - try + // code from WarExpand + try ( ZipInputStream zis = new ZipInputStream( Files.newInputStream( srcF.toPath() ) ) ) { - // code from WarExpand - zis = new ZipInputStream( new FileInputStream( srcF ) ); - ZipEntry ze = null; - - while ( ( ze = zis.getNextEntry() ) != null ) + for ( ZipEntry ze = zis.getNextEntry(); ze != null; ze = zis.getNextEntry() ) { - extractFile( srcF, - dir, zis, - ze.getName(), - new Date( ze.getTime() ), - ze.isDirectory() ); + extractFile( srcF, dir, zis, ze.getName(), new Date( ze.getTime() ), ze.isDirectory() ); } - - //log("expand complete", Project.MSG_VERBOSE); } catch ( IOException ioe ) { - throw new Exception("Error while expanding " + srcF.getPath(), ioe); - } - finally - { - if ( zis != null ) - { - try - { - zis.close(); - } - catch ( IOException e ) - { - } - } + throw new Exception( "Error while expanding " + srcF.getPath(), ioe ); } } - /** - * Description of the Method - */ - protected void extractFile( File srcF, - File dir, - InputStream compressedInputStream, - String entryName, - Date entryDate, - boolean isDirectory ) + protected void extractFile( File srcF, File dir, InputStream compressedInputStream, String entryName, + Date entryDate, boolean isDirectory ) throws Exception { File f = FileUtils.resolveFile( dir, entryName ); + + if ( !f.getAbsolutePath().startsWith( dir.getAbsolutePath() ) ) + { + throw new IOException( "Entry '" + entryName + "' outside the target directory." ); + } + try { - if ( !overwrite && f.exists() - && - f.lastModified() >= entryDate.getTime() ) + if ( !overwrite && f.exists() && f.lastModified() >= entryDate.getTime() ) { return; } @@ -170,34 +138,14 @@ protected void extractFile( File srcF, } else { - byte[] buffer = new byte[1024]; - int length = 0; - FileOutputStream fos = null; - try - { - fos = new FileOutputStream( f ); - - while ( ( length = - compressedInputStream.read( buffer ) ) >= 0 ) - { - fos.write( buffer, 0, length ); - } - - fos.close(); - fos = null; - } - finally + byte[] buffer = new byte[65536]; + + try ( OutputStream fos = Files.newOutputStream( f.toPath() ) ) { - if ( fos != null ) - { - try - { - fos.close(); - } - catch ( IOException e ) - { - } - } + for ( int length = compressedInputStream.read( buffer ); + length >= 0; + fos.write( buffer, 0, length ), length = compressedInputStream.read( buffer ) ) + ; } } @@ -211,8 +159,7 @@ protected void extractFile( File srcF, } /** - * Set the destination directory. File will be unzipped into the destination - * directory. + * Set the destination directory. File will be unzipped into the destination directory. * * @param d Path to the directory. */ @@ -232,11 +179,11 @@ public void setSrc( File s ) } /** - * Should we overwrite files in dest, even if they are newer than the - * corresponding entries in the archive? + * @param b Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive? */ public void setOverwrite( boolean b ) { overwrite = b; } + } diff --git a/src/main/java/org/codehaus/plexus/util/FastMap.java b/src/main/java/org/codehaus/plexus/util/FastMap.java index 1a932609..9bb9e82f 100644 --- a/src/main/java/org/codehaus/plexus/util/FastMap.java +++ b/src/main/java/org/codehaus/plexus/util/FastMap.java @@ -1,9 +1,10 @@ +package org.codehaus.plexus.util; + /* * J.A.D.E. Java(TM) Addition to Default Environment. * Latest release available at http://jade.dautelle.com/ * This class is public domain (not copyrighted). */ -package org.codehaus.plexus.util; import java.io.IOException; import java.io.ObjectInputStream; @@ -17,40 +18,44 @@ import java.util.Set; /** - *

This class represents a Map collection with real-time - * behavior. Unless the map's size exceeds its current capacity, - * no dynamic memory allocation is ever performed and response time is - * extremely fast and consistent.

- * - *

Our benchmark - * indicates that {@link FastMap#put FastMap.put(key, value)} is up to - * 5x faster than java.util.HashMap.put(key, value). - * This difference is mostly due to the cost of the Map.Entry - * allocations that {@link FastMap} avoids by recycling its entries - * (see note below).

- * - *

{@link FastMap} has a predictable iteration order, which is the order - * in which keys were inserted into the map (similar to - * java.util.LinkedHashMap collection class).

- * - *

Applications may change the resizing policy of {@link FastMap} - * by overriding the {@link #sizeChanged} method. For example, to improve - * predictability, automatic resizing can be disabled.

- * - *

This implementation is not synchronized. Multiple threads accessing - * or modifying the collection must be synchronized externally.

- * - *

Note: To avoid dynamic memory allocations, {@link FastMap} - * maintains an internal pool of Map.Entry objects. The size - * of the pool is determined by the map's capacity. When an entry is - * removed from the map, it is automatically restored to the pool.

+ *

+ * This class represents a Map collection with real-time behavior. Unless the map's size exceeds its + * current capacity, no dynamic memory allocation is ever performed and response time is extremely fast and + * consistent. + *

+ *

+ * Our benchmark indicates that {@link FastMap#put + * FastMap.put(key, value)} is up to 5x faster than java.util.HashMap.put(key, value). This + * difference is mostly due to the cost of the Map.Entry allocations that {@link FastMap} avoids by + * recycling its entries (see note below). + *

+ *

+ * {@link FastMap} has a predictable iteration order, which is the order in which keys were inserted into the map + * (similar to java.util.LinkedHashMap collection class). + *

+ *

+ * Applications may change the resizing policy of {@link FastMap} by overriding the {@link #sizeChanged} method. For + * example, to improve predictability, automatic resizing can be disabled. + *

+ *

+ * This implementation is not synchronized. Multiple threads accessing or modifying the collection must be synchronized + * externally. + *

+ *

+ * Note: To avoid dynamic memory allocations, {@link FastMap} maintains an internal pool of + * Map.Entry objects. The size of the pool is determined by the map's capacity. When an entry is removed + * from the map, it is automatically restored to the pool. + *

+ *

+ * This class is public domain (not copyrighted). + *

* - *

This class is public domain (not copyrighted).

- * - * @author Jean-Marie Dautelle + * @author Jean-Marie Dautelle * @version 5.3, October 31 2003 */ -public class FastMap implements Map, Cloneable, Serializable { +public class FastMap + implements Map, Cloneable, Serializable +{ /** * Holds the map's hash table. @@ -90,207 +95,227 @@ public class FastMap implements Map, Cloneable, Serializable { /** * Creates a {@link FastMap} with a capacity of 256 entries. */ - public FastMap() { - initialize(256); + public FastMap() + { + initialize( 256 ); } - + /** - * Creates a {@link FastMap}, copy of the specified Map. - * If the specified map is not an instance of {@link FastMap}, the - * newly created map has a capacity set to the specified map's size. - * The copy has the same order as the original, regardless of the original - * map's implementation:
+     * Creates a {@link FastMap}, copy of the specified Map. If the specified map is not an instance of
+     * {@link FastMap}, the newly created map has a capacity set to the specified map's size. The copy has the same
+     * order as the original, regardless of the original map's implementation:
+     * 
+     * 
      *     TreeMap dictionary = ...;
      *     FastMap dictionaryLookup = new FastMap(dictionary);
      * 
* - * @param map the map whose mappings are to be placed in this map. + * @param map the map whose mappings are to be placed in this map. */ - public FastMap(Map map) { - int capacity = (map instanceof FastMap) ? - ((FastMap)map).capacity() : map.size(); - initialize(capacity); - putAll(map); + public FastMap( Map map ) + { + int capacity = ( map instanceof FastMap ) ? ( (FastMap) map ).capacity() : map.size(); + initialize( capacity ); + putAll( map ); } /** - * Creates a {@link FastMap} with the specified capacity. Unless the - * capacity is exceeded, operations on this map do not allocate entries. - * For optimum performance, the capacity should be of the same order - * of magnitude or larger than the expected map's size. + * Creates a {@link FastMap} with the specified capacity. Unless the capacity is exceeded, operations on this map do + * not allocate entries. For optimum performance, the capacity should be of the same order of magnitude or larger + * than the expected map's size. * - * @param capacity the number of buckets in the hash table; it also - * defines the number of pre-allocated entries. + * @param capacity the number of buckets in the hash table; it also defines the number of pre-allocated entries. */ - public FastMap(int capacity) { - initialize(capacity); + public FastMap( int capacity ) + { + initialize( capacity ); } /** - * Returns the number of key-value mappings in this {@link FastMap}. + * Returns the number of key-value mappings in this {@link FastMap}. * * @return this map's size. */ - public int size() { + @Override + public int size() + { return _size; } /** - * Returns the capacity of this {@link FastMap}. The capacity defines - * the number of buckets in the hash table, as well as the maximum number - * of entries the map may contain without allocating memory. + * Returns the capacity of this {@link FastMap}. The capacity defines the number of buckets in the hash table, as + * well as the maximum number of entries the map may contain without allocating memory. * * @return this map's capacity. */ - public int capacity() { + public int capacity() + { return _capacity; } /** * Indicates if this {@link FastMap} contains no key-value mappings. * - * @return true if this map contains no key-value mappings; - * false otherwise. + * @return true if this map contains no key-value mappings; false otherwise. */ - public boolean isEmpty() { + @Override + public boolean isEmpty() + { return _size == 0; } /** - * Indicates if this {@link FastMap} contains a mapping for the specified - * key. + * Indicates if this {@link FastMap} contains a mapping for the specified key. * - * @param key the key whose presence in this map is to be tested. - * @return true if this map contains a mapping for the - * specified key; false otherwise. + * @param key the key whose presence in this map is to be tested. + * @return true if this map contains a mapping for the specified key; false otherwise. * @throws NullPointerException if the key is null. */ - public boolean containsKey(Object key) { - EntryImpl entry = _entries[keyHash(key) & _mask]; - while (entry != null) { - if (key.equals(entry._key) ) { + @Override + public boolean containsKey( Object key ) + { + EntryImpl entry = _entries[keyHash( key ) & _mask]; + while ( entry != null ) + { + if ( key.equals( entry._key ) ) + { return true; } entry = entry._next; } - return false; + return false; } /** - * Indicates if this {@link FastMap} maps one or more keys to the - * specified value. + * Indicates if this {@link FastMap} maps one or more keys to the specified value. * - * @param value the value whose presence in this map is to be tested. - * @return true if this map maps one or more keys to the - * specified value. + * @param value the value whose presence in this map is to be tested. + * @return true if this map maps one or more keys to the specified value. * @throws NullPointerException if the key is null. */ - public boolean containsValue(Object value) { + @Override + public boolean containsValue( Object value ) + { EntryImpl entry = _mapFirst; - while (entry != null) { - if (value.equals(entry._value) ) { + while ( entry != null ) + { + if ( value.equals( entry._value ) ) + { return true; } entry = entry._after; } - return false; + return false; } /** - * Returns the value to which this {@link FastMap} maps the specified key. + * Returns the value to which this {@link FastMap} maps the specified key. * - * @param key the key whose associated value is to be returned. - * @return the value to which this map maps the specified key, - * or null if there is no mapping for the key. + * @param key the key whose associated value is to be returned. + * @return the value to which this map maps the specified key, or null if there is no mapping for the + * key. * @throws NullPointerException if key is null. */ - public Object get(Object key) { - EntryImpl entry = _entries[keyHash(key) & _mask]; - while (entry != null) { - if (key.equals(entry._key) ) { + @Override + public V get( Object key ) + { + EntryImpl entry = _entries[keyHash( key ) & _mask]; + while ( entry != null ) + { + if ( key.equals( entry._key ) ) + { return entry._value; } entry = entry._next; } - return null; + return null; } - + /** - * Returns the entry with the specified key. + * Returns the entry with the specified key. * * @param key the key whose associated entry is to be returned. * @return the entry for the specified key or null if none. */ - public Map.Entry getEntry(Object key) { - EntryImpl entry = _entries[keyHash(key) & _mask]; - while (entry != null) { - if (key.equals(entry._key)) { + public Map.Entry getEntry( Object key ) + { + EntryImpl entry = _entries[keyHash( key ) & _mask]; + while ( entry != null ) + { + if ( key.equals( entry._key ) ) + { return entry; } entry = entry._next; } - return null; + return null; } /** - * Associates the specified value with the specified key in this - * {@link FastMap}. If the {@link FastMap} previously contained a mapping - * for this key, the old value is replaced. + * Associates the specified value with the specified key in this {@link FastMap}. If the {@link FastMap} previously + * contained a mapping for this key, the old value is replaced. * - * @param key the key with which the specified value is to be associated. - * @param value the value to be associated with the specified key. - * @return the previous value associated with specified key, - * or null if there was no mapping for key. - * A null return can also indicate that the map - * previously associated null with the specified key. + * @param key the key with which the specified value is to be associated. + * @param value the value to be associated with the specified key. + * @return the previous value associated with specified key, or null if there was no mapping for key. A + * null return can also indicate that the map previously associated null with the + * specified key. * @throws NullPointerException if the key is null. */ - public Object put(Object key, Object value) { - EntryImpl entry = _entries[keyHash(key) & _mask]; - while (entry != null) { - if (key.equals(entry._key) ) { - Object prevValue = entry._value; + @Override + public Object put( Object key, Object value ) + { + EntryImpl entry = _entries[keyHash( key ) & _mask]; + while ( entry != null ) + { + if ( key.equals( entry._key ) ) + { + Object prevValue = entry._value; entry._value = value; return prevValue; } entry = entry._next; } // No previous mapping. - addEntry(key, value); + addEntry( key, value ); return null; } /** - * Copies all of the mappings from the specified map to this - * {@link FastMap}. + * Copies all of the mappings from the specified map to this {@link FastMap}. * - * @param map the mappings to be stored in this map. - * @throws NullPointerException the specified map is null, or - * the specified map contains null keys. + * @param map the mappings to be stored in this map. + * @throws NullPointerException the specified map is null, or the specified map contains + * null keys. */ - public void putAll(Map map) { - for (Iterator i = map.entrySet().iterator(); i.hasNext(); ) { - Map.Entry e = (Map.Entry) i.next(); - addEntry(e.getKey(), e.getValue()); + @Override + public void putAll( Map map ) + { + for ( Entry entry : map.entrySet() ) + { + addEntry( entry.getKey(), entry.getValue() ); } } /** * Removes the mapping for this key from this {@link FastMap} if present. * - * @param key the key whose mapping is to be removed from the map. - * @return previous value associated with specified key, - * or null if there was no mapping for key. - * A null return can also indicate that the map - * previously associated null with the specified key. + * @param key the key whose mapping is to be removed from the map. + * @return previous value associated with specified key, or null if there was no mapping for key. A + * null return can also indicate that the map previously associated null with the + * specified key. * @throws NullPointerException if the key is null. */ - public Object remove(Object key) { - EntryImpl entry = _entries[keyHash(key) & _mask]; - while (entry != null) { - if (key.equals(entry._key) ) { - Object prevValue = entry._value; - removeEntry(entry); + @Override + public V remove( Object key ) + { + EntryImpl entry = _entries[keyHash( key ) & _mask]; + while ( entry != null ) + { + if ( key.equals( entry._key ) ) + { + V prevValue = entry._value; + removeEntry( entry ); return prevValue; } entry = entry._next; @@ -301,22 +326,29 @@ public Object remove(Object key) { /** * Removes all mappings from this {@link FastMap}. */ - public void clear() { + @Override + public void clear() + { // Clears all keys, values and buckets linked lists. - for (EntryImpl entry = _mapFirst; entry != null; entry = entry._after) { + for ( EntryImpl entry = _mapFirst; entry != null; entry = entry._after ) + { entry._key = null; entry._value = null; entry._before = null; entry._next = null; - if (entry._previous == null) { // First in bucket. + if ( entry._previous == null ) + { // First in bucket. _entries[entry._index] = null; - } else { + } + else + { entry._previous = null; } } - + // Recycles all entries. - if (_mapLast != null) { + if ( _mapLast != null ) + { _mapLast._after = _poolFirst; // Connects to pool. _poolFirst = _mapFirst; _mapFirst = null; @@ -327,24 +359,27 @@ public void clear() { } /** - * Changes the current capacity of this {@link FastMap}. If the capacity - * is increased, new entries are allocated and added to the pool. - * If the capacity is decreased, entries from the pool are deallocated - * (and are eventually garbage collected). The capacity also determined - * the number of buckets for the hash table. + * Changes the current capacity of this {@link FastMap}. If the capacity is increased, new entries are allocated and + * added to the pool. If the capacity is decreased, entries from the pool are deallocated (and are eventually + * garbage collected). The capacity also determined the number of buckets for the hash table. * * @param newCapacity the new capacity of this map. */ - public void setCapacity(int newCapacity) { - if (newCapacity > _capacity) { // Capacity increases. - for (int i = _capacity; i < newCapacity; i++) { + public void setCapacity( int newCapacity ) + { + if ( newCapacity > _capacity ) + { // Capacity increases. + for ( int i = _capacity; i < newCapacity; i++ ) + { EntryImpl entry = new EntryImpl(); entry._after = _poolFirst; _poolFirst = entry; } - } else if (newCapacity < _capacity) { // Capacity decreases. - for ( int i = newCapacity; - (i < _capacity) && (_poolFirst != null); i++) { + } + else if ( newCapacity < _capacity ) + { // Capacity decreases. + for ( int i = newCapacity; ( i < _capacity ) && ( _poolFirst != null ); i++ ) + { // Disconnects the entry for gc to do its work. EntryImpl entry = _poolFirst; _poolFirst = entry._after; @@ -353,29 +388,33 @@ public void setCapacity(int newCapacity) { } // Find a power of 2 >= capacity int tableLength = 16; - while (tableLength < newCapacity) { + while ( tableLength < newCapacity ) + { tableLength <<= 1; } // Checks if the hash table has to be re-sized. - if (_entries.length != tableLength) { + if ( _entries.length != tableLength ) + { _entries = new EntryImpl[tableLength]; _mask = tableLength - 1; - + // Repopulates the hash table. EntryImpl entry = _mapFirst; - while (entry != null) { - int index = keyHash(entry._key) & _mask; + while ( entry != null ) + { + int index = keyHash( entry._key ) & _mask; entry._index = index; - + // Connects to bucket. entry._previous = null; // Resets previous. EntryImpl next = _entries[index]; entry._next = next; - if (next != null) { + if ( next != null ) + { next._previous = entry; } _entries[index] = entry; - + entry = entry._after; } } @@ -383,51 +422,64 @@ public void setCapacity(int newCapacity) { } /** - * Returns a shallow copy of this {@link FastMap}. The keys and - * the values themselves are not cloned. + * Returns a shallow copy of this {@link FastMap}. The keys and the values themselves are not cloned. * * @return a shallow copy of this map. */ - public Object clone() { - try { + @Override + public Object clone() + { + try + { FastMap clone = (FastMap) super.clone(); - clone.initialize(_capacity); - clone.putAll(this); + clone.initialize( _capacity ); + clone.putAll( this ); return clone; - } catch (CloneNotSupportedException e) { + } + catch ( CloneNotSupportedException e ) + { // Should not happen, since we are Cloneable. throw new InternalError(); } } /** - * Compares the specified object with this {@link FastMap} for equality. - * Returns true if the given object is also a map and the two - * maps represent the same mappings (regardless of collection iteration - * order). + * Compares the specified object with this {@link FastMap} for equality. Returns true if the given + * object is also a map and the two maps represent the same mappings (regardless of collection iteration order). * * @param obj the object to be compared for equality with this map. - * @return true if the specified object is equal to this map; - * false otherwise. + * @return true if the specified object is equal to this map; false otherwise. */ - public boolean equals(Object obj) { - if (obj == this) { + @Override + public boolean equals( Object obj ) + { + if ( obj == this ) + { return true; - } else if (obj instanceof Map) { + } + else if ( obj instanceof Map ) + { Map that = (Map) obj; - if (this.size() == that.size()) { + if ( this.size() == that.size() ) + { EntryImpl entry = _mapFirst; - while (entry != null) { - if (!that.entrySet().contains(entry)) { + while ( entry != null ) + { + if ( !that.entrySet().contains( entry ) ) + { return false; } entry = entry._after; } return true; - } else { + } + else + { return false; } - } else { + } + else + { return false; } } @@ -437,10 +489,13 @@ public boolean equals(Object obj) { * * @return the hash code value for this map. */ - public int hashCode() { + @Override + public int hashCode() + { int code = 0; EntryImpl entry = _mapFirst; - while (entry != null) { + while ( entry != null ) + { code += entry.hashCode(); entry = entry._after; } @@ -452,111 +507,165 @@ public int hashCode() { * * @return this.entrySet().toString(); */ - public String toString() { + @Override + public String toString() + { return entrySet().toString(); } /** - * Returns a collection view of the values contained in this - * {@link FastMap}. The collection is backed by the map, so changes to - * the map are reflected in the collection, and vice-versa. - * The collection supports element removal, which removes the corresponding - * mapping from this map, via the - * Iterator.remove, Collection.remove, - * removeAll, retainAll, - * and clear operations. It does not support the - * add or addAll operations. + * Returns a collection view of the values contained in this {@link FastMap}. The collection is backed by the map, + * so changes to the map are reflected in the collection, and vice-versa. The collection supports element removal, + * which removes the corresponding mapping from this map, via the Iterator.remove, + * Collection.remove, removeAll, retainAll, and clear + * operations. It does not support the add or addAll operations. * * @return a collection view of the values contained in this map. */ - public Collection values() { + @Override + public Collection values() + { return _values; } + private transient Values _values; - private class Values extends AbstractCollection { - public Iterator iterator() { - return new Iterator() { + + private class Values + extends AbstractCollection + { + @Override + public Iterator iterator() + { + return new Iterator() + { EntryImpl after = _mapFirst; + EntryImpl before; - public void remove() { - removeEntry(before); + + @Override + public void remove() + { + removeEntry( before ); } - public boolean hasNext() { + + @Override + public boolean hasNext() + { return after != null; } - public Object next() { + + @Override + public Object next() + { before = after; after = after._after; return before._value; } }; } - public int size() { + + @Override + public int size() + { return _size; } - public boolean contains(Object o) { - return containsValue(o); + + @Override + public boolean contains( Object o ) + { + return containsValue( o ); } - public void clear() { + + @Override + public void clear() + { FastMap.this.clear(); } } /** - * Returns a collection view of the mappings contained in this - * {@link FastMap}. Each element in the returned collection is a - * Map.Entry. The collection is backed by the map, - * so changes to the map are reflected in the collection, and vice-versa. - * The collection supports element removal, which removes the corresponding - * mapping from this map, via the - * Iterator.remove, Collection.remove, - * removeAll, retainAll, - * and clear operations. It does not support the + * Returns a collection view of the mappings contained in this {@link FastMap}. Each element in the returned + * collection is a Map.Entry. The collection is backed by the map, so changes to the map are reflected + * in the collection, and vice-versa. The collection supports element removal, which removes the corresponding + * mapping from this map, via the Iterator.remove, Collection.remove, + * removeAll, retainAll, and clear operations. It does not support the * add or addAll operations. * * @return a collection view of the mappings contained in this map. */ - public Set entrySet() { + @Override + public Set entrySet() + { return _entrySet; } + private transient EntrySet _entrySet; - private class EntrySet extends AbstractSet { - public Iterator iterator() { - return new Iterator() { + + private class EntrySet + extends AbstractSet + { + @Override + public Iterator iterator() + { + return new Iterator() + { EntryImpl after = _mapFirst; + EntryImpl before; - public void remove() { - removeEntry(before); + + @Override + public void remove() + { + removeEntry( before ); } - public boolean hasNext() { + + @Override + public boolean hasNext() + { return after != null; } - public Object next() { + + @Override + public Object next() + { before = after; after = after._after; return before; } }; } - public int size() { + + @Override + public int size() + { return _size; } - public boolean contains(Object obj) { // Optimization. - if (obj instanceof Map.Entry) { + + @Override + public boolean contains( Object obj ) + { // Optimization. + if ( obj instanceof Map.Entry ) + { Map.Entry entry = (Map.Entry) obj; - Map.Entry mapEntry = getEntry(entry.getKey()); - return entry.equals(mapEntry); - } else { + Map.Entry mapEntry = getEntry( entry.getKey() ); + return entry.equals( mapEntry ); + } + else + { return false; - } - } - public boolean remove(Object obj) { // Optimization. - if (obj instanceof Map.Entry) { - Map.Entry entry = (Map.Entry)obj; - EntryImpl mapEntry = (EntryImpl) getEntry(entry.getKey()); - if ((mapEntry != null) && - (entry.getValue()).equals(mapEntry._value)) { - removeEntry(mapEntry); + } + } + + @Override + public boolean remove( Object obj ) + { // Optimization. + if ( obj instanceof Map.Entry ) + { + Map.Entry entry = (Map.Entry) obj; + EntryImpl mapEntry = (EntryImpl) getEntry( entry.getKey() ); + if ( ( mapEntry != null ) && ( entry.getValue() ).equals( mapEntry._value ) ) + { + removeEntry( mapEntry ); return true; } } @@ -565,127 +674,170 @@ public boolean remove(Object obj) { // Optimization. } /** - * Returns a set view of the keys contained in this {@link FastMap}. - * The set is backed by the map, so changes to the map are reflected - * in the set, and vice-versa. The set supports element removal, - * which removes the corresponding mapping from this map, via the - * Iterator.remove, Collection.remove, - * removeAll, retainAll, - * and clear operations. It does not support the + * Returns a set view of the keys contained in this {@link FastMap}. The set is backed by the map, so changes to the + * map are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding + * mapping from this map, via the Iterator.remove, Collection.remove, + * removeAll, retainAll, and clear operations. It does not support the * add or addAll operations. * * @return a set view of the keys contained in this map. */ - public Set keySet() { + @Override + public Set keySet() + { return _keySet; } + private transient KeySet _keySet; - private class KeySet extends AbstractSet { - public Iterator iterator() { - return new Iterator() { + + private class KeySet + extends AbstractSet + { + @Override + public Iterator iterator() + { + return new Iterator() + { EntryImpl after = _mapFirst; + EntryImpl before; - public void remove() { - removeEntry(before); + + @Override + public void remove() + { + removeEntry( before ); } - public boolean hasNext() { + + @Override + public boolean hasNext() + { return after != null; } - public Object next() { + + @Override + public Object next() + { before = after; after = after._after; return before._key; } }; } - public int size() { + + @Override + public int size() + { return _size; } - public boolean contains(Object obj) { // Optimization. - return FastMap.this.containsKey(obj); + + @Override + public boolean contains( Object obj ) + { // Optimization. + return FastMap.this.containsKey( obj ); } - public boolean remove(Object obj) { // Optimization. - return FastMap.this.remove(obj) != null; + + @Override + public boolean remove( Object obj ) + { // Optimization. + return FastMap.this.remove( obj ) != null; } - public void clear() { // Optimization. + + @Override + public void clear() + { // Optimization. FastMap.this.clear(); } } - + /** - * This methods is being called when the size of this {@link FastMap} - * has changed. The default behavior is to double the map's capacity - * when the map's size reaches the current map's capacity. - * Sub-class may override this method to implement custom resizing - * policies or to disable automatic resizing. For example:
-     *     Map fixedCapacityMap = new FastMap(256) { 
-     *           protected sizeChanged() {
-     *               // Do nothing, automatic resizing disabled.
-     *           }
-     *     };
+ * This methods is being called when the size of this {@link FastMap} has changed. The default behavior is to double + * the map's capacity when the map's size reaches the current map's capacity. Sub-class may override this method to + * implement custom resizing policies or to disable automatic resizing. For example: + * + *
+     * Map fixedCapacityMap = new FastMap( 256 )
+     * {
+     *     protected sizeChanged()
+     *     {
+     *         // Do nothing, automatic resizing disabled.
+     *     }
+     * };
+     * 
+ * * @see #setCapacity */ - protected void sizeChanged() { - if (size() > capacity()) { - setCapacity(capacity() * 2); + protected void sizeChanged() + { + if ( size() > capacity() ) + { + setCapacity( capacity() * 2 ); } } - + /** - * Returns the hash code for the specified key. The formula being used - * is identical to the formula used by java.util.HashMap - * (ensures similar behavior for ill-conditioned hashcode keys). + * Returns the hash code for the specified key. The formula being used is identical to the formula used by + * java.util.HashMap (ensures similar behavior for ill-conditioned hashcode keys). * * @param key the key to calculate the hashcode for. * @return the hash code for the specified key. */ - private static int keyHash(Object key) { + private static int keyHash( Object key ) + { // From HashMap.hash(Object) function. int hashCode = key.hashCode(); - hashCode += ~(hashCode << 9); - hashCode ^= (hashCode >>> 14); - hashCode += (hashCode << 4); - hashCode ^= (hashCode >>> 10); + hashCode += ~( hashCode << 9 ); + hashCode ^= ( hashCode >>> 14 ); + hashCode += ( hashCode << 4 ); + hashCode ^= ( hashCode >>> 10 ); return hashCode; } - + /** * Adds a new entry for the specified key and value. + * * @param key the entry's key. * @param value the entry's value. */ - private void addEntry(Object key, Object value) { + private void addEntry( Object key, Object value ) + { EntryImpl entry = _poolFirst; - if (entry != null) { + if ( entry != null ) + { _poolFirst = entry._after; entry._after = null; - } else { // Pool empty. + } + else + { // Pool empty. entry = new EntryImpl(); } - - // Setup entry paramters. + + // Setup entry parameters. entry._key = key; entry._value = value; - int index = keyHash(key) & _mask; + int index = keyHash( key ) & _mask; entry._index = index; - + // Connects to bucket. EntryImpl next = _entries[index]; entry._next = next; - if (next != null) { + if ( next != null ) + { next._previous = entry; } _entries[index] = entry; - + // Connects to collection. - if (_mapLast != null) { + if ( _mapLast != null ) + { entry._before = _mapLast; _mapLast._after = entry; - } else { + } + else + { _mapFirst = entry; } _mapLast = entry; - + // Updates size. _size++; sizeChanged(); @@ -696,34 +848,45 @@ private void addEntry(Object key, Object value) { * * @param entry the entry to be removed. */ - private void removeEntry(EntryImpl entry) { - + private void removeEntry( EntryImpl entry ) + { + // Removes from bucket. EntryImpl previous = entry._previous; EntryImpl next = entry._next; - if (previous != null) { + if ( previous != null ) + { previous._next = next; entry._previous = null; - } else { // First in bucket. + } + else + { // First in bucket. _entries[entry._index] = next; } - if (next != null) { + if ( next != null ) + { next._previous = previous; entry._next = null; } // Else do nothing, no last pointer. - + // Removes from collection. EntryImpl before = entry._before; EntryImpl after = entry._after; - if (before != null) { + if ( before != null ) + { before._after = after; entry._before = null; - } else { // First in collection. + } + else + { // First in collection. _mapFirst = after; } - if (after != null) { + if ( after != null ) + { after._before = before; - } else { // Last in collection. + } + else + { // Last in collection. _mapLast = before; } @@ -734,23 +897,24 @@ private void removeEntry(EntryImpl entry) { // Recycles. entry._after = _poolFirst; _poolFirst = entry; - + // Updates size. _size--; sizeChanged(); } /** - * Initializes this instance for the specified capacity. - * Once initialized, operations on this map should not create new objects - * (unless the map's size exceeds the specified capacity). - * + * Initializes this instance for the specified capacity. Once initialized, operations on this map should not create + * new objects (unless the map's size exceeds the specified capacity). + * * @param capacity the initial capacity. */ - private void initialize(int capacity) { + private void initialize( int capacity ) + { // Find a power of 2 >= capacity int tableLength = 16; - while (tableLength < capacity) { + while ( tableLength < capacity ) + { tableLength <<= 1; } // Allocates hash table. @@ -767,72 +931,80 @@ private void initialize(int capacity) { _mapFirst = null; _mapLast = null; // Allocates entries. - for (int i=0; i < capacity; i++) { - EntryImpl entry = new EntryImpl(); - entry._after = _poolFirst; - _poolFirst = entry; + for ( int i = 0; i < capacity; i++ ) + { + EntryImpl entry = new EntryImpl(); + entry._after = _poolFirst; + _poolFirst = entry; } } - + /** * Requires special handling during de-serialization process. * - * @param stream the object input stream. + * @param stream the object input stream. * @throws IOException if an I/O error occurs. - * @throws ClassNotFoundException if the class for the object de-serialized - * is not found. + * @throws ClassNotFoundException if the class for the object de-serialized is not found. */ - private void readObject(ObjectInputStream stream) - throws IOException, ClassNotFoundException { + private void readObject( ObjectInputStream stream ) + throws IOException, ClassNotFoundException + { int capacity = stream.readInt(); - initialize(capacity); + initialize( capacity ); int size = stream.readInt(); - for (int i=0; i < size; i++) { + for ( int i = 0; i < size; i++ ) + { Object key = stream.readObject(); Object value = stream.readObject(); - addEntry(key, value); + addEntry( key, value ); } } - + /** * Requires special handling during serialization process. * - * @param stream the object output stream. + * @param stream the object output stream. * @throws IOException if an I/O error occurs. */ - private void writeObject(ObjectOutputStream stream) throws IOException { - stream.writeInt(_capacity); - stream.writeInt(_size); + private void writeObject( ObjectOutputStream stream ) + throws IOException + { + stream.writeInt( _capacity ); + stream.writeInt( _size ); int count = 0; EntryImpl entry = _mapFirst; - while (entry != null) { - stream.writeObject(entry._key); - stream.writeObject(entry._value); + while ( entry != null ) + { + stream.writeObject( entry._key ); + stream.writeObject( entry._value ); count++; entry = entry._after; } - if (count != _size) { - throw new IOException("FastMap Corrupted"); + if ( count != _size ) + { + throw new IOException( "FastMap Corrupted" ); } } - + /** * This class represents a {@link FastMap} entry. */ - private static final class EntryImpl implements Map.Entry { + private static final class EntryImpl + implements Map.Entry + { /** * Holds the entry key (null when in pool). */ - private Object _key; - + private K _key; + /** * Holds the entry value (null when in pool). */ - private Object _value; + private V _value; /** - * Holds the bucket index (undefined when in pool). + * Holds the bucket index (undefined when in pool). */ private int _index; @@ -852,8 +1024,7 @@ private static final class EntryImpl implements Map.Entry { private EntryImpl _before; /** - * Holds the entry added after this entry - * or the next available entry when in pool. + * Holds the entry added after this entry or the next available entry when in pool. */ private EntryImpl _after; @@ -862,7 +1033,9 @@ private static final class EntryImpl implements Map.Entry { * * @return the entry's key. */ - public Object getKey() { + @Override + public K getKey() + { return _key; } @@ -871,9 +1044,11 @@ public Object getKey() { * * @return the entry's value. */ - public Object getValue() { + @Override + public V getValue() + { return _value; - } + } /** * Sets the value for this entry. @@ -881,28 +1056,31 @@ public Object getValue() { * @param value the new value. * @return the previous value. */ - public Object setValue(Object value) { - Object old = _value; + @Override + public V setValue( V value ) + { + V old = _value; _value = value; return old; - } + } /** - * Indicates if this entry is considered equals to the specified - * entry. + * Indicates if this entry is considered equals to the specified entry. * * @param that the object to test for equality. - * @return true if both entry are considered equal; - * false otherwise. + * @return true if both entry are considered equal; false otherwise. */ - public boolean equals(Object that) { - if (that instanceof Map.Entry) { + @Override + public boolean equals( Object that ) + { + if ( that instanceof Map.Entry ) + { Map.Entry entry = (Map.Entry) that; - return (_key.equals(entry.getKey())) && - ((_value != null) ? - _value.equals(entry.getValue()) : - (entry.getValue() == null)); - } else { + return ( _key.equals( entry.getKey() ) ) + && ( ( _value != null ) ? _value.equals( entry.getValue() ) : ( entry.getValue() == null ) ); + } + else + { return false; } } @@ -912,16 +1090,20 @@ public boolean equals(Object that) { * * @return this entry's hash code. */ - public int hashCode() { - return _key.hashCode() ^ ((_value != null) ? _value.hashCode() : 0); - } + @Override + public int hashCode() + { + return _key.hashCode() ^ ( ( _value != null ) ? _value.hashCode() : 0 ); + } /** * Returns the text representation of this entry. * * @return this entry's textual representation. */ - public String toString() { + @Override + public String toString() + { return _key + "=" + _value; } } diff --git a/src/main/java/org/codehaus/plexus/util/FileUtils.java b/src/main/java/org/codehaus/plexus/util/FileUtils.java index c04d747b..cac82ba3 100644 --- a/src/main/java/org/codehaus/plexus/util/FileUtils.java +++ b/src/main/java/org/codehaus/plexus/util/FileUtils.java @@ -55,37 +55,35 @@ * */ +import org.codehaus.plexus.util.io.InputStreamFacade; +import org.codehaus.plexus.util.io.URLInputStreamFacade; + import java.io.BufferedReader; import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.FileReader; -import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Reader; import java.io.Writer; import java.net.URL; +import java.nio.charset.Charset; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; import java.security.SecureRandom; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Arrays; -import java.util.Iterator; import java.util.List; import java.util.Random; -import java.util.Vector; - -import org.codehaus.plexus.util.io.FileInputStreamFacade; -import org.codehaus.plexus.util.io.InputStreamFacade; -import org.codehaus.plexus.util.io.URLInputStreamFacade; /** - * This class provides basic facilities for manipulating files and file paths. - *

- *

Path-related methods

- *

+ *

This class provides basic facilities for manipulating files and file paths.

+ * + * Path-related methods + * *

Methods exist to retrieve the components of a typical file path. For example * /www/hosted/mysite/index.html, can be broken into: *

    @@ -94,26 +92,19 @@ *
  • /www/hosted/mysite/index -- retrievable through {@link #removeExtension}
  • *
  • html -- retrievable through {@link #getExtension}
  • *
- * There are also methods to {@link #catPath concatenate two paths}, {@link #resolveFile resolve a - * path relative to a File} and {@link #normalize} a path. - *

- *

- *

File-related methods

- *

- * There are methods to create a {@link #toFile File from a URL}, copy a - * {@link #copyFileToDirectory File to a directory}, - * copy a {@link #copyFile File to another File}, - * copy a {@link #copyURLToFile URL's contents to a File}, - * as well as methods to {@link #deleteDirectory(File) delete} and {@link #cleanDirectory(File) - * clean} a directory. - *

- *

- * Common {@link java.io.File} manipulation routines. - *

- * Taken from the commons-utils repo. - * Also code from Alexandria's FileUtils. - * And from Avalon Excalibur's IO. - * And from Ant. + *

There are also methods to {@link #catPath concatenate two paths}, {@link #resolveFile resolve a path relative to a + * File} and {@link #normalize} a path.

+ + * File-related methods + * + *

There are methods to create a {@link #toFile File from a URL}, copy a {@link #copyFileToDirectory File to a + * directory}, copy a {@link #copyFile File to another File}, copy a {@link #copyURLToFile URL's contents to a File}, as + * well as methods to {@link #deleteDirectory(File) delete} and {@link #cleanDirectory(File) clean} a directory.

+ * + *

Common {@link java.io.File} manipulation routines.

+ * + *

Taken from the commons-utils repo. Also code from Alexandria's FileUtils. And from Avalon Excalibur's IO. And from + * Ant.

* * @author Kevin A. Burton * @author Scott Sanders @@ -121,7 +112,7 @@ * @author Christoph.Reck * @author Peter Donald * @author Jeff Turner - * @version $Id$ + * */ public class FileUtils { @@ -140,14 +131,16 @@ public class FileUtils */ public static final int ONE_GB = ONE_KB * ONE_MB; - /** The vm line separator */ - public static String FS = System.getProperty( "file.separator" ); + /** + * The vm file separator + */ + public static String FS = File.separator; /** * Non-valid Characters for naming files, folders under Windows: ":", "*", "?", "\"", "<", ">", "|" * * @see - * http://support.microsoft.com/?scid=kb%3Ben-us%3B177506&x=12&y=13 + * http://support.microsoft.com/?scid=kb%3Ben-us%3B177506&x=12&y=13 */ private static final String[] INVALID_CHARACTERS_FOR_WINDOWS_FILE_NAME = { ":", "*", "?", "\"", "<", ">", "|" }; @@ -164,7 +157,7 @@ public static String[] getDefaultExcludes() * @return the default excludes pattern as list. * @see #getDefaultExcludes() */ - public static List getDefaultExcludesAsList() + public static List getDefaultExcludesAsList() { return Arrays.asList( getDefaultExcludes() ); } @@ -180,8 +173,7 @@ public static String getDefaultExcludesAsString() } /** - * Returns a human-readable version of the file size (original is in - * bytes). + * Returns a human-readable version of the file size (original is in bytes). * * @param size The number of bytes. * @return A human-readable display value (includes units). @@ -211,8 +203,7 @@ else if ( size / ONE_KB > 0 ) } /** - * Returns the directory path portion of a file specification string. - * Matches the equally named unix command. + * Returns the directory path portion of a file specification string. Matches the equally named unix command. * * @param filename the file path * @return The directory portion excluding the ending file separator. @@ -236,8 +227,7 @@ public static String filename( String filename ) } /** - * Returns the filename portion of a file specification string. - * Matches the equally named unix command. + * Returns the filename portion of a file specification string. Matches the equally named unix command. * * @param filename the file path * @return The filename string without extension. @@ -248,8 +238,7 @@ public static String basename( String filename ) } /** - * Returns the filename portion of a file specification string. - * Matches the equally named unix command. + * Returns the filename portion of a file specification string. Matches the equally named unix command. * * @param filename the file path * @param suffix the file suffix @@ -275,9 +264,8 @@ else if ( i > 0 ) } /** - * Returns the extension portion of a file specification string. - * This everything after the last dot '.' in the filename (NOT including - * the dot). + * Returns the extension portion of a file specification string. This everything after the last dot '.' in the + * filename (NOT including the dot). * * @param filename the file path * @return the extension of the file @@ -300,7 +288,7 @@ public static String extension( String filename ) } } - if ( lastDot >= 0 && lastDot > lastSep) + if ( lastDot >= 0 && lastDot > lastSep ) { return filename.substring( lastDot + 1 ); } @@ -355,7 +343,7 @@ public static String fileRead( String file, String encoding ) public static String fileRead( File file ) throws IOException { - return fileRead( file, null); + return fileRead( file, null ); } /** @@ -367,38 +355,36 @@ public static String fileRead( File file ) public static String fileRead( File file, String encoding ) throws IOException { - StringBuffer buf = new StringBuffer(); - - Reader reader = null; + StringBuilder buf = new StringBuilder(); - try + try ( Reader reader = getInputStreamReader( file, encoding ) ) { - if ( encoding != null ) - { - reader = new InputStreamReader( new FileInputStream( file ), encoding ); - } - else - { - reader = new InputStreamReader( new FileInputStream( file ) ); - } int count; char[] b = new char[512]; - while ( ( count = reader.read( b ) ) > 0 ) // blocking read + while ( ( count = reader.read( b ) ) >= 0 ) // blocking read { buf.append( b, 0, count ); } } - finally - { - IOUtil.close( reader ); - } return buf.toString(); } + private static InputStreamReader getInputStreamReader( File file, String encoding ) throws IOException + { + if ( encoding != null ) + { + return new InputStreamReader( Files.newInputStream( file.toPath() ), encoding ); + } + else + { + return new InputStreamReader( Files.newInputStream( file.toPath() ) ); + } + } + /** - * Appends data to a file. The file will be created if it does not exist. - * Note: the data is written with platform encoding + * Appends data to a file. The file will be created if it does not exist. Note: the data is written with platform + * encoding * * @param fileName The path of the file to write. * @param data The content to write to the file. @@ -407,7 +393,7 @@ public static String fileRead( File file, String encoding ) public static void fileAppend( String fileName, String data ) throws IOException { - fileAppend( fileName, null, data); + fileAppend( fileName, null, data ); } /** @@ -421,11 +407,10 @@ public static void fileAppend( String fileName, String data ) public static void fileAppend( String fileName, String encoding, String data ) throws IOException { - FileOutputStream out = null; - try + try ( OutputStream out = Files.newOutputStream( Paths.get(fileName), StandardOpenOption.APPEND ) ) { - out = new FileOutputStream( fileName, true ); - if ( encoding != null ) { + if ( encoding != null ) + { out.write( data.getBytes( encoding ) ); } else @@ -433,15 +418,11 @@ public static void fileAppend( String fileName, String encoding, String data ) out.write( data.getBytes() ); } } - finally - { - IOUtil.close( out ); - } } /** - * Writes data to a file. The file will be created if it does not exist. - * Note: the data is written with platform encoding + * Writes data to a file. The file will be created if it does not exist. Note: the data is written with platform + * encoding * * @param fileName The path of the file to write. * @param data The content to write to the file. @@ -464,21 +445,53 @@ public static void fileWrite( String fileName, String data ) public static void fileWrite( String fileName, String encoding, String data ) throws IOException { - FileOutputStream out = null; - try + File file = ( fileName == null ) ? null : new File( fileName ); + fileWrite( file, encoding, data ); + } + + /** + * Writes data to a file. The file will be created if it does not exist. Note: the data is written with platform + * encoding + * + * @param file The file to write. + * @param data The content to write to the file. + * @throws IOException if any + * @since 2.0.6 + */ + public static void fileWrite( File file, String data ) + throws IOException + { + fileWrite( file, null, data ); + } + + /** + * Writes data to a file. The file will be created if it does not exist. + * + * @param file The file to write. + * @param encoding The encoding of the file. + * @param data The content to write to the file. + * @throws IOException if any + * @since 2.0.6 + */ + public static void fileWrite( File file, String encoding, String data ) + throws IOException + { + try ( Writer writer = getOutputStreamWriter( file, encoding ) ) { - out = new FileOutputStream( fileName ); - if ( encoding != null ) { - out.write( data.getBytes( encoding ) ); - } - else - { - out.write( data.getBytes() ); - } + writer.write( data ); } - finally + } + + private static OutputStreamWriter getOutputStreamWriter( File file, String encoding ) throws IOException + { + OutputStream out = Files.newOutputStream( file.toPath() ); + if ( encoding != null ) { - IOUtil.close( out ); + return new OutputStreamWriter( out, encoding ); + } + else + { + return new OutputStreamWriter( out ); } } @@ -490,14 +503,21 @@ public static void fileWrite( String fileName, String encoding, String data ) public static void fileDelete( String fileName ) { File file = new File( fileName ); - file.delete(); + try + { + NioFiles.deleteIfExists( file ); + } + catch ( IOException e ) + { + throw new RuntimeException( e ); + } } /** * Waits for NFS to propagate a file creation, imposing a timeout. * * @param fileName The path of the file. - * @param seconds The maximum time in seconds to wait. + * @param seconds The maximum time in seconds to wait. * @return True if file exists. */ public static boolean waitFor( String fileName, int seconds ) @@ -509,7 +529,7 @@ public static boolean waitFor( String fileName, int seconds ) * Waits for NFS to propagate a file creation, imposing a timeout. * * @param file The file. - * @param seconds The maximum time in seconds to wait. + * @param seconds The maximum time in seconds to wait. * @return True if file exists. */ public static boolean waitFor( File file, int seconds ) @@ -550,12 +570,11 @@ public static File getFile( String fileName ) } /** - * Given a directory and an array of extensions return an array of compliant files. - *

- * TODO Should an ignore list be passed in? - * TODO Should a recurse flag be passed in? - *

- * The given extensions should be like "java" and not like ".java" + *

Given a directory and an array of extensions return an array of compliant files.

+ * + *

TODO Should an ignore list be passed in? TODO Should a recurse flag be passed in?

+ * + *

The given extensions should be like "java" and not like ".java"

* * @param directory The path of the directory. * @param extensions an array of expected extensions. @@ -563,7 +582,7 @@ public static File getFile( String fileName ) */ public static String[] getFilesFromExtension( String directory, String[] extensions ) { - Vector files = new Vector(); + List files = new ArrayList(); File currentDir = new File( directory ); @@ -574,61 +593,57 @@ public static String[] getFilesFromExtension( String directory, String[] extensi return new String[0]; } - for ( int i = 0; i < unknownFiles.length; ++i ) + for ( String unknownFile : unknownFiles ) { - String currentFileName = directory + System.getProperty( "file.separator" ) + unknownFiles[i]; + String currentFileName = directory + System.getProperty( "file.separator" ) + unknownFile; File currentFile = new File( currentFileName ); if ( currentFile.isDirectory() ) { - //ignore all CVS directories... + // ignore all CVS directories... if ( currentFile.getName().equals( "CVS" ) ) { continue; } - //ok... transverse into this directory and get all the files... then combine - //them with the current list. + // ok... transverse into this directory and get all the files... then combine + // them with the current list. String[] fetchFiles = getFilesFromExtension( currentFileName, extensions ); files = blendFilesToVector( files, fetchFiles ); } else { - //ok... add the file + // ok... add the file String add = currentFile.getAbsolutePath(); if ( isValidFile( add, extensions ) ) { - files.addElement( add ); + files.add( add ); } } } - //ok... move the Vector into the files list... - String[] foundFiles = new String[files.size()]; - files.copyInto( foundFiles ); - - return foundFiles; + // ok... move the Vector into the files list... + return files.toArray( new String[0] ); } /** * Private helper method for getFilesFromExtension() */ - private static Vector blendFilesToVector( Vector v, String[] files ) + private static List blendFilesToVector( List v, String[] files ) { - for ( int i = 0; i < files.length; ++i ) + for ( String file : files ) { - v.addElement( files[i] ); + v.add( file ); } return v; } /** - * Checks to see if a file is of a particular type(s). - * Note that if the file does not have an extension, an empty string - * ("") is matched for. + * Checks to see if a file is of a particular type(s). Note that if the file does not have an extension, an empty + * string ("") is matched for. */ private static boolean isValidFile( String file, String[] extensions ) { @@ -638,12 +653,12 @@ private static boolean isValidFile( String file, String[] extensions ) extension = ""; } - //ok.. now that we have the "extension" go through the current know - //excepted extensions and determine if this one is OK. + // ok.. now that we have the "extension" go through the current know + // excepted extensions and determine if this one is OK. - for ( int i = 0; i < extensions.length; ++i ) + for ( String extension1 : extensions ) { - if ( extensions[i].equals( extension ) ) + if ( extension1.equals( extension ) ) { return true; } @@ -664,14 +679,11 @@ public static void mkdir( String dir ) { File file = new File( dir ); - if ( Os.isFamily( Os.FAMILY_WINDOWS ) ) + if ( Os.isFamily( Os.FAMILY_WINDOWS ) && !isValidWindowsFileName( file ) ) { - if ( !isValidWindowsFileName( file ) ) - { - throw new IllegalArgumentException( "The file (" + dir - + ") cannot contain any of the following characters: \n" - + StringUtils.join( INVALID_CHARACTERS_FOR_WINDOWS_FILE_NAME, " " ) ); - } + throw new IllegalArgumentException( "The file (" + dir + + ") cannot contain any of the following characters: \n" + + StringUtils.join( INVALID_CHARACTERS_FOR_WINDOWS_FILE_NAME, " " ) ); } if ( !file.exists() ) @@ -708,20 +720,11 @@ public static boolean contentEquals( final File file1, final File file2 ) // don't want to compare directory contents return false; } - - InputStream input1 = null; - InputStream input2 = null; - try + + try ( InputStream input1 = Files.newInputStream( file1.toPath() ); + InputStream input2 = Files.newInputStream( file2.toPath() ) ) { - input1 = new FileInputStream( file1 ); - input2 = new FileInputStream( file2 ); return IOUtil.contentEquals( input1, input2 ); - - } - finally - { - IOUtil.close( input1 ); - IOUtil.close( input2 ); } } @@ -729,8 +732,8 @@ public static boolean contentEquals( final File file1, final File file2 ) * Convert from a URL to a File. * * @param url File URL. - * @return The equivalent File object, or null if the URL's protocol - * is not file + * @return The equivalent File object, or null if the URL's protocol is not + * file */ public static File toFile( final URL url ) { @@ -767,19 +770,19 @@ public static URL[] toURLs( final File[] files ) for ( int i = 0; i < urls.length; i++ ) { - urls[i] = files[i].toURL(); + urls[i] = files[i].toURI().toURL(); } return urls; } /** - * Remove extension from filename. - * ie + * Remove extension from filename. ie + * *
-     * foo.txt    --> foo
-     * a\b\c.jpg --> a\b\c
-     * a\b\c     --> a\b\c
+     * foo.txt    --> foo
+     * a\b\c.jpg  --> a\b\c
+     * a\b\c      --> a\b\c
      * 
* * @param filename the path of the file @@ -787,9 +790,9 @@ public static URL[] toURLs( final File[] files ) */ public static String removeExtension( final String filename ) { - String ext = extension(filename); + String ext = extension( filename ); - if ( "".equals(ext) ) + if ( "".equals( ext ) ) { return filename; } @@ -799,12 +802,12 @@ public static String removeExtension( final String filename ) } /** - * Get extension from filename. - * ie + * Get extension from filename. ie + * *
-     * foo.txt    --> "txt"
-     * a\b\c.jpg --> "jpg"
-     * a\b\c     --> ""
+     * foo.txt    --> "txt"
+     * a\b\c.jpg  --> "jpg"
+     * a\b\c      --> ""
      * 
* * @param filename the path of the file @@ -812,15 +815,15 @@ public static String removeExtension( final String filename ) */ public static String getExtension( final String filename ) { - return extension(filename); + return extension( filename ); } /** - * Remove path from filename. Equivalent to the unix command basename - * ie. + * Remove path from filename. Equivalent to the unix command basename ie. + * *
-     * a/b/c.txt --> c.txt
-     * a.txt     --> a.txt
+     * a/b/c.txt --> c.txt
+     * a.txt     --> a.txt
      * 
* * @param filepath the path of the file @@ -832,15 +835,15 @@ public static String removePath( final String filepath ) } /** - * Remove path from filename. - * ie. + * Remove path from filename. ie. + * *
-     * a/b/c.txt --> c.txt
-     * a.txt     --> a.txt
+     * a/b/c.txt --> c.txt
+     * a.txt     --> a.txt
      * 
* * @param filepath the path of the file - * @param fileSeparatorChar the file separator character like / on Unix plateforms. + * @param fileSeparatorChar the file separator character like / on Unix platforms. * @return the filename minus path */ public static String removePath( final String filepath, final char fileSeparatorChar ) @@ -856,11 +859,11 @@ public static String removePath( final String filepath, final char fileSeparator } /** - * Get path from filename. Roughly equivalent to the unix command dirname. - * ie. + * Get path from filename. Roughly equivalent to the unix command dirname. ie. + * *
-     * a/b/c.txt --> a/b
-     * a.txt     --> ""
+     * a/b/c.txt --> a/b
+     * a.txt     --> ""
      * 
* * @param filepath the filepath @@ -872,15 +875,15 @@ public static String getPath( final String filepath ) } /** - * Get path from filename. - * ie. + * Get path from filename. ie. + * *
-     * a/b/c.txt --> a/b
-     * a.txt     --> ""
+     * a/b/c.txt --> a/b
+     * a.txt     --> ""
      * 
* * @param filepath the filepath - * @param fileSeparatorChar the file separator character like / on Unix plateforms. + * @param fileSeparatorChar the file separator character like / on Unix platforms. * @return the filename minus path */ public static String getPath( final String filepath, final char fileSeparatorChar ) @@ -895,16 +898,16 @@ public static String getPath( final String filepath, final char fileSeparatorCha } /** - * Copy file from source to destination. If destinationDirectory does not exist, it - * (and any parent directories) will be created. If a file source in - * destinationDirectory exists, it will be overwritten. + * Copy file from source to destination. If destinationDirectory does not exist, it (and any parent + * directories) will be created. If a file source in destinationDirectory exists, it will + * be overwritten. * - * @param source An existing File to copy. + * @param source An existing File to copy. * @param destinationDirectory A directory to copy source into. * @throws java.io.FileNotFoundException if source isn't a normal file. - * @throws IllegalArgumentException if destinationDirectory isn't a directory. - * @throws IOException if source does not exist, the file in - * destinationDirectory cannot be written to, or an IO error occurs during copying. + * @throws IllegalArgumentException if destinationDirectory isn't a directory. + * @throws IOException if source does not exist, the file in destinationDirectory cannot + * be written to, or an IO error occurs during copying. */ public static void copyFileToDirectory( final String source, final String destinationDirectory ) throws IOException @@ -913,17 +916,16 @@ public static void copyFileToDirectory( final String source, final String destin } /** - * Copy file from source to destination only if source is newer than the target file. - * If destinationDirectory does not exist, it - * (and any parent directories) will be created. If a file source in - * destinationDirectory exists, it will be overwritten. + * Copy file from source to destination only if source is newer than the target file. If + * destinationDirectory does not exist, it (and any parent directories) will be created. If a file + * source in destinationDirectory exists, it will be overwritten. * - * @param source An existing File to copy. + * @param source An existing File to copy. * @param destinationDirectory A directory to copy source into. * @throws java.io.FileNotFoundException if source isn't a normal file. - * @throws IllegalArgumentException if destinationDirectory isn't a directory. - * @throws IOException if source does not exist, the file in - * destinationDirectory cannot be written to, or an IO error occurs during copying. + * @throws IllegalArgumentException if destinationDirectory isn't a directory. + * @throws IOException if source does not exist, the file in destinationDirectory cannot + * be written to, or an IO error occurs during copying. */ public static void copyFileToDirectoryIfModified( final String source, final String destinationDirectory ) throws IOException @@ -932,16 +934,16 @@ public static void copyFileToDirectoryIfModified( final String source, final Str } /** - * Copy file from source to destination. If destinationDirectory does not exist, it - * (and any parent directories) will be created. If a file source in - * destinationDirectory exists, it will be overwritten. + * Copy file from source to destination. If destinationDirectory does not exist, it (and any parent + * directories) will be created. If a file source in destinationDirectory exists, it will + * be overwritten. * - * @param source An existing File to copy. + * @param source An existing File to copy. * @param destinationDirectory A directory to copy source into. * @throws java.io.FileNotFoundException if source isn't a normal file. - * @throws IllegalArgumentException if destinationDirectory isn't a directory. - * @throws IOException if source does not exist, the file in - * destinationDirectory cannot be written to, or an IO error occurs during copying. + * @throws IllegalArgumentException if destinationDirectory isn't a directory. + * @throws IOException if source does not exist, the file in destinationDirectory cannot + * be written to, or an IO error occurs during copying. */ public static void copyFileToDirectory( final File source, final File destinationDirectory ) throws IOException @@ -955,17 +957,16 @@ public static void copyFileToDirectory( final File source, final File destinatio } /** - * Copy file from source to destination only if source is newer than the target file. - * If destinationDirectory does not exist, it - * (and any parent directories) will be created. If a file source in - * destinationDirectory exists, it will be overwritten. + * Copy file from source to destination only if source is newer than the target file. If + * destinationDirectory does not exist, it (and any parent directories) will be created. If a file + * source in destinationDirectory exists, it will be overwritten. * - * @param source An existing File to copy. + * @param source An existing File to copy. * @param destinationDirectory A directory to copy source into. * @throws java.io.FileNotFoundException if source isn't a normal file. - * @throws IllegalArgumentException if destinationDirectory isn't a directory. - * @throws IOException if source does not exist, the file in - * destinationDirectory cannot be written to, or an IO error occurs during copying. + * @throws IllegalArgumentException if destinationDirectory isn't a directory. + * @throws IOException if source does not exist, the file in destinationDirectory cannot + * be written to, or an IO error occurs during copying. */ public static void copyFileToDirectoryIfModified( final File source, final File destinationDirectory ) throws IOException @@ -978,64 +979,130 @@ public static void copyFileToDirectoryIfModified( final File source, final File copyFileIfModified( source, new File( destinationDirectory, source.getName() ) ); } + /** + * Creates a number of directories, as delivered from DirectoryScanner + * + * @param sourceBase The basedir used for the directory scan + * @param dirs The getIncludedDirs from the dirscanner + * @param destination The base dir of the output structure + * @throws IOException io issue + */ + public static void mkDirs( final File sourceBase, String[] dirs, final File destination ) + throws IOException + { + for ( String dir : dirs ) + { + File src = new File( sourceBase, dir ); + File dst = new File( destination, dir ); + if ( NioFiles.isSymbolicLink( src ) ) + { + File target = NioFiles.readSymbolicLink( src ); + NioFiles.createSymbolicLink( dst, target ); + } + else + { + dst.mkdirs(); + } + } + } /** - * Copy file from source to destination. The directories up to destination will be - * created if they don't already exist. destination will be overwritten if it - * already exists. + * Copy file from source to destination. The directories up to destination will be created if they + * don't already exist. destination will be overwritten if it already exists. * - * @param source An existing non-directory File to copy bytes from. - * @param destination A non-directory File to write bytes to (possibly - * overwriting). - * @throws IOException if source does not exist, destination cannot be - * written to, or an IO error occurs during copying. - * @throws java.io.FileNotFoundException if destination is a directory - * (use {@link #copyFileToDirectory}). + * @param source An existing non-directory File to copy bytes from. + * @param destination A non-directory File to write bytes to (possibly overwriting). + * @throws IOException if source does not exist, destination cannot be written to, or an + * IO error occurs during copying. + * @throws java.io.FileNotFoundException if destination is a directory (use + * {@link #copyFileToDirectory}). */ public static void copyFile( final File source, final File destination ) throws IOException { - //check source exists + // check source exists if ( !source.exists() ) { final String message = "File " + source + " does not exist"; throw new IOException( message ); } - //check source != destination, see PLXUTILS-10 + // check source != destination, see PLXUTILS-10 if ( source.getCanonicalPath().equals( destination.getCanonicalPath() ) ) { - //if they are equal, we can exit the method without doing any work + // if they are equal, we can exit the method without doing any work return; } + mkdirsFor( destination ); - copyStreamToFile( new FileInputStreamFacade( source ), destination); + doCopyFile( source, destination ); if ( source.length() != destination.length() ) { - final String message = "Failed to copy full contents from " + source + " to " + destination; + String message = "Failed to copy full contents from " + source + " to " + destination; throw new IOException( message ); } } + private static void doCopyFile( File source, File destination ) + throws IOException + { + doCopyFileUsingNewIO( source, destination ); + } + + private static void doCopyFileUsingNewIO( File source, File destination ) + throws IOException + { + NioFiles.copy( source, destination ); + } + /** - * Copy file from source to destination only if source timestamp is later than the destination timestamp. - * The directories up to destination will be created if they don't already exist. - * destination will be overwritten if it already exists. + * Link file from destination to source. The directories up to destination will be created if they + * don't already exist. destination will be overwritten if it already exists. + * + * @param source An existing non-directory File to link to. + * @param destination A non-directory File becoming the link (possibly overwriting). + * @throws IOException if source does not exist, destination cannot be created, or an + * IO error occurs during linking. + * @throws java.io.FileNotFoundException if destination is a directory (use + * {@link #copyFileToDirectory}). + */ + public static void linkFile( final File source, final File destination ) + throws IOException + { + // check source exists + if ( !source.exists() ) + { + final String message = "File " + source + " does not exist"; + throw new IOException( message ); + } + + // check source != destination, see PLXUTILS-10 + if ( source.getCanonicalPath().equals( destination.getCanonicalPath() ) ) + { + // if they are equal, we can exit the method without doing any work + return; + } + mkdirsFor( destination ); + + NioFiles.createSymbolicLink( destination, source ); + } + + /** + * Copy file from source to destination only if source timestamp is later than the destination timestamp. The + * directories up to destination will be created if they don't already exist. destination + * will be overwritten if it already exists. * * @param source An existing non-directory File to copy bytes from. - * @param destination A non-directory File to write bytes to (possibly - * overwriting). + * @param destination A non-directory File to write bytes to (possibly overwriting). * @return true if no problem occured - * @throws IOException if source does not exist, destination cannot be - * written to, or an IO error occurs during copying. - * @throws FileNotFoundException if destination is a directory - * (use {@link #copyFileToDirectory}). + * @throws IOException if source does not exist, destination cannot be written to, or an + * IO error occurs during copying. */ public static boolean copyFileIfModified( final File source, final File destination ) throws IOException { - if ( destination.lastModified() < source.lastModified() ) + if ( isSourceNewerThanDestination( source, destination ) ) { copyFile( source, destination ); @@ -1046,86 +1113,85 @@ public static boolean copyFileIfModified( final File source, final File destinat } /** - * Copies bytes from the URL source to a file destination. - * The directories up to destination will be created if they don't already exist. - * destination will be overwritten if it already exists. + * Copies bytes from the URL source to a file destination. The directories up to + * destination will be created if they don't already exist. destination will be + * overwritten if it already exists. * * @param source A URL to copy bytes from. - * @param destination A non-directory File to write bytes to (possibly - * overwriting). + * @param destination A non-directory File to write bytes to (possibly overwriting). * @throws IOException if - *
    - *
  • source URL cannot be opened
  • - *
  • destination cannot be written to
  • - *
  • an IO error occurs during copying
  • - *
+ *
    + *
  • source URL cannot be opened
  • + *
  • destination cannot be written to
  • + *
  • an IO error occurs during copying
  • + *
*/ public static void copyURLToFile( final URL source, final File destination ) throws IOException { - copyStreamToFile( new URLInputStreamFacade( source ) , destination); + copyStreamToFile( new URLInputStreamFacade( source ), destination ); } /** - * Copies bytes from the {@link InputStream} source to a file destination. - * The directories up to destination will be created if they don't already exist. - * destination will be overwritten if it already exists. + * Copies bytes from the {@link InputStream} source to a file destination. The directories + * up to destination will be created if they don't already exist. destination will be + * overwritten if it already exists. * - * @param source An {@link InputStream} to copy bytes from. This stream is - * guaranteed to be closed. - * @param destination A non-directory File to write bytes to (possibly - * overwriting). + * @param source An {@link InputStream} to copy bytes from. This stream is guaranteed to be closed. + * @param destination A non-directory File to write bytes to (possibly overwriting). * @throws IOException if - *
    - *
  • source URL cannot be opened
  • - *
  • destination cannot be written to
  • - *
  • an IO error occurs during copying
  • - *
+ *
    + *
  • source URL cannot be opened
  • + *
  • destination cannot be written to
  • + *
  • an IO error occurs during copying
  • + *
*/ public static void copyStreamToFile( final InputStreamFacade source, final File destination ) throws IOException { - //does destination directory exist ? - if ( destination.getParentFile() != null && !destination.getParentFile().exists() ) + mkdirsFor( destination ); + checkCanWrite( destination ); + + try ( InputStream input = source.getInputStream(); + OutputStream output = Files.newOutputStream( destination.toPath() ) ) { - destination.getParentFile().mkdirs(); + IOUtil.copy( input, output ); } + } - //make sure we can write to destination + private static void checkCanWrite( File destination ) + throws IOException + { + // make sure we can write to destination if ( destination.exists() && !destination.canWrite() ) { final String message = "Unable to open file " + destination + " for writing."; throw new IOException( message ); } + } - InputStream input = null; - FileOutputStream output = null; - try - { - input = source.getInputStream(); - output = new FileOutputStream( destination ); - IOUtil.copy( input, output ); - } - finally + private static void mkdirsFor( File destination ) + { + // does destination directory exist ? + File parentFile = destination.getParentFile(); + if ( parentFile != null && !parentFile.exists() ) { - IOUtil.close( input ); - IOUtil.close( output ); + parentFile.mkdirs(); } } /** - * Normalize a path. - * Eliminates "/../" and "/./" in a string. Returns null if the ..'s went past the - * root. - * Eg: + * Normalize a path. Eliminates "/../" and "/./" in a string. Returns null if the ..'s went past the + * root. Eg: + * *
-     * /foo//               -->     /foo/
-     * /foo/./              -->     /foo/
-     * /foo/../bar          -->     /bar
-     * /foo/../bar/         -->     /bar/
-     * /foo/../bar/../baz   -->     /baz
-     * //foo//./bar         -->     /foo/bar
-     * /../                 -->     null
+     * /foo//               -->     /foo/
+     * /foo/./              -->     /foo/
+     * /foo/../bar          -->     /bar
+     * /foo/../bar/         -->     /bar/
+     * /foo/../bar/../baz   -->     /baz
+     * //foo//./bar         -->     /foo/bar
+     * /../                 -->     null
      * 
* * @param path the path to normalize @@ -1166,7 +1232,7 @@ public static String normalize( final String path ) } if ( index == 0 ) { - return null; // Trying to go outside our context + return null; // Trying to go outside our context } int index2 = normalized.lastIndexOf( '/', index - 1 ); normalized = normalized.substring( 0, index2 ) + normalized.substring( index + 3 ); @@ -1177,14 +1243,15 @@ public static String normalize( final String path ) } /** - * Will concatenate 2 paths. Paths with .. will be - * properly handled. - *

Eg.,
- * /a/b/c + d = /a/b/d
- * /a/b/c + ../d = /a/d
- *

- *

- * Thieved from Tomcat sources... + *

Will concatenate 2 paths. Paths with .. will be properly handled.

+ * + * Eg., + *
+     * /a/b/c + d = /a/b/d
+     * /a/b/c + ../d = /a/d
+     * 
+ + *

Thieved from Tomcat sources...

* * @param lookupPath a path * @param path the path to concatenate @@ -1219,12 +1286,11 @@ public static String catPath( final String lookupPath, final String path ) } /** - * Resolve a file filename to it's canonical form. If filename is - * relative (doesn't start with /), it will be resolved relative to - * baseFile, otherwise it is treated as a normal root-relative path. + * Resolve a file filename to it's canonical form. If filename is relative (doesn't start + * with /), it will be resolved relative to baseFile, otherwise it is treated as a normal + * root-relative path. * - * @param baseFile Where to resolve filename from, if filename is - * relative. + * @param baseFile Where to resolve filename from, if filename is relative. * @param filename Absolute or relative file path to resolve. * @return The canonical File of filename. */ @@ -1260,11 +1326,11 @@ public static File resolveFile( final File baseFile, String filename ) // FIXME: I'm almost certain this // removal is unnecessary, as getAbsoluteFile() strips // them. However, I'm not sure about this UNC stuff. (JT) final char[] chars = filename.toCharArray(); - final StringBuffer sb = new StringBuffer(); + final StringBuilder sb = new StringBuilder(); - //remove duplicate file separators in succession - except - //on win32 at start of filename as UNC filenames can - //be \\AComputer\AShare\myfile.txt + // remove duplicate file separators in succession - except + // on win32 at start of filename as UNC filenames can + // be \\AComputer\AShare\myfile.txt int start = 0; if ( '\\' == File.separatorChar ) { @@ -1284,7 +1350,7 @@ public static File resolveFile( final File baseFile, String filename ) filenm = sb.toString(); - //must be relative + // must be relative File file = ( new File( baseFile, filenm ) ).getAbsoluteFile(); try @@ -1340,9 +1406,8 @@ public static void forceDelete( final File file ) } /** - * Accommodate Windows bug encountered in both Sun and IBM JDKs. - * Others possible. If the delete does not work, call System.gc(), - * wait a little and try again. + * Accommodate Windows bug encountered in both Sun and IBM JDKs. Others possible. If the delete does not work, call + * System.gc(), wait a little and try again. * * @param file a file * @throws IOException if any @@ -1368,7 +1433,7 @@ private static boolean deleteFile( File file ) Thread.sleep( 10 ); return file.delete(); } - catch ( InterruptedException ex ) + catch ( InterruptedException ignore ) { return file.delete(); } @@ -1378,8 +1443,7 @@ private static boolean deleteFile( File file ) } /** - * Schedule a file to be deleted when JVM exits. - * If file is directory delete it and all sub-directories. + * Schedule a file to be deleted when JVM exits. If file is directory delete it and all sub-directories. * * @param file a file * @throws IOException if any @@ -1405,7 +1469,7 @@ public static void forceDeleteOnExit( final File file ) /** * Recursively schedule directory for deletion on JVM exit. * - * @param file a directory + * @param directory a directory * @throws IOException if any */ private static void deleteDirectoryOnExit( final File directory ) @@ -1415,15 +1479,15 @@ private static void deleteDirectoryOnExit( final File directory ) { return; } + directory.deleteOnExit(); // The hook reverses the list cleanDirectoryOnExit( directory ); - directory.deleteOnExit(); } /** * Clean a directory without deleting it. * - * @param file a directory + * @param directory a directory * @throws IOException if any */ private static void cleanDirectoryOnExit( final File directory ) @@ -1444,9 +1508,8 @@ private static void cleanDirectoryOnExit( final File directory ) IOException exception = null; final File[] files = directory.listFiles(); - for ( int i = 0; i < files.length; i++ ) + for ( final File file : files ) { - final File file = files[i]; try { forceDeleteOnExit( file ); @@ -1463,13 +1526,11 @@ private static void cleanDirectoryOnExit( final File directory ) } } - /** * Make a directory. * * @param file not null - * @throws IOException If there already exists a file with specified name or - * the directory is unable to be created + * @throws IOException If there already exists a file with specified name or the directory is unable to be created * @throws IllegalArgumentException if the file contains illegal Windows characters under Windows OS. * @see #INVALID_CHARACTERS_FOR_WINDOWS_FILE_NAME */ @@ -1531,6 +1592,15 @@ public static void deleteDirectory( final File directory ) return; } + /* + * try delete the directory before its contents, which will take care of any directories that are really + * symbolic links. + */ + if ( directory.delete() ) + { + return; + } + cleanDirectory( directory ); if ( !directory.delete() ) { @@ -1581,9 +1651,8 @@ public static void cleanDirectory( final File directory ) return; } - for ( int i = 0; i < files.length; i++ ) + for ( final File file : files ) { - final File file = files[i]; try { forceDelete( file ); @@ -1634,10 +1703,8 @@ public static long sizeOfDirectory( final File directory ) long size = 0; final File[] files = directory.listFiles(); - for ( int i = 0; i < files.length; i++ ) + for ( final File file : files ) { - final File file = files[i]; - if ( file.isDirectory() ) { size += sizeOfDirectory( file ); @@ -1652,17 +1719,17 @@ public static long sizeOfDirectory( final File directory ) } /** - * Return the files contained in the directory, using inclusion and exclusion Ant patterns, - * including the directory name in each of the files + * Return the files contained in the directory, using inclusion and exclusion Ant patterns, including the directory + * name in each of the files * * @param directory the directory to scan * @param includes the includes pattern, comma separated * @param excludes the excludes pattern, comma separated * @return a list of File objects - * @throws IOException - * @see #getFileNames( File, String, String, boolean ) + * @throws IOException io issue + * @see #getFileNames(File, String, String, boolean) */ - public static List getFiles( File directory, String includes, String excludes ) + public static List getFiles( File directory, String includes, String excludes ) throws IOException { return getFiles( directory, includes, excludes, true ); @@ -1676,36 +1743,35 @@ public static List getFiles( File directory, String includes, String excludes ) * @param excludes the excludes pattern, comma separated * @param includeBasedir true to include the base dir in each file * @return a list of File objects - * @throws IOException - * @see #getFileNames( File, String, String, boolean ) + * @throws IOException io issue + * @see #getFileNames(File, String, String, boolean) */ - public static List getFiles( File directory, String includes, String excludes, boolean includeBasedir ) + public static List getFiles( File directory, String includes, String excludes, boolean includeBasedir ) throws IOException { - List fileNames = getFileNames( directory, includes, excludes, includeBasedir ); + List fileNames = getFileNames( directory, includes, excludes, includeBasedir ); - List files = new ArrayList(); + List files = new ArrayList(); - for ( Iterator i = fileNames.iterator(); i.hasNext(); ) + for ( String filename : fileNames ) { - files.add( new File( (String) i.next() ) ); + files.add( new File( filename ) ); } return files; } /** - * Return a list of files as String depending options. - * This method use case sensitive file name. + * Return a list of files as String depending options. This method use case sensitive file name. * * @param directory the directory to scan * @param includes the includes pattern, comma separated * @param excludes the excludes pattern, comma separated * @param includeBasedir true to include the base dir in each String of file * @return a list of files as String - * @throws IOException + * @throws IOException io issue */ - public static List getFileNames( File directory, String includes, String excludes, boolean includeBasedir ) + public static List getFileNames( File directory, String includes, String excludes, boolean includeBasedir ) throws IOException { return getFileNames( directory, includes, excludes, includeBasedir, true ); @@ -1717,30 +1783,30 @@ public static List getFileNames( File directory, String includes, String exclude * @param directory the directory to scan * @param includes the includes pattern, comma separated * @param excludes the excludes pattern, comma separated - * @param includeBasedir true to include the base dir in each String of file + * @param includeBasedir true to include the base dir in each String of file * @param isCaseSensitive true if case sensitive * @return a list of files as String - * @throws IOException + * @throws IOException io issue */ - public static List getFileNames( File directory, String includes, String excludes, boolean includeBasedir, - boolean isCaseSensitive ) + public static List getFileNames( File directory, String includes, String excludes, boolean includeBasedir, + boolean isCaseSensitive ) throws IOException { return getFileAndDirectoryNames( directory, includes, excludes, includeBasedir, isCaseSensitive, true, false ); } /** - * Return a list of directories as String depending options. - * This method use case sensitive file name. + * Return a list of directories as String depending options. This method use case sensitive file name. * * @param directory the directory to scan * @param includes the includes pattern, comma separated * @param excludes the excludes pattern, comma separated * @param includeBasedir true to include the base dir in each String of file * @return a list of directories as String - * @throws IOException + * @throws IOException io issue */ - public static List getDirectoryNames( File directory, String includes, String excludes, boolean includeBasedir ) + public static List getDirectoryNames( File directory, String includes, String excludes, + boolean includeBasedir ) throws IOException { return getDirectoryNames( directory, includes, excludes, includeBasedir, true ); @@ -1752,13 +1818,13 @@ public static List getDirectoryNames( File directory, String includes, String ex * @param directory the directory to scan * @param includes the includes pattern, comma separated * @param excludes the excludes pattern, comma separated - * @param includeBasedir true to include the base dir in each String of file + * @param includeBasedir true to include the base dir in each String of file * @param isCaseSensitive true if case sensitive * @return a list of directories as String - * @throws IOException + * @throws IOException io issue */ - public static List getDirectoryNames( File directory, String includes, String excludes, boolean includeBasedir, - boolean isCaseSensitive ) + public static List getDirectoryNames( File directory, String includes, String excludes, + boolean includeBasedir, boolean isCaseSensitive ) throws IOException { return getFileAndDirectoryNames( directory, includes, excludes, includeBasedir, isCaseSensitive, false, true ); @@ -1770,16 +1836,16 @@ public static List getDirectoryNames( File directory, String includes, String ex * @param directory the directory to scan * @param includes the includes pattern, comma separated * @param excludes the excludes pattern, comma separated - * @param includeBasedir true to include the base dir in each String of file + * @param includeBasedir true to include the base dir in each String of file * @param isCaseSensitive true if case sensitive * @param getFiles true if get files - * @param getDirectories true if get directories + * @param getDirectories true if get directories * @return a list of files as String - * @throws IOException + * @throws IOException io issue */ - public static List getFileAndDirectoryNames( File directory, String includes, String excludes, - boolean includeBasedir, boolean isCaseSensitive, boolean getFiles, - boolean getDirectories ) + public static List getFileAndDirectoryNames( File directory, String includes, String excludes, + boolean includeBasedir, boolean isCaseSensitive, + boolean getFiles, boolean getDirectories ) throws IOException { DirectoryScanner scanner = new DirectoryScanner(); @@ -1800,21 +1866,21 @@ public static List getFileAndDirectoryNames( File directory, String includes, St scanner.scan(); - List list = new ArrayList(); + List list = new ArrayList(); if ( getFiles ) { String[] files = scanner.getIncludedFiles(); - for ( int i = 0; i < files.length; i++ ) + for ( String file : files ) { if ( includeBasedir ) { - list.add( directory + FileUtils.FS + files[i] ); + list.add( directory + FileUtils.FS + file ); } else { - list.add( files[i] ); + list.add( file ); } } } @@ -1823,15 +1889,15 @@ public static List getFileAndDirectoryNames( File directory, String includes, St { String[] directories = scanner.getIncludedDirectories(); - for ( int i = 0; i < directories.length; i++ ) + for ( String directory1 : directories ) { if ( includeBasedir ) { - list.add( directory + FileUtils.FS + directories[i] ); + list.add( directory + FileUtils.FS + directory1 ); } else { - list.add( directories[i] ); + list.add( directory1 ); } } } @@ -1858,7 +1924,7 @@ public static void copyDirectory( File sourceDirectory, File destinationDirector * @param sourceDirectory the source dir * @param destinationDirectory the target dir * @param includes include pattern - * @param excludes exlucde pattern + * @param excludes exclude pattern * @throws IOException if any * @see #getFiles(File, String, String) */ @@ -1871,19 +1937,17 @@ public static void copyDirectory( File sourceDirectory, File destinationDirector return; } - List files = getFiles( sourceDirectory, includes, excludes ); + List files = getFiles( sourceDirectory, includes, excludes ); - for ( Iterator i = files.iterator(); i.hasNext(); ) + for ( File file : files ) { - File file = (File) i.next(); - copyFileToDirectory( file, destinationDirectory ); } } /** - * Copies a entire directory layout : no files will be copied only directories - *

+ *

Copies a entire directory layout : no files will be copied only directories

+ * * Note: *
    *
  • It will include empty directories. @@ -1893,12 +1957,12 @@ public static void copyDirectory( File sourceDirectory, File destinationDirector * @param sourceDirectory the source dir * @param destinationDirectory the target dir * @param includes include pattern - * @param excludes exlucde pattern - * @since 1.5.7 + * @param excludes exclude pattern * @throws IOException if any + * @since 1.5.7 */ public static void copyDirectoryLayout( File sourceDirectory, File destinationDirectory, String[] includes, - String[] excludes ) + String[] excludes ) throws IOException { if ( sourceDirectory == null ) @@ -1941,27 +2005,25 @@ public static void copyDirectoryLayout( File sourceDirectory, File destinationDi scanner.addDefaultExcludes(); scanner.scan(); - List includedDirectories = Arrays.asList( scanner.getIncludedDirectories() ); + List includedDirectories = Arrays.asList( scanner.getIncludedDirectories() ); - for (Iterator i = includedDirectories.iterator();i.hasNext();) + for ( String name : includedDirectories ) { - String name = (String)i.next(); - - File source = new File(sourceDirectory, name); + File source = new File( sourceDirectory, name ); if ( source.equals( sourceDirectory ) ) { continue; } - File destination = new File(destinationDirectory, name); + File destination = new File( destinationDirectory, name ); destination.mkdirs(); } } /** - * Copies a entire directory structure. - *

    + *

    Copies a entire directory structure.

    + * * Note: *
      *
    • It will include empty directories. @@ -1979,8 +2041,8 @@ public static void copyDirectoryStructure( File sourceDirectory, File destinatio } /** - * Copies an entire directory structure but only source files with timestamp later than the destinations'. - *

      + *

      Copies an entire directory structure but only source files with timestamp later than the destinations'.

      + * * Note: *
        *
      • It will include empty directories. @@ -2025,10 +2087,8 @@ private static void copyDirectoryStructure( File sourceDirectory, File destinati String sourcePath = sourceDirectory.getAbsolutePath(); - for ( int i = 0; i < files.length; i++ ) + for ( File file : files ) { - File file = files[i]; - if ( file.equals( rootDestinationDirectory ) ) { // We don't copy the destination directory in itself @@ -2058,8 +2118,8 @@ else if ( file.isDirectory() ) { if ( !destination.exists() && !destination.mkdirs() ) { - throw new IOException( - "Could not create destination directory '" + destination.getAbsolutePath() + "'." ); + throw new IOException( "Could not create destination directory '" + destination.getAbsolutePath() + + "'." ); } copyDirectoryStructure( file, destination, rootDestinationDirectory, onlyModifiedFiles ); @@ -2072,17 +2132,15 @@ else if ( file.isDirectory() ) } /** - * Renames a file, even if that involves crossing file system boundaries. - *

        - *

        This will remove to (if it exists), ensure that - * to's parent directory exists and move - * from, which involves deleting from as - * well.

        + *

        Renames a file, even if that involves crossing file system boundaries.

        + * + *

        This will remove to (if it exists), ensure that to's parent directory exists and move + * from, which involves deleting from as well.

        * * @param from the file to move - * @param to the new file name - * @throws IOException if anything bad happens during this process. - * Note that to may have been deleted already when this happens. + * @param to the new file name + * @throws IOException if anything bad happens during this process. Note that to may have been deleted + * already when this happens. */ public static void rename( File from, File to ) throws IOException @@ -2109,26 +2167,21 @@ public static void rename( File from, File to ) } /** - * Create a temporary file in a given directory. - *

        - *

        The file denoted by the returned abstract pathname did not - * exist before this method was invoked, any subsequent invocation - * of this method will yield a different file name.

        - *

        - * The filename is prefixNNNNNsuffix where NNNN is a random number - *

        - *

        This method is different to {@link File#createTempFile(String, String, File)} of JDK 1.2 - * as it doesn't create the file itself. - * It uses the location pointed to by java.io.tmpdir - * when the parentDir attribute is - * null.

        - *

        To delete automatically the file created by this method, use the - * {@link File#deleteOnExit()} method.

        + *

        Create a temporary file in a given directory.

        + * + *

        The file denoted by the returned abstract pathname did not exist before this method was invoked, any subsequent + * invocation of this method will yield a different file name.

        + * + *

        The filename is prefixNNNNNsuffix where NNNN is a random number

        + * + *

        This method is different to {@link File#createTempFile(String, String, File)} of JDK 1.2 as it doesn't create the + * file itself. It uses the location pointed to by java.io.tmpdir when the parentDir attribute is null.

        + * + *

        To delete automatically the file created by this method, use the {@link File#deleteOnExit()} method.

        * * @param prefix prefix before the random number * @param suffix file extension; include the '.' - * @param parentDir Directory to create the temporary file in -java.io.tmpdir - * used if not specificed + * @param parentDir Directory to create the temporary file in -java.io.tmpdir used if not specificed * @return a File reference to the new temporary file. */ public static File createTempFile( String prefix, String suffix, File parentDir ) @@ -2156,7 +2209,8 @@ public static File createTempFile( String prefix, String suffix, File parentDir } /** - * If wrappers is null or empty, the file will be copy only if to.lastModified() < from.lastModified() + * If wrappers is null or empty, the file will be copy only if {@code to.lastModified() < from.lastModified()} + * * @param from the file to copy * @param to the destination file * @param encoding the file output encoding (only if wrappers is not empty) @@ -2175,13 +2229,13 @@ public static abstract class FilterWrapper } /** - * If wrappers is null or empty, the file will be copy only if to.lastModified() < from.lastModified() or if overwrite is true + * If wrappers is null or empty, the file will be copy only if {@code to.lastModified() < from.lastModified()}, if overwrite is true + * * @param from the file to copy * @param to the destination file * @param encoding the file output encoding (only if wrappers is not empty) * @param wrappers array of {@link FilterWrapper} - * @param overwrite if true and f wrappers is null or empty, the file will be copy - * enven if to.lastModified() < from.lastModified() + * @param overwrite if true and wrappers is null or empty, the file will be copied even if {@code to.lastModified() < from.lastModified()} * @throws IOException if an IO error occurs during copying or filtering * @since 1.5.2 */ @@ -2197,28 +2251,29 @@ public static void copyFile( File from, File to, String encoding, FilterWrapper[ { if ( encoding == null || encoding.length() < 1 ) { - fileReader = new BufferedReader( new FileReader( from ) ); - fileWriter = new FileWriter( to ); + fileReader = Files.newBufferedReader( from.toPath() ); + fileWriter = Files.newBufferedWriter( to.toPath() ); } else { - FileInputStream instream = new FileInputStream( from ); - - FileOutputStream outstream = new FileOutputStream( to ); + OutputStream outstream = Files.newOutputStream( to.toPath() ); - fileReader = new BufferedReader( new InputStreamReader( instream, encoding ) ); + fileReader = Files.newBufferedReader( from.toPath(), Charset.forName( encoding ) ); fileWriter = new OutputStreamWriter( outstream, encoding ); } Reader reader = fileReader; - for ( int i = 0; i < wrappers.length; i++ ) + for ( FilterWrapper wrapper : wrappers ) { - FilterWrapper wrapper = wrappers[i]; reader = wrapper.getReader( reader ); } IOUtil.copy( reader, fileWriter ); + fileWriter.close(); + fileWriter = null; + fileReader.close(); + fileReader = null; } finally { @@ -2228,13 +2283,17 @@ public static void copyFile( File from, File to, String encoding, FilterWrapper[ } else { - if ( to.lastModified() < from.lastModified() || overwrite ) + if ( isSourceNewerThanDestination( from, to ) || overwrite ) { copyFile( from, to ); } } } + private static boolean isSourceNewerThanDestination( File source, File destination ) { + return ( destination.lastModified() == 0L && source.lastModified() == 0L ) || destination.lastModified() < source.lastModified(); + } + /** * Note: the file content is read with platform encoding * @@ -2242,29 +2301,25 @@ public static void copyFile( File from, File to, String encoding, FilterWrapper[ * @return a List containing every every line not starting with # and not empty * @throws IOException if any */ - public static List loadFile( File file ) + public static List loadFile( File file ) throws IOException { - List lines = new ArrayList(); + final List lines = new ArrayList(); if ( file.exists() ) { - BufferedReader reader = new BufferedReader( new FileReader( file ) ); - - String line = reader.readLine(); - - while ( line != null ) + try ( BufferedReader reader = Files.newBufferedReader( file.toPath() ) ) { - line = line.trim(); - - if ( !line.startsWith( "#" ) && line.length() != 0 ) + for ( String line = reader.readLine(); line != null; line = reader.readLine() ) { - lines.add( line ); + line = line.trim(); + + if ( !line.startsWith( "#" ) && line.length() != 0 ) + { + lines.add( line ); + } } - line = reader.readLine(); } - - reader.close(); } return lines; @@ -2272,11 +2327,11 @@ public static List loadFile( File file ) /** * For Windows OS, check if the file name contains any of the following characters: - * ":", "*", "?", "\"", "<", ">", "|" + * ":", "*", "?", "\"", "<", ">", "|" * * @param f not null file - * @return false if the file path contains any of forbidden Windows characters, - * true if the Os is not Windows or if the file path respect the Windows constraints. + * @return false if the file path contains any of forbidden Windows characters, true if + * the Os is not Windows or if the file path respect the Windows constraints. * @see #INVALID_CHARACTERS_FOR_WINDOWS_FILE_NAME * @since 1.5.2 */ @@ -2289,9 +2344,10 @@ public static boolean isValidWindowsFileName( File f ) return false; } - if ( f.getParentFile()!= null) + File parentFile = f.getParentFile(); + if ( parentFile != null ) { - return isValidWindowsFileName( f.getParentFile() ); + return isValidWindowsFileName( parentFile ); } } diff --git a/src/main/java/org/codehaus/plexus/util/IOUtil.java b/src/main/java/org/codehaus/plexus/util/IOUtil.java index 20cab90d..b431a8d9 100644 --- a/src/main/java/org/codehaus/plexus/util/IOUtil.java +++ b/src/main/java/org/codehaus/plexus/util/IOUtil.java @@ -67,92 +67,74 @@ import java.io.StringReader; import java.io.StringWriter; import java.io.Writer; +import java.nio.channels.Channel; /** * General IO Stream manipulation. *

        - * This class provides static utility methods for input/output operations, particularly buffered - * copying between sources (InputStream, Reader, String and - * byte[]) and destinations (OutputStream, Writer, - * String and byte[]). + * This class provides static utility methods for input/output operations, particularly buffered copying between sources + * (InputStream, Reader, String and byte[]) and destinations + * (OutputStream, Writer, String and byte[]). + *

        + *

        + * Unless otherwise noted, these copy methods do not flush or close the streams. Often, doing so + * would require making non-portable assumptions about the streams' origin and further use. This means that both + * streams' close() methods must be called after copying. if one omits this step, then the stream resources + * (sockets, file descriptors) are released when the associated Stream is garbage-collected. It is not a good idea to + * rely on this mechanism. For a good overview of the distinction between "memory management" and "resource management", + * see this UnixReview article + *

        + *

        + * For each copy method, a variant is provided that allows the caller to specify the buffer size (the + * default is 4k). As the buffer size can have a fairly large impact on speed, this may be worth tweaking. Often "large + * buffer -> faster" does not hold, even for large data transfers. + *

        + *

        + * For byte-to-char methods, a copy variant allows the encoding to be selected (otherwise the platform + * default is used). + *

        + *

        + * The copy methods use an internal buffer when copying. It is therefore advisable not to + * deliberately wrap the stream arguments to the copy methods in Buffered* streams. For + * example, don't do the following: *

        - * - *

        Unless otherwise noted, these copy methods do not flush or close the - * streams. Often, doing so would require making non-portable assumptions about the streams' origin - * and further use. This means that both streams' close() methods must be called after - * copying. if one omits this step, then the stream resources (sockets, file descriptors) are - * released when the associated Stream is garbage-collected. It is not a good idea to rely on this - * mechanism. For a good overview of the distinction between "memory management" and "resource - * management", see this - * UnixReview article

        - * - *

        For each copy method, a variant is provided that allows the caller to specify the - * buffer size (the default is 4k). As the buffer size can have a fairly large impact on speed, this - * may be worth tweaking. Often "large buffer -> faster" does not hold, even for large data - * transfers.

        - * - *

        For byte-to-char methods, a copy variant allows the encoding to be selected - * (otherwise the platform default is used).

        - * - *

        The copy methods use an internal buffer when copying. It is therefore advisable - * not to deliberately wrap the stream arguments to the copy methods in - * Buffered* streams. For example, don't do the - * following:

        - * * copy( new BufferedInputStream( in ), new BufferedOutputStream( out ) ); - * - *

        The rationale is as follows:

        - * - *

        Imagine that an InputStream's read() is a very expensive operation, which would usually suggest - * wrapping in a BufferedInputStream. The BufferedInputStream works by issuing infrequent - * {@link java.io.InputStream#read(byte[] b, int off, int len)} requests on the underlying InputStream, to - * fill an internal buffer, from which further read requests can inexpensively get - * their data (until the buffer runs out).

        - *

        However, the copy methods do the same thing, keeping an internal buffer, - * populated by {@link InputStream#read(byte[] b, int off, int len)} requests. Having two buffers - * (or three if the destination stream is also buffered) is pointless, and the unnecessary buffer - * management hurts performance slightly (about 3%, according to some simple experiments).

        + *

        + * The rationale is as follows: + *

        + *

        + * Imagine that an InputStream's read() is a very expensive operation, which would usually suggest wrapping in a + * BufferedInputStream. The BufferedInputStream works by issuing infrequent + * {@link java.io.InputStream#read(byte[] b, int off, int len)} requests on the underlying InputStream, to fill an + * internal buffer, from which further read requests can inexpensively get their data (until the buffer + * runs out). + *

        + *

        + * However, the copy methods do the same thing, keeping an internal buffer, populated by + * {@link InputStream#read(byte[] b, int off, int len)} requests. Having two buffers (or three if the destination stream + * is also buffered) is pointless, and the unnecessary buffer management hurts performance slightly (about 3%, according + * to some simple experiments). + *

        * * @author Peter Donald * @author Jeff Turner - * @version $Id$ + * * @since 4.0 */ /* - * Behold, intrepid explorers; a map of this class: - * - * Method Input Output Dependency - * ------ ----- ------ ------- - * 1 copy InputStream OutputStream (primitive) - * 2 copy Reader Writer (primitive) - * - * 3 copy InputStream Writer 2 - * 4 toString InputStream String 3 - * 5 toByteArray InputStream byte[] 1 - * - * 6 copy Reader OutputStream 2 - * 7 toString Reader String 2 - * 8 toByteArray Reader byte[] 6 - * - * 9 copy String OutputStream 2 - * 10 copy String Writer (trivial) - * 11 toByteArray String byte[] 9 - * - * 12 copy byte[] Writer 3 - * 13 toString byte[] String 12 - * 14 copy byte[] OutputStream (trivial) - * - * - * Note that only the first two methods shuffle bytes; the rest use these two, or (if possible) copy - * using native Java copy methods. As there are method variants to specify buffer size and encoding, - * each row may correspond to up to 4 methods. - * + * Behold, intrepid explorers; a map of this class: Method Input Output Dependency ------ ----- ------ ------- 1 copy + * InputStream OutputStream (primitive) 2 copy Reader Writer (primitive) 3 copy InputStream Writer 2 4 toString + * InputStream String 3 5 toByteArray InputStream byte[] 1 6 copy Reader OutputStream 2 7 toString Reader String 2 8 + * toByteArray Reader byte[] 6 9 copy String OutputStream 2 10 copy String Writer (trivial) 11 toByteArray String byte[] + * 9 12 copy byte[] Writer 3 13 toString byte[] String 12 14 copy byte[] OutputStream (trivial) Note that only the first + * two methods shuffle bytes; the rest use these two, or (if possible) copy using native Java copy methods. As there are + * method variants to specify buffer size and encoding, each row may correspond to up to 4 methods. */ -public final class IOUtil +public final class IOUtil extends BaseIOUtil { - private static final int DEFAULT_BUFFER_SIZE = 1024 * 4; + private static final int DEFAULT_BUFFER_SIZE = 1024 * 16; /** * Private constructor to prevent instantiation. @@ -167,25 +149,29 @@ private IOUtil() /** * Copy bytes from an InputStream to an OutputStream. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final InputStream input, final OutputStream output ) throws IOException { - copy( input, output, DEFAULT_BUFFER_SIZE ); + BaseIOUtil.copy( input, output ); } /** * Copy bytes from an InputStream to an OutputStream. + * @param input to convert + * @param output the result * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ - public static void copy( final InputStream input, - final OutputStream output, - final int bufferSize ) + public static void copy( final InputStream input, final OutputStream output, final int bufferSize ) throws IOException { final byte[] buffer = new byte[bufferSize]; int n = 0; - while ( -1 != ( n = input.read( buffer ) ) ) + while ( 0 <= ( n = input.read( buffer ) ) ) { output.write( buffer, 0, n ); } @@ -193,23 +179,29 @@ public static void copy( final InputStream input, /** * Copy chars from a Reader to a Writer. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final Reader input, final Writer output ) throws IOException { - copy( input, output, DEFAULT_BUFFER_SIZE ); + BaseIOUtil.copy( input, output ); } /** * Copy chars from a Reader to a Writer. + * @param input to convert + * @param output the result * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static void copy( final Reader input, final Writer output, final int bufferSize ) throws IOException { final char[] buffer = new char[bufferSize]; int n = 0; - while ( -1 != ( n = input.read( buffer ) ) ) + while ( 0 <= ( n = input.read( buffer ) ) ) { output.write( buffer, 0, n ); } @@ -221,14 +213,15 @@ public static void copy( final Reader input, final Writer output, final int buff // InputStream -> * /////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////// // InputStream -> Writer /** - * Copy and convert bytes from an InputStream to chars on a - * Writer. - * The platform's default encoding is used for the byte-to-char conversion. + * Copy and convert bytes from an InputStream to chars on a Writer. The platform's default + * encoding is used for the byte-to-char conversion. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final InputStream input, final Writer output ) throws IOException @@ -237,10 +230,12 @@ public static void copy( final InputStream input, final Writer output ) } /** - * Copy and convert bytes from an InputStream to chars on a - * Writer. - * The platform's default encoding is used for the byte-to-char conversion. + * Copy and convert bytes from an InputStream to chars on a Writer. The platform's default + * encoding is used for the byte-to-char conversion. + * @param input to convert + * @param output the result * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static void copy( final InputStream input, final Writer output, final int bufferSize ) throws IOException @@ -250,11 +245,14 @@ public static void copy( final InputStream input, final Writer output, final int } /** - * Copy and convert bytes from an InputStream to chars on a - * Writer, using the specified encoding. + * Copy and convert bytes from an InputStream to chars on a Writer, using the specified + * encoding. + * @param input to convert + * @param output the result * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. + * IANA Charset Registry for a list of valid + * encoding types. + * @throws IOException io issue */ public static void copy( final InputStream input, final Writer output, final String encoding ) throws IOException @@ -264,30 +262,31 @@ public static void copy( final InputStream input, final Writer output, final Str } /** - * Copy and convert bytes from an InputStream to chars on a - * Writer, using the specified encoding. + * Copy and convert bytes from an InputStream to chars on a Writer, using the specified + * encoding. + * @param input to convert + * @param output the result * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. + * IANA Charset Registry for a list of valid + * encoding types. * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ - public static void copy( final InputStream input, - final Writer output, - final String encoding, - final int bufferSize ) + public static void copy( final InputStream input, final Writer output, final String encoding, final int bufferSize ) throws IOException { final InputStreamReader in = new InputStreamReader( input, encoding ); copy( in, output, bufferSize ); } - /////////////////////////////////////////////////////////////// // InputStream -> String /** - * Get the contents of an InputStream as a String. - * The platform's default encoding is used for the byte-to-char conversion. + * @return Get the contents of an InputStream as a String. The platform's default encoding is used for the + * byte-to-char conversion. + * @param input to convert + * @throws IOException io issue */ public static String toString( final InputStream input ) throws IOException @@ -296,9 +295,11 @@ public static String toString( final InputStream input ) } /** - * Get the contents of an InputStream as a String. - * The platform's default encoding is used for the byte-to-char conversion. + * @return Get the contents of an InputStream as a String. The platform's default encoding is used for the + * byte-to-char conversion. + * @param input to convert * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static String toString( final InputStream input, final int bufferSize ) throws IOException @@ -309,10 +310,12 @@ public static String toString( final InputStream input, final int bufferSize ) } /** - * Get the contents of an InputStream as a String. + * @return Get the contents of an InputStream as a String. + * @param input to convert * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. + * IANA Charset Registry for a list of valid + * encoding types. + * @throws IOException io issue */ public static String toString( final InputStream input, final String encoding ) throws IOException @@ -321,15 +324,15 @@ public static String toString( final InputStream input, final String encoding ) } /** - * Get the contents of an InputStream as a String. + * @return Get the contents of an InputStream as a String. + * @param input to convert * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. + * IANA Charset Registry for a list of valid + * encoding types. * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ - public static String toString( final InputStream input, - final String encoding, - final int bufferSize ) + public static String toString( final InputStream input, final String encoding, final int bufferSize ) throws IOException { final StringWriter sw = new StringWriter(); @@ -341,7 +344,9 @@ public static String toString( final InputStream input, // InputStream -> byte[] /** - * Get the contents of an InputStream as a byte[]. + * @return Get the contents of an InputStream as a byte[]. + * @param input to convert + * @throws IOException io issue */ public static byte[] toByteArray( final InputStream input ) throws IOException @@ -350,8 +355,10 @@ public static byte[] toByteArray( final InputStream input ) } /** - * Get the contents of an InputStream as a byte[]. + * @return Get the contents of an InputStream as a byte[]. + * @param input to convert * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static byte[] toByteArray( final InputStream input, final int bufferSize ) throws IOException @@ -361,7 +368,6 @@ public static byte[] toByteArray( final InputStream input, final int bufferSize return output.toByteArray(); } - /////////////////////////////////////////////////////////////// // Derived copy methods // Reader -> * @@ -370,8 +376,11 @@ public static byte[] toByteArray( final InputStream input, final int bufferSize /////////////////////////////////////////////////////////////// // Reader -> OutputStream /** - * Serialize chars from a Reader to bytes on an OutputStream, and - * flush the OutputStream. + * Serialize chars from a Reader to bytes on an OutputStream, and flush the + * OutputStream. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final Reader input, final OutputStream output ) throws IOException @@ -380,9 +389,12 @@ public static void copy( final Reader input, final OutputStream output ) } /** - * Serialize chars from a Reader to bytes on an OutputStream, and - * flush the OutputStream. + * Serialize chars from a Reader to bytes on an OutputStream, and flush the + * OutputStream. + * @param input to convert + * @param output the result * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static void copy( final Reader input, final OutputStream output, final int bufferSize ) throws IOException @@ -397,7 +409,9 @@ public static void copy( final Reader input, final OutputStream output, final in /////////////////////////////////////////////////////////////// // Reader -> String /** - * Get the contents of a Reader as a String. + * @return Get the contents of a Reader as a String. + * @param input to convert + * @throws IOException io issue */ public static String toString( final Reader input ) throws IOException @@ -406,8 +420,10 @@ public static String toString( final Reader input ) } /** - * Get the contents of a Reader as a String. + * @return Get the contents of a Reader as a String. + * @param input to convert * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static String toString( final Reader input, final int bufferSize ) throws IOException @@ -417,11 +433,12 @@ public static String toString( final Reader input, final int bufferSize ) return sw.toString(); } - /////////////////////////////////////////////////////////////// // Reader -> byte[] /** - * Get the contents of a Reader as a byte[]. + * @return Get the contents of a Reader as a byte[]. + * @param input to convert + * @throws IOException io issue */ public static byte[] toByteArray( final Reader input ) throws IOException @@ -430,8 +447,10 @@ public static byte[] toByteArray( final Reader input ) } /** - * Get the contents of a Reader as a byte[]. + * @return Get the contents of a Reader as a byte[]. + * @param input to convert * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static byte[] toByteArray( final Reader input, final int bufferSize ) throws IOException @@ -441,19 +460,20 @@ public static byte[] toByteArray( final Reader input, final int bufferSize ) return output.toByteArray(); } - /////////////////////////////////////////////////////////////// // Derived copy methods // String -> * /////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////// // String -> OutputStream /** - * Serialize chars from a String to bytes on an OutputStream, and - * flush the OutputStream. + * Serialize chars from a String to bytes on an OutputStream, and flush the + * OutputStream. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final String input, final OutputStream output ) throws IOException @@ -462,9 +482,12 @@ public static void copy( final String input, final OutputStream output ) } /** - * Serialize chars from a String to bytes on an OutputStream, and - * flush the OutputStream. + * Serialize chars from a String to bytes on an OutputStream, and flush the + * OutputStream. + * @param input to convert + * @param output the result * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static void copy( final String input, final OutputStream output, final int bufferSize ) throws IOException @@ -477,13 +500,14 @@ public static void copy( final String input, final OutputStream output, final in out.flush(); } - - /////////////////////////////////////////////////////////////// // String -> Writer /** * Copy chars from a String to a Writer. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final String input, final Writer output ) throws IOException @@ -492,16 +516,17 @@ public static void copy( final String input, final Writer output ) } /** - * Copy bytes from an InputStream to an - * OutputStream, with buffering. - * This is equivalent to passing a - * {@link java.io.BufferedInputStream} and - * {@link java.io.BufferedOutputStream} to {@link #copy(InputStream, OutputStream)}, - * and flushing the output stream afterwards. The streams are not closed + * Copy bytes from an InputStream to an OutputStream, with buffering. This is equivalent + * to passing a {@link java.io.BufferedInputStream} and {@link java.io.BufferedOutputStream} to + * {@link #copy(InputStream, OutputStream)}, and flushing the output stream afterwards. The streams are not closed * after the copy. + * @param input to convert + * @param output the result * @deprecated Buffering streams is actively harmful! See the class description as to why. Use - * {@link #copy(InputStream, OutputStream)} instead. + * {@link #copy(InputStream, OutputStream)} instead. + * @throws IOException io issue */ + @Deprecated public static void bufferedCopy( final InputStream input, final OutputStream output ) throws IOException { @@ -511,11 +536,12 @@ public static void bufferedCopy( final InputStream input, final OutputStream out out.flush(); } - /////////////////////////////////////////////////////////////// // String -> byte[] /** - * Get the contents of a String as a byte[]. + * @return Get the contents of a String as a byte[]. + * @param input to convert + * @throws IOException io issue */ public static byte[] toByteArray( final String input ) throws IOException @@ -524,8 +550,10 @@ public static byte[] toByteArray( final String input ) } /** - * Get the contents of a String as a byte[]. + * @return Get the contents of a String as a byte[]. + * @param input to convert * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static byte[] toByteArray( final String input, final int bufferSize ) throws IOException @@ -535,21 +563,20 @@ public static byte[] toByteArray( final String input, final int bufferSize ) return output.toByteArray(); } - - /////////////////////////////////////////////////////////////// // Derived copy methods // byte[] -> * /////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////// // byte[] -> Writer /** - * Copy and convert bytes from a byte[] to chars on a - * Writer. - * The platform's default encoding is used for the byte-to-char conversion. + * Copy and convert bytes from a byte[] to chars on a Writer. The platform's default + * encoding is used for the byte-to-char conversion. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final byte[] input, final Writer output ) throws IOException @@ -558,10 +585,12 @@ public static void copy( final byte[] input, final Writer output ) } /** - * Copy and convert bytes from a byte[] to chars on a - * Writer. - * The platform's default encoding is used for the byte-to-char conversion. + * Copy and convert bytes from a byte[] to chars on a Writer. The platform's default + * encoding is used for the byte-to-char conversion. + * @param input to convert + * @param output the result * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static void copy( final byte[] input, final Writer output, final int bufferSize ) throws IOException @@ -571,11 +600,14 @@ public static void copy( final byte[] input, final Writer output, final int buff } /** - * Copy and convert bytes from a byte[] to chars on a - * Writer, using the specified encoding. + * Copy and convert bytes from a byte[] to chars on a Writer, using the specified + * encoding. + * @param input to convert + * @param output the result * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. + * IANA Charset Registry for a list of valid + * encoding types. + * @throws IOException io issue */ public static void copy( final byte[] input, final Writer output, final String encoding ) throws IOException @@ -585,30 +617,31 @@ public static void copy( final byte[] input, final Writer output, final String e } /** - * Copy and convert bytes from a byte[] to chars on a - * Writer, using the specified encoding. + * Copy and convert bytes from a byte[] to chars on a Writer, using the specified + * encoding. + * @param input to convert + * @param output the result * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. + * IANA Charset Registry for a list of valid + * encoding types. * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ - public static void copy( final byte[] input, - final Writer output, - final String encoding, - final int bufferSize ) + public static void copy( final byte[] input, final Writer output, final String encoding, final int bufferSize ) throws IOException { final ByteArrayInputStream in = new ByteArrayInputStream( input ); copy( in, output, encoding, bufferSize ); } - /////////////////////////////////////////////////////////////// // byte[] -> String /** - * Get the contents of a byte[] as a String. - * The platform's default encoding is used for the byte-to-char conversion. + * @return Get the contents of a byte[] as a String. The platform's default encoding is used for the + * byte-to-char conversion. + * @param input to convert + * @throws IOException io issue */ public static String toString( final byte[] input ) throws IOException @@ -617,9 +650,11 @@ public static String toString( final byte[] input ) } /** - * Get the contents of a byte[] as a String. - * The platform's default encoding is used for the byte-to-char conversion. + * @return Get the contents of a byte[] as a String. The platform's default encoding is used for the + * byte-to-char conversion. + * @param input to convert * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static String toString( final byte[] input, final int bufferSize ) throws IOException @@ -630,10 +665,12 @@ public static String toString( final byte[] input, final int bufferSize ) } /** - * Get the contents of a byte[] as a String. + * @return Get the contents of a byte[] as a String. + * @param input to convert * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. + * IANA Charset Registry for a list of valid + * encoding types. + * @throws IOException io issue */ public static String toString( final byte[] input, final String encoding ) throws IOException @@ -642,15 +679,16 @@ public static String toString( final byte[] input, final String encoding ) } /** - * Get the contents of a byte[] as a String. + * @return the contents of a byte[] as a String. + * @param input to convert * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. + * IANA Charset Registry for a list of valid + * encoding types. * @param bufferSize Size of internal buffer to use. + * + * @throws IOException io issue */ - public static String toString( final byte[] input, - final String encoding, - final int bufferSize ) + public static String toString( final byte[] input, final String encoding, final int bufferSize ) throws IOException { final StringWriter sw = new StringWriter(); @@ -658,12 +696,14 @@ public static String toString( final byte[] input, return sw.toString(); } - /////////////////////////////////////////////////////////////// // byte[] -> OutputStream /** * Copy bytes from a byte[] to an OutputStream. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final byte[] input, final OutputStream output ) throws IOException @@ -673,11 +713,12 @@ public static void copy( final byte[] input, final OutputStream output ) /** * Copy bytes from a byte[] to an OutputStream. + * @param input to convert + * @param output the result * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ - public static void copy( final byte[] input, - final OutputStream output, - final int bufferSize ) + public static void copy( final byte[] input, final OutputStream output, final int bufferSize ) throws IOException { output.write( input ); @@ -689,16 +730,16 @@ public static void copy( final byte[] input, * @param input1 the first stream * @param input2 the second stream * @return true if the content of the streams are equal or they both don't exist, false otherwise + * @throws IOException io issue */ - public static boolean contentEquals( final InputStream input1, - final InputStream input2 ) + public static boolean contentEquals( final InputStream input1, final InputStream input2 ) throws IOException { final InputStream bufferedInput1 = new BufferedInputStream( input1 ); final InputStream bufferedInput2 = new BufferedInputStream( input2 ); int ch = bufferedInput1.read(); - while ( -1 != ch ) + while ( 0 <= ch ) { final int ch2 = bufferedInput2.read(); if ( ch != ch2 ) @@ -709,7 +750,7 @@ public static boolean contentEquals( final InputStream input1, } final int ch2 = bufferedInput2.read(); - if ( -1 != ch2 ) + if ( 0 <= ch2 ) { return false; } @@ -727,7 +768,9 @@ public static boolean contentEquals( final InputStream input1, * Closes the input stream. The input stream can be null and any IOException's will be swallowed. * * @param inputStream The stream to close. + * @deprecated use try-with-resources instead */ + @Deprecated public static void close( InputStream inputStream ) { if ( inputStream == null ) @@ -739,7 +782,31 @@ public static void close( InputStream inputStream ) { inputStream.close(); } - catch( IOException ex ) + catch ( IOException ex ) + { + // ignore + } + } + + /** + * Closes a channel. Channel can be null and any IOException's will be swallowed. + * + * @param channel The stream to close. + * @deprecated use try-with-resources instead + */ + @Deprecated + public static void close( Channel channel ) + { + if ( channel == null ) + { + return; + } + + try + { + channel.close(); + } + catch ( IOException ex ) { // ignore } @@ -749,7 +816,9 @@ public static void close( InputStream inputStream ) * Closes the output stream. The output stream can be null and any IOException's will be swallowed. * * @param outputStream The stream to close. + * @deprecated use try-with-resources instead */ + @Deprecated public static void close( OutputStream outputStream ) { if ( outputStream == null ) @@ -761,7 +830,7 @@ public static void close( OutputStream outputStream ) { outputStream.close(); } - catch( IOException ex ) + catch ( IOException ex ) { // ignore } @@ -771,7 +840,9 @@ public static void close( OutputStream outputStream ) * Closes the reader. The reader can be null and any IOException's will be swallowed. * * @param reader The reader to close. + * @deprecated use try-with-resources instead */ + @Deprecated public static void close( Reader reader ) { if ( reader == null ) @@ -783,7 +854,7 @@ public static void close( Reader reader ) { reader.close(); } - catch( IOException ex ) + catch ( IOException ex ) { // ignore } @@ -793,7 +864,9 @@ public static void close( Reader reader ) * Closes the writer. The writer can be null and any IOException's will be swallowed. * * @param writer The writer to close. + * @deprecated use try-with-resources instead */ + @Deprecated public static void close( Writer writer ) { if ( writer == null ) @@ -805,7 +878,7 @@ public static void close( Writer writer ) { writer.close(); } - catch( IOException ex ) + catch ( IOException ex ) { // ignore } diff --git a/src/main/java/org/codehaus/plexus/util/InterpolationFilterReader.java b/src/main/java/org/codehaus/plexus/util/InterpolationFilterReader.java index 8eec7e44..c8515b2e 100644 --- a/src/main/java/org/codehaus/plexus/util/InterpolationFilterReader.java +++ b/src/main/java/org/codehaus/plexus/util/InterpolationFilterReader.java @@ -17,11 +17,11 @@ * distribution. * * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: + * any, must include the following acknowledgement: * "This product includes software developed by the * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * Alternately, this acknowledgement may appear in the software itself, + * if and wherever such third-party acknowledgements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived @@ -61,6 +61,22 @@ import java.util.Map; /** + * A FilterReader which interpolates keyword values into a character stream. Keywords are recognized when enclosed + * between starting and ending delimiter strings. The keywords themselves, and their values, are fetched from a Map + * supplied to the constructor. + *

        + * When a possible keyword token is recognized (by detecting the starting and ending token delimiters): + *

        + *
          + *
        • if the enclosed string is found in the keyword Map, the delimiters and the keyword are effectively replaced by + * the keyword's value;
        • + *
        • if the enclosed string is found in the keyword Map, but its value has zero length, then the token (delimiters and + * keyword) is effectively removed from the character stream;
        • + *
        • if the enclosed string is not found in the keyword Map, then no substitution is made; the token text is + * passed through unaltered.
        • + *
        + * + * @see LineOrientedInterpolatingReader s */ public class InterpolationFilterReader extends FilterReader @@ -75,7 +91,7 @@ public class InterpolationFilterReader private int previousIndex = -1; /** Hashtable to hold the replacee-replacer pairs (String to String). */ - private Map variables = new HashMap(); + private Map variables = new HashMap(); /** Character marking the beginning of a token. */ private String beginToken; @@ -90,12 +106,20 @@ public class InterpolationFilterReader private int endTokenLength; /** Default begin token. */ - private static String DEFAULT_BEGIN_TOKEN = "${"; + private static final String DEFAULT_BEGIN_TOKEN = "${"; /** Default end token. */ - private static String DEFAULT_END_TOKEN = "}"; + private static final String DEFAULT_END_TOKEN = "}"; - public InterpolationFilterReader( Reader in, Map variables, String beginToken, String endToken ) + /** + * Construct a Reader to interpolate values enclosed between the given delimiter tokens. + * + * @param in a Reader to be wrapped for interpolation. + * @param variables name/value pairs to be interpolated into the character stream. + * @param beginToken an interpolation target begins with this. + * @param endToken an interpolation target ends with this. + */ + public InterpolationFilterReader( Reader in, Map variables, String beginToken, String endToken ) { super( in ); @@ -107,23 +131,29 @@ public InterpolationFilterReader( Reader in, Map variables, String beginToken, S endTokenLength = endToken.length(); } - public InterpolationFilterReader( Reader in, Map variables ) + /** + * Construct a Reader using the default interpolation delimiter tokens "${" and "}". + * + * @param in a Reader to be wrapped for interpolation. + * @param variables name/value pairs to be interpolated into the character stream. + */ + public InterpolationFilterReader( Reader in, Map variables ) { this( in, variables, DEFAULT_BEGIN_TOKEN, DEFAULT_END_TOKEN ); } /** - * Skips characters. This method will block until some characters are - * available, an I/O error occurs, or the end of the stream is reached. - * - * @param n The number of characters to skip - * - * @return the number of characters actually skipped + * Skips characters. This method will block until some characters are available, an I/O error occurs, or the end of + * the stream is reached. * - * @exception IllegalArgumentException If n is negative. - * @exception IOException If an I/O error occurs + * @param n The number of characters to skip + * @return the number of characters actually skipped + * @exception IllegalArgumentException If n is negative. + * @exception IOException If an I/O error occurs */ - public long skip( long n ) throws IOException + @Override + public long skip( long n ) + throws IOException { if ( n < 0L ) { @@ -141,23 +171,17 @@ public long skip( long n ) throws IOException } /** - * Reads characters into a portion of an array. This method will block - * until some input is available, an I/O error occurs, or the end of the - * stream is reached. - * - * @param cbuf Destination buffer to write characters to. - * Must not be null. - * @param off Offset at which to start storing characters. - * @param len Maximum number of characters to read. - * - * @return the number of characters read, or -1 if the end of the - * stream has been reached + * Reads characters into a portion of an array. This method will block until some input is available, an I/O error + * occurs, or the end of the stream is reached. * - * @exception IOException If an I/O error occurs + * @param cbuf Destination buffer to write characters to. Must not be null. + * @param off Offset at which to start storing characters. + * @param len Maximum number of characters to read. + * @return the number of characters read, or -1 if the end of the stream has been reached + * @exception IOException If an I/O error occurs */ - public int read( char cbuf[], - int off, - int len ) + @Override + public int read( char cbuf[], int off, int len ) throws IOException { for ( int i = 0; i < len; i++ ) @@ -180,16 +204,14 @@ public int read( char cbuf[], } /** - * Returns the next character in the filtered stream, replacing tokens - * from the original stream. + * Returns the next character in the filtered stream, replacing tokens from the original stream. * - * @return the next character in the resulting stream, or -1 - * if the end of the resulting stream has been reached - * - * @exception IOException if the underlying stream throws an IOException - * during reading + * @return the next character in the resulting stream, or -1 if the end of the resulting stream has been reached + * @exception IOException if the underlying stream throws an IOException during reading */ - public int read() throws IOException + @Override + public int read() + throws IOException { if ( replaceIndex != -1 && replaceIndex < replaceData.length() ) { @@ -201,7 +223,7 @@ public int read() throws IOException return ch; } - int ch = -1; + int ch; if ( previousIndex != -1 && previousIndex < endTokenLength ) { ch = endToken.charAt( previousIndex++ ); @@ -213,7 +235,7 @@ public int read() throws IOException if ( ch == beginToken.charAt( 0 ) ) { - StringBuffer key = new StringBuffer(); + StringBuilder key = new StringBuilder(); int beginTokenMatchPos = 1; @@ -231,8 +253,8 @@ public int read() throws IOException { key.append( (char) ch ); - if ( ( beginTokenMatchPos < beginTokenLength ) && - ( ch != beginToken.charAt( beginTokenMatchPos++ ) ) ) + if ( ( beginTokenMatchPos < beginTokenLength ) + && ( ch != beginToken.charAt( beginTokenMatchPos++ ) ) ) { ch = -1; // not really EOF but to trigger code below break; @@ -292,7 +314,7 @@ public int read() throws IOException String variableKey = key.substring( beginTokenLength - 1, key.length() - endTokenLength ); - Object o = variables.get(variableKey); + Object o = variables.get( variableKey ); if ( o != null ) { String value = o.toString(); @@ -306,9 +328,9 @@ public int read() throws IOException else { previousIndex = 0; - replaceData = key.substring(0, key.length() - endTokenLength ); + replaceData = key.substring( 0, key.length() - endTokenLength ); replaceIndex = 0; - return beginToken.charAt(0); + return beginToken.charAt( 0 ); } } diff --git a/src/main/java/org/codehaus/plexus/util/LineOrientedInterpolatingReader.java b/src/main/java/org/codehaus/plexus/util/LineOrientedInterpolatingReader.java index 47a5ba2f..8129018f 100644 --- a/src/main/java/org/codehaus/plexus/util/LineOrientedInterpolatingReader.java +++ b/src/main/java/org/codehaus/plexus/util/LineOrientedInterpolatingReader.java @@ -25,13 +25,32 @@ import java.io.Reader; import java.util.Collections; import java.util.HashSet; -import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.TreeMap; /** + * A FilterReader which interpolates keyword values into a character stream. Keywords are recognized when enclosed + * between starting and ending delimiter strings. The keywords themselves, and their values, are fetched from a Map + * supplied to the constructor. + *

        + * When a possible keyword token is recognized (by detecting the starting and ending token delimiters): + *

        + *
          + *
        • if the enclosed string is found in the keyword Map, the delimiters and the keyword are effectively replaced by + * the keyword's value;
        • + *
        • if the enclosed string is found in the keyword Map, but its value has zero length, then the token (delimiters and + * keyword) is effectively removed from the character stream;
        • + *
        • if the enclosed string is not found in the keyword Map, then no substitution is made; the token text is + * passed through unaltered.
        • + *
        + * + *

        A token in the incoming character stream may be escaped by prepending an "escape sequence" which is + * specified to the constructor. An escaped token is passed through as written, with the escape sequence removed. This + * allows things which would look like tokens to be read literally rather than interpolated.

        + * * @author jdcasey Created on Feb 3, 2005 + * @see InterpolationFilterReader */ public class LineOrientedInterpolatingReader extends FilterReader @@ -48,7 +67,7 @@ public class LineOrientedInterpolatingReader private final PushbackReader pushbackReader; - private final Map context; + private final Map context; private final String startDelim; @@ -64,8 +83,17 @@ public class LineOrientedInterpolatingReader private String line; - public LineOrientedInterpolatingReader( Reader reader, Map context, String startDelim, String endDelim, - String escapeSeq ) + /** + * Construct an interpolating Reader, specifying token delimiters and the escape sequence. + * + * @param reader the Reader to be filtered. + * @param context keyword/value pairs for interpolation. + * @param startDelim character sequence which (possibly) begins a token. + * @param endDelim character sequence which ends a token. + * @param escapeSeq escape sequence + */ + public LineOrientedInterpolatingReader( Reader reader, Map context, String startDelim, String endDelim, + String escapeSeq ) { super( reader ); @@ -92,17 +120,33 @@ public LineOrientedInterpolatingReader( Reader reader, Map context, String start } } - public LineOrientedInterpolatingReader( Reader reader, Map context, String startDelim, String endDelim ) + /** + * Filters a Reader using the default escape sequence "\". + * + * @param reader the Reader to be filtered. + * @param context keyword/value pairs for interpolation. + * @param startDelim the character sequence which (possibly) begins a token. + * @param endDelim the character sequence which ends a token. + */ + public LineOrientedInterpolatingReader( Reader reader, Map context, String startDelim, String endDelim ) { this( reader, context, startDelim, endDelim, DEFAULT_ESCAPE_SEQ ); } - public LineOrientedInterpolatingReader( Reader reader, Map context ) + /** + * Filters a Reader using the default escape sequence "\" and token delimiters "${", "}". + * + * @param reader the Reader to be filtered. + * @param context keyword/value pairs for interpolation. + */ + public LineOrientedInterpolatingReader( Reader reader, Map context ) { this( reader, context, DEFAULT_START_DELIM, DEFAULT_END_DELIM, DEFAULT_ESCAPE_SEQ ); } - public int read() throws IOException + @Override + public int read() + throws IOException { if ( line == null || lineIdx >= line.length() ) { @@ -119,7 +163,9 @@ public int read() throws IOException return next; } - public int read( char[] cbuf, int off, int len ) throws IOException + @Override + public int read( char[] cbuf, int off, int len ) + throws IOException { int fillCount = 0; @@ -146,7 +192,9 @@ public int read( char[] cbuf, int off, int len ) throws IOException return fillCount; } - public long skip( long n ) throws IOException + @Override + public long skip( long n ) + throws IOException { long skipCount = 0; @@ -165,15 +213,16 @@ public long skip( long n ) throws IOException return skipCount; } - private void readAndInterpolateLine() throws IOException + private void readAndInterpolateLine() + throws IOException { String rawLine = readLine(); - if(rawLine != null) + if ( rawLine != null ) { - Set expressions = parseForExpressions( rawLine ); + Set expressions = parseForExpressions( rawLine ); - Map evaluatedExpressions = evaluateExpressions( expressions ); + Map evaluatedExpressions = evaluateExpressions( expressions ); String interpolated = replaceWithInterpolatedValues( rawLine, evaluatedExpressions ); @@ -190,10 +239,15 @@ private void readAndInterpolateLine() throws IOException } } - private String readLine() throws IOException + /* + * Read one line from the wrapped Reader. A line is a sequence of characters ending in CRLF, CR, or LF. The + * terminating character(s) will be included in the returned line. + */ + private String readLine() + throws IOException { - StringBuffer lineBuffer = new StringBuffer( 40 ); // half of the "normal" line maxsize - int next = -1; + StringBuilder lineBuffer = new StringBuilder( 40 ); // half of the "normal" line maxsize + int next; boolean lastWasCR = false; while ( ( next = pushbackReader.read() ) > -1 ) @@ -231,13 +285,13 @@ else if ( lastWasCR ) } } - private String replaceWithInterpolatedValues( String rawLine, Map evaluatedExpressions ) + private String replaceWithInterpolatedValues( String rawLine, Map evaluatedExpressions ) { String result = rawLine; - for ( Iterator it = evaluatedExpressions.entrySet().iterator(); it.hasNext(); ) + for ( Object o : evaluatedExpressions.entrySet() ) { - Map.Entry entry = (Map.Entry) it.next(); + Map.Entry entry = (Map.Entry) o; String expression = (String) entry.getKey(); @@ -249,16 +303,16 @@ private String replaceWithInterpolatedValues( String rawLine, Map evaluatedExpre return result; } - private Map evaluateExpressions( Set expressions ) + private Map evaluateExpressions( Set expressions ) { - Map evaluated = new TreeMap(); + Map evaluated = new TreeMap(); - for ( Iterator it = expressions.iterator(); it.hasNext(); ) + for ( Object expression : expressions ) { - String rawExpression = (String) it.next(); + String rawExpression = (String) expression; - String realExpression = rawExpression.substring( startDelim.length(), rawExpression.length() - - endDelim.length() ); + String realExpression = + rawExpression.substring( startDelim.length(), rawExpression.length() - endDelim.length() ); String[] parts = realExpression.split( "\\." ); if ( parts.length > 0 ) @@ -295,9 +349,9 @@ private Map evaluateExpressions( Set expressions ) return evaluated; } - private Set parseForExpressions( String rawLine ) + private Set parseForExpressions( String rawLine ) { - Set expressions = new HashSet(); + Set expressions = new HashSet(); if ( rawLine != null ) { @@ -332,7 +386,8 @@ private Set parseForExpressions( String rawLine ) // increment the placeholder so we can look beyond this expression. placeholder = end + 1; - } while ( placeholder < rawLine.length() - minExpressionSize ); + } + while ( placeholder < rawLine.length() - minExpressionSize ); } return expressions; @@ -342,7 +397,7 @@ private int findDelimiter( String rawLine, String delimiter, int lastPos ) { int placeholder = lastPos; - int position = -1; + int position; do { position = rawLine.indexOf( delimiter, placeholder ); @@ -362,33 +417,34 @@ private int findDelimiter( String rawLine, String delimiter, int lastPos ) } } - } while ( position < 0 && placeholder < rawLine.length() - endDelim.length() ); + } + while ( position < 0 && placeholder < rawLine.length() - endDelim.length() ); // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // use length() - endDelim.length() b/c otherwise there is nothing left to search. return position; } - private String findAndReplaceUnlessEscaped(String rawLine, String search, String replace) + private String findAndReplaceUnlessEscaped( String rawLine, String search, String replace ) { - StringBuffer lineBuffer = new StringBuffer( (int)(rawLine.length() * 1.5) ); + StringBuilder lineBuffer = new StringBuilder( (int) ( rawLine.length() * 1.5 ) ); int lastReplacement = -1; do { int nextReplacement = rawLine.indexOf( search, lastReplacement + 1 ); - if(nextReplacement > -1) + if ( nextReplacement > -1 ) { - if(lastReplacement < 0) + if ( lastReplacement < 0 ) { lastReplacement = 0; } - lineBuffer.append( rawLine.substring( lastReplacement, nextReplacement ) ); + lineBuffer.append( rawLine, lastReplacement, nextReplacement ); int escIdx = rawLine.indexOf( escapeSeq, lastReplacement + 1 ); - if(escIdx > -1 && escIdx + escapeSeq.length() == nextReplacement) + if ( escIdx > -1 && escIdx + escapeSeq.length() == nextReplacement ) { lineBuffer.setLength( lineBuffer.length() - escapeSeq.length() ); lineBuffer.append( search ); @@ -405,14 +461,14 @@ private String findAndReplaceUnlessEscaped(String rawLine, String search, String break; } } - while(lastReplacement > -1); + while ( lastReplacement > -1 ); - if( lastReplacement < rawLine.length() ) + if ( lastReplacement < rawLine.length() ) { - lineBuffer.append( rawLine.substring( lastReplacement ) ); + lineBuffer.append( rawLine, lastReplacement, rawLine.length() ); } return lineBuffer.toString(); } -} \ No newline at end of file +} diff --git a/src/main/java/org/codehaus/plexus/util/MatchPattern.java b/src/main/java/org/codehaus/plexus/util/MatchPattern.java new file mode 100644 index 00000000..de57de21 --- /dev/null +++ b/src/main/java/org/codehaus/plexus/util/MatchPattern.java @@ -0,0 +1,146 @@ +package org.codehaus.plexus.util; + +/* + * Copyright The Codehaus Foundation. + * + * Licensed 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. + */ + +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.StringTokenizer; + +/** + *

        Describes a match target for SelectorUtils.

        + * + *

        Significantly more efficient than using strings, since re-evaluation and re-tokenizing is avoided.

        + * + * @author Kristian Rosenvold + */ +public class MatchPattern +{ + private final String source; + + private final String regexPattern; + + private final String separator; + + private final String[] tokenized; + + private final char[][] tokenizedChar; + + private MatchPattern( String source, String separator ) + { + regexPattern = SelectorUtils.isRegexPrefixedPattern( source ) + ? source.substring( SelectorUtils.REGEX_HANDLER_PREFIX.length(), + source.length() - SelectorUtils.PATTERN_HANDLER_SUFFIX.length() ) + : null; + this.source = SelectorUtils.isAntPrefixedPattern( source ) + ? source.substring( SelectorUtils.ANT_HANDLER_PREFIX.length(), + source.length() - SelectorUtils.PATTERN_HANDLER_SUFFIX.length() ) + : source; + this.separator = separator; + tokenized = tokenizePathToString( this.source, separator ); + tokenizedChar = new char[tokenized.length][]; + for ( int i = 0; i < tokenized.length; i++ ) + { + tokenizedChar[i] = tokenized[i].toCharArray(); + } + + } + + public boolean matchPath( String str, boolean isCaseSensitive ) + { + if ( regexPattern != null ) + { + return str.matches( regexPattern ); + } + else + { + return SelectorUtils.matchAntPathPattern( this, str, separator, isCaseSensitive ); + } + } + + boolean matchPath( String str, char[][] strDirs, boolean isCaseSensitive ) + { + if ( regexPattern != null ) + { + return str.matches( regexPattern ); + } + else + { + return SelectorUtils.matchAntPathPattern( getTokenizedPathChars(), strDirs, isCaseSensitive ); + } + } + + public boolean matchPatternStart( String str, boolean isCaseSensitive ) + { + if ( regexPattern != null ) + { + // FIXME: ICK! But we can't do partial matches for regex, so we have to reserve judgement until we have + // a file to deal with, or we can definitely say this is an exclusion... + return true; + } + else + { + String altStr = str.replace( '\\', '/' ); + + return SelectorUtils.matchAntPathPatternStart( this, str, File.separator, isCaseSensitive ) + || SelectorUtils.matchAntPathPatternStart( this, altStr, "/", isCaseSensitive ); + } + } + + public String[] getTokenizedPathString() + { + return tokenized; + } + + public char[][] getTokenizedPathChars() + { + return tokenizedChar; + } + + public boolean startsWith( String string ) + { + return source.startsWith( string ); + } + + static String[] tokenizePathToString( String path, String separator ) + { + List ret = new ArrayList(); + StringTokenizer st = new StringTokenizer( path, separator ); + while ( st.hasMoreTokens() ) + { + ret.add( st.nextToken() ); + } + return ret.toArray( new String[0] ); + } + + static char[][] tokenizePathToCharArray( String path, String separator ) + { + String[] tokenizedName = tokenizePathToString( path, separator ); + char[][] tokenizedNameChar = new char[tokenizedName.length][]; + for ( int i = 0; i < tokenizedName.length; i++ ) + { + tokenizedNameChar[i] = tokenizedName[i].toCharArray(); + } + return tokenizedNameChar; + } + + public static MatchPattern fromString( String source ) + { + return new MatchPattern( source, File.separator ); + } + +} diff --git a/src/main/java/org/codehaus/plexus/util/MatchPatterns.java b/src/main/java/org/codehaus/plexus/util/MatchPatterns.java new file mode 100644 index 00000000..35f9ea22 --- /dev/null +++ b/src/main/java/org/codehaus/plexus/util/MatchPatterns.java @@ -0,0 +1,96 @@ +package org.codehaus.plexus.util; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +/** + * A list of patterns to be matched + * + * @author Kristian Rosenvold + */ +public class MatchPatterns +{ + private final MatchPattern[] patterns; + + private MatchPatterns( MatchPattern[] patterns ) + { + this.patterns = patterns; + } + + /** + *

        Checks these MatchPatterns against a specified string.

        + * + *

        Uses far less string tokenization than any of the alternatives.

        + * + * @param name The name to look for + * @param isCaseSensitive If the comparison is case sensitive + * @return true if any of the supplied patterns match + */ + public boolean matches( String name, boolean isCaseSensitive ) + { + String[] tokenized = MatchPattern.tokenizePathToString( name, File.separator ); + return matches( name, tokenized, isCaseSensitive ); + } + + public boolean matches( String name, String[] tokenizedName, boolean isCaseSensitive ) + { + char[][] tokenizedNameChar = new char[tokenizedName.length][]; + for ( int i = 0; i < tokenizedName.length; i++ ) + { + tokenizedNameChar[i] = tokenizedName[i].toCharArray(); + } + return matches(name, tokenizedNameChar, isCaseSensitive); + } + + public boolean matches(String name, char[][] tokenizedNameChar, boolean isCaseSensitive) + { + for ( MatchPattern pattern : patterns ) + { + if ( pattern.matchPath( name, tokenizedNameChar, isCaseSensitive ) ) + { + return true; + } + } + return false; + } + + public boolean matchesPatternStart( String name, boolean isCaseSensitive ) + { + for ( MatchPattern includesPattern : patterns ) + { + if ( includesPattern.matchPatternStart( name, isCaseSensitive ) ) + { + return true; + } + } + return false; + } + + public static MatchPatterns from( String... sources ) + { + final int length = sources.length; + MatchPattern[] result = new MatchPattern[length]; + for ( int i = 0; i < length; i++ ) + { + result[i] = MatchPattern.fromString( sources[i] ); + } + return new MatchPatterns( result ); + } + + public static MatchPatterns from( Iterable strings ) + { + return new MatchPatterns( getMatchPatterns( strings ) ); + } + + private static MatchPattern[] getMatchPatterns( Iterable items ) + { + List result = new ArrayList(); + for ( String string : items ) + { + result.add( MatchPattern.fromString( string ) ); + } + return result.toArray( new MatchPattern[0] ); + } + +} diff --git a/src/main/java/org/codehaus/plexus/util/NioFiles.java b/src/main/java/org/codehaus/plexus/util/NioFiles.java new file mode 100644 index 00000000..eb62bac7 --- /dev/null +++ b/src/main/java/org/codehaus/plexus/util/NioFiles.java @@ -0,0 +1,145 @@ +package org.codehaus.plexus.util; + +/* + * Copyright 2007 The Codehaus Foundation. + * + * Licensed 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. + */ + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.LinkOption; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.nio.file.attribute.BasicFileAttributes; +import java.nio.file.attribute.PosixFilePermission; +import java.util.HashSet; +import java.util.Set; + +/** + * Encapsulates use of java7 features, exposing mostly backward compatible types + */ +@SuppressWarnings( "Since15" ) +public class NioFiles +{ + public static boolean isSymbolicLink( File file ) + { + return Files.isSymbolicLink( file.toPath() ); + } + + public static void chmod( File file, int mode ) + throws IOException + { + Path path = file.toPath(); + if ( !Files.isSymbolicLink( path ) ) + { + Files.setPosixFilePermissions( path, getPermissions( mode ) ); + } + } + + @SuppressWarnings( { "OctalInteger", "MagicNumber" } ) + private static Set getPermissions( int mode ) + { + Set perms = new HashSet<>(); + // add owners permission + if ( ( mode & 0400 ) > 0 ) + { + perms.add( PosixFilePermission.OWNER_READ ); + } + if ( ( mode & 0200 ) > 0 ) + { + perms.add( PosixFilePermission.OWNER_WRITE ); + } + if ( ( mode & 0100 ) > 0 ) + { + perms.add( PosixFilePermission.OWNER_EXECUTE ); + } + // add group permissions + if ( ( mode & 0040 ) > 0 ) + { + perms.add( PosixFilePermission.GROUP_READ ); + } + if ( ( mode & 0020 ) > 0 ) + { + perms.add( PosixFilePermission.GROUP_WRITE ); + } + if ( ( mode & 0010 ) > 0 ) + { + perms.add( PosixFilePermission.GROUP_EXECUTE ); + } + // add others permissions + if ( ( mode & 0004 ) > 0 ) + { + perms.add( PosixFilePermission.OTHERS_READ ); + } + if ( ( mode & 0002 ) > 0 ) + { + perms.add( PosixFilePermission.OTHERS_WRITE ); + } + if ( ( mode & 0001 ) > 0 ) + { + perms.add( PosixFilePermission.OTHERS_EXECUTE ); + } + return perms; + } + + public static long getLastModified( File file ) + throws IOException + { + BasicFileAttributes basicFileAttributes = Files.readAttributes( file.toPath(), BasicFileAttributes.class ); + return basicFileAttributes.lastModifiedTime().toMillis(); + } + + /** + * Reads the target of the symbolic link + * + * @param symlink A file that is a symlink + * @return A file that is the target of the symlink + * @throws java.io.IOException io issue + */ + + public static File readSymbolicLink( File symlink ) + throws IOException + { + Path path = Files.readSymbolicLink( symlink.toPath() ); + return path.toFile(); + } + + public static File createSymbolicLink( File symlink, File target ) + throws IOException + { + Path link = symlink.toPath(); + if ( Files.exists( link, LinkOption.NOFOLLOW_LINKS ) ) + { + Files.delete( link ); + } + link = Files.createSymbolicLink( link, target.toPath() ); + return link.toFile(); + } + + public static boolean deleteIfExists( File file ) + throws IOException + { + return Files.deleteIfExists( file.toPath() ); + } + + public static File copy( File source, File target ) + throws IOException + { + Path copy = Files.copy( source.toPath(), target.toPath(), StandardCopyOption.REPLACE_EXISTING, + StandardCopyOption.COPY_ATTRIBUTES ); + return copy.toFile(); + } + +} diff --git a/src/main/java/org/codehaus/plexus/util/Os.java b/src/main/java/org/codehaus/plexus/util/Os.java index c8fc6b42..b4ed2882 100644 --- a/src/main/java/org/codehaus/plexus/util/Os.java +++ b/src/main/java/org/codehaus/plexus/util/Os.java @@ -1,3 +1,5 @@ +package org.codehaus.plexus.util; + /* * The Apache Software License, Version 1.1 * @@ -17,11 +19,11 @@ * distribution. * * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: + * any, must include the following acknowledgement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * Alternately, this acknowledgement may appear in the software itself, + * if and wherever such third-party acknowledgements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived @@ -52,10 +54,7 @@ * . */ -package org.codehaus.plexus.util; - import java.util.HashSet; -import java.util.Iterator; import java.util.Locale; import java.util.Set; @@ -66,7 +65,7 @@ * @author Magesh Umasankar * @author Brian Fox * @since 1.0 - * @version $Revision$ + * */ public class Os { @@ -94,7 +93,7 @@ public class Os public static final String FAMILY_OPENVMS = "openvms"; // store the valid families - private static final Set validFamilies = setValidFamilies(); + private static final Set validFamilies = setValidFamilies(); // get the current info private static final String PATH_SEP = System.getProperty( "path.separator" ); @@ -136,9 +135,9 @@ public Os( String family ) /** * Initializes the set of valid families. */ - private static Set setValidFamilies() + private static Set setValidFamilies() { - Set valid = new HashSet(); + Set valid = new HashSet(); valid.add( FAMILY_DOS ); valid.add( FAMILY_MAC ); valid.add( FAMILY_NETWARE ); @@ -157,8 +156,8 @@ private static Set setValidFamilies() /** * Sets the desired OS family type * - * @param f The OS family type desired
        - * Possible values:
        + * @param f The OS family type desired
        + * Possible values: *
          *
        • dos
        • *
        • mac
        • @@ -209,10 +208,10 @@ public void setVersion( String version ) } /** - * Determines if the current OS matches the type of that - * set in setFamily. - * + * @return Determines if the current OS matches the type of that set in setFamily. + * * @see Os#setFamily(String) + * @throws Exception any errir */ public boolean eval() throws Exception @@ -221,8 +220,7 @@ public boolean eval() } /** - * Determines if the current OS matches the given OS - * family. + * Determines if the current OS matches the given OS family. * * @param family the family to check for * @return true if the OS matches @@ -234,8 +232,7 @@ public static boolean isFamily( String family ) } /** - * Determines if the current OS matches the given OS - * name. + * Determines if the current OS matches the given OS name. * * @param name the OS name to check for * @return true if the OS matches @@ -247,8 +244,7 @@ public static boolean isName( String name ) } /** - * Determines if the current OS matches the given OS - * architecture. + * Determines if the current OS matches the given OS architecture. * * @param arch the OS architecture to check for * @return true if the OS matches @@ -260,8 +256,7 @@ public static boolean isArch( String arch ) } /** - * Determines if the current OS matches the given OS - * version. + * Determines if the current OS matches the given OS version. * * @param version the OS version to check for * @return true if the OS matches @@ -273,12 +268,8 @@ public static boolean isVersion( String version ) } /** - * Determines if the current OS matches the given OS - * family, name, architecture and version. - * - * The name, archictecture and version are compared to - * the System properties os.name, os.version and os.arch - * in a case-independent way. + * Determines if the current OS matches the given OS family, name, architecture and version. The name, architecture + * and version are compared to the System properties os.name, os.version and os.arch in a case-independent way. * * @param family The OS family * @param name The OS name @@ -303,27 +294,29 @@ public static boolean isOs( String family, String name, String arch, String vers { if ( family.equalsIgnoreCase( FAMILY_WINDOWS ) ) { - isFamily = OS_NAME.indexOf( FAMILY_WINDOWS ) > -1; + isFamily = OS_NAME.contains( FAMILY_WINDOWS ); } else if ( family.equalsIgnoreCase( FAMILY_OS2 ) ) { - isFamily = OS_NAME.indexOf( FAMILY_OS2 ) > -1; + isFamily = OS_NAME.contains( FAMILY_OS2 ); } else if ( family.equalsIgnoreCase( FAMILY_NETWARE ) ) { - isFamily = OS_NAME.indexOf( FAMILY_NETWARE ) > -1; + isFamily = OS_NAME.contains( FAMILY_NETWARE ); } else if ( family.equalsIgnoreCase( FAMILY_DOS ) ) { - isFamily = PATH_SEP.equals( ";" ) && !isFamily( FAMILY_NETWARE ); + isFamily = PATH_SEP.equals( ";" ) && !isFamily( FAMILY_NETWARE ) && !isFamily( FAMILY_WINDOWS ) + && !isFamily( FAMILY_WIN9X ); + } else if ( family.equalsIgnoreCase( FAMILY_MAC ) ) { - isFamily = OS_NAME.indexOf( FAMILY_MAC ) > -1; + isFamily = OS_NAME.contains( FAMILY_MAC ); } else if ( family.equalsIgnoreCase( FAMILY_TANDEM ) ) { - isFamily = OS_NAME.indexOf( "nonstop_kernel" ) > -1; + isFamily = OS_NAME.contains( "nonstop_kernel" ); } else if ( family.equalsIgnoreCase( FAMILY_UNIX ) ) { @@ -332,25 +325,24 @@ else if ( family.equalsIgnoreCase( FAMILY_UNIX ) ) } else if ( family.equalsIgnoreCase( FAMILY_WIN9X ) ) { - isFamily = isFamily( FAMILY_WINDOWS ) - && ( OS_NAME.indexOf( "95" ) >= 0 || OS_NAME.indexOf( "98" ) >= 0 - || OS_NAME.indexOf( "me" ) >= 0 || OS_NAME.indexOf( "ce" ) >= 0 ); + isFamily = isFamily( FAMILY_WINDOWS ) && ( OS_NAME.contains( "95" ) || OS_NAME.contains( "98" ) + || OS_NAME.contains( "me" ) || OS_NAME.contains( "ce" ) ); } else if ( family.equalsIgnoreCase( FAMILY_ZOS ) ) { - isFamily = OS_NAME.indexOf( FAMILY_ZOS ) > -1 || OS_NAME.indexOf( "os/390" ) > -1; + isFamily = OS_NAME.contains( FAMILY_ZOS ) || OS_NAME.contains( "os/390" ); } else if ( family.equalsIgnoreCase( FAMILY_OS400 ) ) { - isFamily = OS_NAME.indexOf( FAMILY_OS400 ) > -1; + isFamily = OS_NAME.contains( FAMILY_OS400 ); } else if ( family.equalsIgnoreCase( FAMILY_OPENVMS ) ) { - isFamily = OS_NAME.indexOf( FAMILY_OPENVMS ) > -1; + isFamily = OS_NAME.contains( FAMILY_OPENVMS ); } else { - isFamily = OS_NAME.indexOf( family.toLowerCase( Locale.US ) ) > -1; + isFamily = OS_NAME.contains( family.toLowerCase( Locale.US ) ); } } if ( name != null ) @@ -381,7 +373,7 @@ private static String getOsFamily() // in case the order of static initialization is // wrong, get the list // safely. - Set families = null; + Set families = null; if ( !validFamilies.isEmpty() ) { families = validFamilies; @@ -390,10 +382,8 @@ private static String getOsFamily() { families = setValidFamilies(); } - Iterator iter = families.iterator(); - while ( iter.hasNext() ) + for ( String fam : families ) { - String fam = (String) iter.next(); if ( Os.isFamily( fam ) ) { return fam; @@ -403,8 +393,7 @@ private static String getOsFamily() } /** - * Helper method to check if the given family is in the - * following list: + * Helper method to check if the given family is in the following list: *
            *
          • dos
          • *
          • mac
          • @@ -432,8 +421,8 @@ public static boolean isValidFamily( String theFamily ) * @return a copy of the valid families * @since 1.4.2 */ - public static Set getValidFamilies() + public static Set getValidFamilies() { - return new HashSet( validFamilies ); + return new HashSet( validFamilies ); } } diff --git a/src/main/java/org/codehaus/plexus/util/PathTool.java b/src/main/java/org/codehaus/plexus/util/PathTool.java index de52db8d..b8392cdb 100644 --- a/src/main/java/org/codehaus/plexus/util/PathTool.java +++ b/src/main/java/org/codehaus/plexus/util/PathTool.java @@ -20,28 +20,24 @@ import java.util.StringTokenizer; /** - * Path tool contains static methods to assist in determining path-related - * information such as relative paths. + * Path tool contains static methods to assist in determining path-related information such as relative paths. * * @author Pete Kazmier * @author Vincent Massol * @author Vincent Siveton - * @version $Id$ + * */ public class PathTool { /** - * Determines the relative path of a filename from a base directory. - * This method is useful in building relative links within pages of - * a web site. It provides similar functionality to Anakia's - * $relativePath context variable. The arguments to - * this method may contain either forward or backward slashes as - * file separators. The relative path returned is formed using - * forward slashes as it is expected this path is to be used as a - * link in a web page (again mimicking Anakia's behavior). - *

            - * This method is thread-safe. - *
            + *

            Determines the relative path of a filename from a base directory. This method is useful in building relative + * links within pages of a web site. It provides similar functionality to Anakia's $relativePath + * context variable. The arguments to this method may contain either forward or backward slashes as file separators. + * The relative path returned is formed using forward slashes as it is expected this path is to be used as a link in + * a web page (again mimicking Anakia's behavior).

            + * + *

            This method is thread-safe.

            + * *
                  * PathTool.getRelativePath( null, null )                                   = ""
                  * PathTool.getRelativePath( null, "/usr/local/java/bin" )                  = ""
            @@ -52,42 +48,36 @@ public class PathTool
                  * 
            * * @param basedir The base directory. - * @param filename The filename that is relative to the base - * directory. - * @return The relative path of the filename from the base - * directory. This value is not terminated with a forward slash. - * A zero-length string is returned if: the filename is not relative to - * the base directory, basedir is null or zero-length, - * or filename is null or zero-length. + * @param filename The filename that is relative to the base directory. + * @return The relative path of the filename from the base directory. This value is not terminated with a forward + * slash. A zero-length string is returned if: the filename is not relative to the base directory, + * basedir is null or zero-length, or filename is null or zero-length. */ public static final String getRelativePath( String basedir, String filename ) { - basedir = uppercaseDrive(basedir); - filename = uppercaseDrive(filename); + basedir = uppercaseDrive( basedir ); + filename = uppercaseDrive( filename ); /* - * Verify the arguments and make sure the filename is relative - * to the base directory. + * Verify the arguments and make sure the filename is relative to the base directory. */ - if ( basedir == null || basedir.length() == 0 || filename == null - || filename.length() == 0 || !filename.startsWith( basedir ) ) + if ( basedir == null || basedir.length() == 0 || filename == null || filename.length() == 0 + || !filename.startsWith( basedir ) ) { return ""; } /* - * Normalize the arguments. First, determine the file separator - * that is being used, then strip that off the end of both the - * base directory and filename. + * Normalize the arguments. First, determine the file separator that is being used, then strip that off the end + * of both the base directory and filename. */ String separator = determineSeparator( filename ); basedir = StringUtils.chompLast( basedir, separator ); filename = StringUtils.chompLast( filename, separator ); /* - * Remove the base directory from the filename to end up with a - * relative filename (relative to the base directory). This - * filename is then used to determine the relative path. + * Remove the base directory from the filename to end up with a relative filename (relative to the base + * directory). This filename is then used to determine the relative path. */ String relativeFilename = filename.substring( basedir.length() ); @@ -95,26 +85,22 @@ public static final String getRelativePath( String basedir, String filename ) } /** - * Determines the relative path of a filename. This method is - * useful in building relative links within pages of a web site. It - * provides similar functionality to Anakia's - * $relativePath context variable. The argument to - * this method may contain either forward or backward slashes as - * file separators. The relative path returned is formed using - * forward slashes as it is expected this path is to be used as a - * link in a web page (again mimicking Anakia's behavior). - *

            - * This method is thread-safe. + *

            Determines the relative path of a filename. This method is useful in building relative links within pages of a + * web site. It provides similar functionality to Anakia's $relativePath context variable. The argument + * to this method may contain either forward or backward slashes as file separators. The relative path returned is + * formed using forward slashes as it is expected this path is to be used as a link in a web page (again mimicking + * Anakia's behavior).

            + * + *

            This method is thread-safe.

            * * @param filename The filename to be parsed. - * @return The relative path of the filename. This value is not - * terminated with a forward slash. A zero-length string is - * returned if: filename is null or zero-length. + * @return The relative path of the filename. This value is not terminated with a forward slash. A zero-length + * string is returned if: filename is null or zero-length. * @see #getRelativeFilePath(String, String) */ public static final String getRelativePath( String filename ) { - filename = uppercaseDrive(filename); + filename = uppercaseDrive( filename ); if ( filename == null || filename.length() == 0 ) { @@ -122,10 +108,8 @@ public static final String getRelativePath( String filename ) } /* - * Normalize the argument. First, determine the file separator - * that is being used, then strip that off the end of the - * filename. Then, if the filename doesn't begin with a - * separator, add one. + * Normalize the argument. First, determine the file separator that is being used, then strip that off the end + * of the filename. Then, if the filename doesn't begin with a separator, add one. */ String separator = determineSeparator( filename ); @@ -139,13 +123,12 @@ public static final String getRelativePath( String filename ) } /** - * Determines the directory component of a filename. This is useful - * within DVSL templates when used in conjunction with the DVSL's - * $context.getAppValue("infilename") to get the - * current directory that is currently being processed. - *

            - * This method is thread-safe. - *
            + *

            Determines the directory component of a filename. This is useful within DVSL templates when used in conjunction + * with the DVSL's $context.getAppValue("infilename") to get the current directory that is currently + * being processed.

            + * + *

            This method is thread-safe.

            + * *
                  * PathTool.getDirectoryComponent( null )                                   = ""
                  * PathTool.getDirectoryComponent( "/usr/local/java/bin" )                  = "/usr/local/java"
            @@ -154,9 +137,8 @@ public static final String getRelativePath( String filename )
                  * 
            * * @param filename The filename to be parsed. - * @return The directory portion of the filename. If - * the filename does not contain a directory component, "." is - * returned. + * @return The directory portion of the filename. If the filename does not contain a directory + * component, "." is returned. */ public static final String getDirectoryComponent( String filename ) { @@ -178,7 +160,7 @@ public static final String getDirectoryComponent( String filename ) /** * Calculates the appropriate link given the preferred link and the relativePath of the document. - *
            + * *
                  * PathTool.calculateLink( "/index.html", "../.." )                                        = "../../index.html"
                  * PathTool.calculateLink( "http://plexus.codehaus.org/plexus-utils/index.html", "../.." ) = "http://plexus.codehaus.org/plexus-utils/index.html"
            @@ -187,48 +169,56 @@ public static final String getDirectoryComponent( String filename )
                  * PathTool.calculateLink( "../index.html", "http://plexus.codehaus.org/plexus-utils" )    = "http://plexus.codehaus.org/plexus-utils/../index.html"
                  * 
            * - * @param link - * @param relativePath + * @param link main link + * @param relativePath relative * @return String */ - public static final String calculateLink(String link, String relativePath) + public static final String calculateLink( String link, String relativePath ) { - //This must be some historical feature - if (link.startsWith("/site/")) + if ( link == null ) + { + link = ""; + } + if ( relativePath == null ) { - return link.substring(5); + relativePath = ""; + } + // This must be some historical feature + if ( link.startsWith( "/site/" ) ) + { + return link.substring( 5 ); } - //Allows absolute links in nav-bars etc - if (link.startsWith("/absolute/")) + // Allows absolute links in nav-bars etc + if ( link.startsWith( "/absolute/" ) ) { - return link.substring(10); + return link.substring( 10 ); } // This traps urls like http:// - if (link.indexOf(":") >= 0) + if ( link.contains( ":" ) ) { return link; } - //If relativepath is current directory, just pass the link through - if (relativePath.equals(".")) + // If relativepath is current directory, just pass the link through + if ( StringUtils.equals( relativePath, "." ) ) { - if (link.startsWith("/")) + if ( link.startsWith( "/" ) ) { - return link.substring(1); + return link.substring( 1 ); } return link; } - //If we don't do this, you can end up with ..//bob.html rather than ../bob.html - if (relativePath.endsWith("/") && link.startsWith("/")) + // If we don't do this, you can end up with ..//bob.html rather than ../bob.html + if ( relativePath.endsWith( "/" ) && link.startsWith( "/" ) ) { - return relativePath + "." + link.substring(1); + return relativePath + "." + link.substring( 1 ); } - if (relativePath.endsWith("/") || link.startsWith("/")) + if ( relativePath.endsWith( "/" ) || link.startsWith( "/" ) ) { return relativePath + link; } @@ -237,8 +227,8 @@ public static final String calculateLink(String link, String relativePath) } /** - * This method can calculate the relative path between two pathes on a web site. - *
            + * This method can calculate the relative path between two paths on a web site. + * *
                  * PathTool.getRelativeWebPath( null, null )                                          = ""
                  * PathTool.getRelativeWebPath( null, "http://plexus.codehaus.org/" )                 = ""
            @@ -249,8 +239,8 @@ public static final String calculateLink(String link, String relativePath)
                  *                      "http://plexus.codehaus.org/"                                 = "../../"
                  * 
            * - * @param oldPath - * @param newPath + * @param oldPath main path + * @param newPath second path * @return a relative web path from oldPath. */ public static final String getRelativeWebPath( final String oldPath, final String newPath ) @@ -271,8 +261,8 @@ public static final String getRelativeWebPath( final String oldPath, final Strin } /** - * This method can calculate the relative path between two pathes on a file system. - *
            + * This method can calculate the relative path between two paths on a file system. + * *
                  * PathTool.getRelativeFilePath( null, null )                                   = ""
                  * PathTool.getRelativeFilePath( null, "/usr/local/java/bin" )                  = ""
            @@ -285,10 +275,11 @@ public static final String getRelativeWebPath( final String oldPath, final Strin
                  * PathTool.getRelativeFilePath( "/usr/local/", "/bin" )                        = "../../bin"
                  * PathTool.getRelativeFilePath( "/bin", "/usr/local/" )                        = "../usr/local"
                  * 
            + * * Note: On Windows based system, the / character should be replaced by \ character. * - * @param oldPath - * @param newPath + * @param oldPath main path + * @param newPath second path * @return a relative file path from oldPath. */ public static final String getRelativeFilePath( final String oldPath, final String newPath ) @@ -325,7 +316,7 @@ public static final String getRelativeFilePath( final String oldPath, final Stri // check for the presence of windows drives. No relative way of // traversing from one to the other. if ( ( toPath.startsWith( ":", 1 ) && fromPath.startsWith( ":", 1 ) ) - && ( !toPath.substring( 0, 1 ).equals( fromPath.substring( 0, 1 ) ) ) ) + && ( !toPath.substring( 0, 1 ).equals( fromPath.substring( 0, 1 ) ) ) ) { // they both have drive path element but they dont match, no // relative path @@ -333,7 +324,7 @@ public static final String getRelativeFilePath( final String oldPath, final Stri } if ( ( toPath.startsWith( ":", 1 ) && !fromPath.startsWith( ":", 1 ) ) - || ( !toPath.startsWith( ":", 1 ) && fromPath.startsWith( ":", 1 ) ) ) + || ( !toPath.startsWith( ":", 1 ) && fromPath.startsWith( ":", 1 ) ) ) { // one has a drive path element and the other doesnt, no relative // path. @@ -355,29 +346,24 @@ public static final String getRelativeFilePath( final String oldPath, final Stri // ---------------------------------------------------------------------- /** - * Determines the relative path of a filename. For each separator - * within the filename (except the leading if present), append the - * "../" string to the return value. + * Determines the relative path of a filename. For each separator within the filename (except the leading if + * present), append the "../" string to the return value. * * @param filename The filename to parse. * @param separator The separator used within the filename. - * @return The relative path of the filename. This value is not - * terminated with a forward slash. A zero-length string is - * returned if: the filename is zero-length. + * @return The relative path of the filename. This value is not terminated with a forward slash. A zero-length + * string is returned if: the filename is zero-length. */ - private static final String determineRelativePath( String filename, - String separator ) + private static final String determineRelativePath( String filename, String separator ) { if ( filename.length() == 0 ) { return ""; } - /* - * Count the slashes in the relative filename, but exclude the - * leading slash. If the path has no slashes, then the filename - * is relative to the current directory. + * Count the slashes in the relative filename, but exclude the leading slash. If the path has no slashes, then + * the filename is relative to the current directory. */ int slashCount = StringUtils.countMatches( filename, separator ) - 1; if ( slashCount <= 0 ) @@ -386,32 +372,27 @@ private static final String determineRelativePath( String filename, } /* - * The relative filename contains one or more slashes indicating - * that the file is within one or more directories. Thus, each - * slash represents a "../" in the relative path. + * The relative filename contains one or more slashes indicating that the file is within one or more + * directories. Thus, each slash represents a "../" in the relative path. */ - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for ( int i = 0; i < slashCount; i++ ) { sb.append( "../" ); } /* - * Finally, return the relative path but strip the trailing - * slash to mimic Anakia's behavior. + * Finally, return the relative path but strip the trailing slash to mimic Anakia's behavior. */ return StringUtils.chop( sb.toString() ); } /** - * Helper method to determine the file separator (forward or - * backward slash) used in a filename. The slash that occurs more - * often is returned as the separator. + * Helper method to determine the file separator (forward or backward slash) used in a filename. The slash that + * occurs more often is returned as the separator. * - * @param filename The filename parsed to determine the file - * separator. - * @return The file separator used within filename. - * This value is either a forward or backward slash. + * @param filename The filename parsed to determine the file separator. + * @return The file separator used within filename. This value is either a forward or backward slash. */ private static final String determineSeparator( String filename ) { @@ -423,23 +404,24 @@ private static final String determineSeparator( String filename ) /** * Cygwin prefers lowercase drive letters, but other parts of maven use uppercase + * * @param path * @return String */ - static final String uppercaseDrive(String path) + static final String uppercaseDrive( String path ) { - if (path == null) + if ( path == null ) { return null; } - if (path.length() >= 2 && path.charAt(1) == ':') + if ( path.length() >= 2 && path.charAt( 1 ) == ':' ) { path = Character.toUpperCase( path.charAt( 0 ) ) + path.substring( 1 ); } return path; } - private static final String buildRelativePath( String toPath, String fromPath, final char separatorChar ) + private static final String buildRelativePath( String toPath, String fromPath, final char separatorChar ) { // use tokeniser to traverse paths and for lazy checking StringTokenizer toTokeniser = new StringTokenizer( toPath, String.valueOf( separatorChar ) ); diff --git a/src/main/java/org/codehaus/plexus/util/PropertyUtils.java b/src/main/java/org/codehaus/plexus/util/PropertyUtils.java index f327fd8a..cee5cd25 100644 --- a/src/main/java/org/codehaus/plexus/util/PropertyUtils.java +++ b/src/main/java/org/codehaus/plexus/util/PropertyUtils.java @@ -1,5 +1,7 @@ package org.codehaus.plexus.util; +import java.util.Objects; + /* * Copyright The Codehaus Foundation. * @@ -18,83 +20,47 @@ import java.util.Properties; import java.io.File; -import java.io.FileInputStream; import java.io.InputStream; import java.io.IOException; import java.net.URL; +import java.nio.file.Files; /** - * + * Static methods to create Properties loaded from various sources. * * @author Jason van Zyl * @author Michal Maczka - * - * @version $Id$ */ public class PropertyUtils { - public static Properties loadProperties( URL url ) + public static Properties loadProperties( final URL url ) + throws IOException { - try - { - return loadProperties( url.openStream() ); - } - catch ( Exception e ) - { - // ignore - } - - return null; + return loadProperties( Objects.requireNonNull( url, "url" ).openStream() ); } - public static Properties loadProperties( File file ) + public static Properties loadProperties( final File file ) + throws IOException { - try - { - return loadProperties( new FileInputStream( file ) ); - } - catch ( Exception e ) - { - // ignore - } - - return null; + return loadProperties( Files.newInputStream( Objects.requireNonNull( file, "file" ).toPath() ) ); } - public static Properties loadProperties( InputStream is ) + public static Properties loadProperties( final InputStream is ) + throws IOException { - try - { - Properties properties = new Properties(); - - // Make sure the properties stream is valid - if ( is != null ) - { - properties.load( is ); - } - - return properties; - } - catch ( IOException e ) - { - // ignore - } - finally + final Properties properties = new Properties(); + + // Make sure the properties stream is valid + if ( is != null ) { - try + try ( InputStream in = is ) { - if ( is != null ) - { - is.close(); - } - } - catch ( IOException e ) - { - // ignore + properties.load( in ); } } - return null; + return properties; } + } diff --git a/src/main/java/org/codehaus/plexus/util/ReaderFactory.java b/src/main/java/org/codehaus/plexus/util/ReaderFactory.java index c9fe9927..a469a2c7 100644 --- a/src/main/java/org/codehaus/plexus/util/ReaderFactory.java +++ b/src/main/java/org/codehaus/plexus/util/ReaderFactory.java @@ -17,9 +17,7 @@ */ import java.io.File; -import java.io.FileInputStream; import java.io.FileNotFoundException; -import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -27,60 +25,66 @@ import java.io.UnsupportedEncodingException; import java.net.URL; import java.nio.charset.Charset; +import java.nio.file.Files; import org.codehaus.plexus.util.xml.XmlStreamReader; /** - * Utility to create Readers from streams, with explicit encoding choice: platform default, - * XML, or specified. + * Utility to create Readers from streams, with explicit encoding choice: platform default, XML, or specified. * * @author Herve Boutemy * @see Charset * @see Supported encodings - * @version $Id$ + * * @since 1.4.3 */ public class ReaderFactory { /** - * ISO Latin Alphabet #1, also known as ISO-LATIN-1. - * Every implementation of the Java platform is required to support this character encoding. + * ISO Latin Alphabet #1, also known as ISO-LATIN-1. Every implementation of the Java platform is required to + * support this character encoding. + * * @see Charset */ public static final String ISO_8859_1 = "ISO-8859-1"; /** - * Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set. - * Every implementation of the Java platform is required to support this character encoding. + * Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set. Every + * implementation of the Java platform is required to support this character encoding. + * * @see Charset */ public static final String US_ASCII = "US-ASCII"; /** * Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either - * order accepted on input, big-endian used on output). - * Every implementation of the Java platform is required to support this character encoding. + * order accepted on input, big-endian used on output). Every implementation of the Java platform is required to + * support this character encoding. + * * @see Charset */ public static final String UTF_16 = "UTF-16"; /** - * Sixteen-bit Unicode Transformation Format, big-endian byte order. - * Every implementation of the Java platform is required to support this character encoding. + * Sixteen-bit Unicode Transformation Format, big-endian byte order. Every implementation of the Java platform is + * required to support this character encoding. + * * @see Charset */ public static final String UTF_16BE = "UTF-16BE"; /** - * Sixteen-bit Unicode Transformation Format, little-endian byte order. - * Every implementation of the Java platform is required to support this character encoding. + * Sixteen-bit Unicode Transformation Format, little-endian byte order. Every implementation of the Java platform is + * required to support this character encoding. + * * @see Charset */ public static final String UTF_16LE = "UTF-16LE"; /** - * Eight-bit Unicode Transformation Format. - * Every implementation of the Java platform is required to support this character encoding. + * Eight-bit Unicode Transformation Format. Every implementation of the Java platform is required to support this + * character encoding. + * * @see Charset */ public static final String UTF_8 = "UTF-8"; @@ -99,7 +103,7 @@ public class ReaderFactory * @see XmlStreamReader */ public static XmlStreamReader newXmlReader( InputStream in ) - throws IOException + throws IOException { return new XmlStreamReader( in ); } @@ -113,7 +117,7 @@ public static XmlStreamReader newXmlReader( InputStream in ) * @see XmlStreamReader */ public static XmlStreamReader newXmlReader( File file ) - throws IOException + throws IOException { return new XmlStreamReader( file ); } @@ -127,13 +131,13 @@ public static XmlStreamReader newXmlReader( File file ) * @see XmlStreamReader */ public static XmlStreamReader newXmlReader( URL url ) - throws IOException + throws IOException { return new XmlStreamReader( url ); } /** - * Create a new Reader with default plaform encoding. + * Create a new Reader with default platform encoding. * * @param in not null input stream. * @return a reader instance for the input stream using the default platform charset. @@ -145,21 +149,21 @@ public static Reader newPlatformReader( InputStream in ) } /** - * Create a new Reader with default plaform encoding. + * Create a new Reader with default platform encoding. * * @param file not null file. * @return a reader instance for the input file using the default platform charset. - * @throws FileNotFoundException if any. + * @throws IOException if any. * @see Charset#defaultCharset() */ public static Reader newPlatformReader( File file ) - throws FileNotFoundException + throws IOException { - return new FileReader( file ); + return Files.newBufferedReader( file.toPath() ); } /** - * Create a new Reader with default plaform encoding. + * Create a new Reader with default platform encoding. * * @param url not null url. * @return a reader instance for the input url using the default platform charset. @@ -167,7 +171,7 @@ public static Reader newPlatformReader( File file ) * @see Charset#defaultCharset() */ public static Reader newPlatformReader( URL url ) - throws IOException + throws IOException { return new InputStreamReader( url.openStream() ); } @@ -182,25 +186,25 @@ public static Reader newPlatformReader( URL url ) * @see Supported encodings */ public static Reader newReader( InputStream in, String encoding ) - throws UnsupportedEncodingException + throws UnsupportedEncodingException { return new InputStreamReader( in, encoding ); } /** - * Create a new Reader with specified encoding. + * Create a new Reader with specified encoding. Note that there is no buffering on this reader, which favours + * clients that read into large buffers (8K+). * * @param file not null file. * @param encoding not null supported encoding. * @return a reader instance for the input file using the given encoding. - * @throws FileNotFoundException if any. - * @throws UnsupportedEncodingException if any. + * @throws IOException if any. * @see Supported encodings */ public static Reader newReader( File file, String encoding ) - throws FileNotFoundException, UnsupportedEncodingException + throws IOException { - return new InputStreamReader( new FileInputStream(file), encoding ); + return new InputStreamReader( Files.newInputStream( file.toPath() ), encoding ); } /** @@ -213,7 +217,7 @@ public static Reader newReader( File file, String encoding ) * @see Supported encodings */ public static Reader newReader( URL url, String encoding ) - throws IOException + throws IOException { return new InputStreamReader( url.openStream(), encoding ); } diff --git a/src/main/java/org/codehaus/plexus/util/ReflectionUtils.java b/src/main/java/org/codehaus/plexus/util/ReflectionUtils.java index f19d4e19..3ebf3b2d 100644 --- a/src/main/java/org/codehaus/plexus/util/ReflectionUtils.java +++ b/src/main/java/org/codehaus/plexus/util/ReflectionUtils.java @@ -27,10 +27,11 @@ import java.util.Arrays; /** + * Operations on a class' fields and their setters. + * * @author Michal Maczka * @author Jesse McConnell * @author Trygve Laugstøl - * @version $Id$ */ public final class ReflectionUtils { @@ -38,7 +39,7 @@ public final class ReflectionUtils // Field utils // ---------------------------------------------------------------------- - public static Field getFieldByNameIncludingSuperclasses( String fieldName, Class clazz ) + public static Field getFieldByNameIncludingSuperclasses( String fieldName, Class clazz ) { Field retValue = null; @@ -48,7 +49,7 @@ public static Field getFieldByNameIncludingSuperclasses( String fieldName, Class } catch ( NoSuchFieldException e ) { - Class superclass = clazz.getSuperclass(); + Class superclass = clazz.getSuperclass(); if ( superclass != null ) { @@ -59,11 +60,11 @@ public static Field getFieldByNameIncludingSuperclasses( String fieldName, Class return retValue; } - public static List getFieldsIncludingSuperclasses( Class clazz ) + public static List getFieldsIncludingSuperclasses( Class clazz ) { - List fields = new ArrayList( Arrays.asList( clazz.getDeclaredFields() ) ); + List fields = new ArrayList<>( Arrays.asList( clazz.getDeclaredFields() ) ); - Class superclass = clazz.getSuperclass(); + Class superclass = clazz.getSuperclass(); if ( superclass != null ) { @@ -78,23 +79,20 @@ public static List getFieldsIncludingSuperclasses( Class clazz ) // ---------------------------------------------------------------------- /** - * Finds a setter in the given class for the given field. It searches - * interfaces and superclasses too. + * Finds a setter in the given class for the given field. It searches interfaces and superclasses too. * * @param fieldName the name of the field (i.e. 'fooBar'); it will search for a method named 'setFooBar'. * @param clazz The class to find the method in. * @return null or the method found. */ - public static Method getSetter( String fieldName, Class clazz ) + public static Method getSetter( String fieldName, Class clazz ) { - Method [] methods = clazz.getMethods(); + Method[] methods = clazz.getMethods(); fieldName = "set" + StringUtils.capitalizeFirstLetter( fieldName ); - for ( int i = 0; i < methods.length; i++ ) + for ( Method method : methods ) { - Method method = methods[i]; - if ( method.getName().equals( fieldName ) && isSetter( method ) ) { return method; @@ -105,18 +103,17 @@ public static Method getSetter( String fieldName, Class clazz ) } /** - * Finds all setters in the given class and super classes. + * @return all setters in the given class and super classes. + * @param clazz the Class */ - public static List getSetters( Class clazz ) + public static List getSetters( Class clazz ) { Method[] methods = clazz.getMethods(); - List list = new ArrayList(); + List list = new ArrayList<>(); - for ( int i = 0; i < methods.length; i++ ) + for ( Method method : methods ) { - Method method = methods[i]; - if ( isSetter( method ) ) { list.add( method ); @@ -127,15 +124,15 @@ public static List getSetters( Class clazz ) } /** - * Returns the class of the argument to the setter. - * - * Will throw an RuntimeException if the method isn't a setter. + * @param method the method + * @return the class of the argument to the setter. Will throw an RuntimeException if the method isn't a setter. */ - public static Class getSetterType( Method method ) + public static Class getSetterType( Method method ) { if ( !isSetter( method ) ) { - throw new RuntimeException( "The method " + method.getDeclaringClass().getName() + "." + method.getName() + " is not a setter." ); + throw new RuntimeException( "The method " + method.getDeclaringClass().getName() + "." + method.getName() + + " is not a setter." ); } return method.getParameterTypes()[0]; @@ -148,10 +145,10 @@ public static Class getSetterType( Method method ) /** * attempts to set the value to the variable in the object passed in * - * @param object - * @param variable - * @param value - * @throws IllegalAccessException + * @param object see name + * @param variable see name + * @param value see name + * @throws IllegalAccessException if error */ public static void setVariableValueInObject( Object object, String variable, Object value ) throws IllegalAccessException @@ -160,15 +157,16 @@ public static void setVariableValueInObject( Object object, String variable, Obj field.setAccessible( true ); - field.set(object, value ); + field.set( object, value ); } /** - * Generates a map of the fields and values on a given object, - * also pulls from superclasses - * + * Generates a map of the fields and values on a given object, also pulls from superclasses + * + * @param variable field name * @param object the object to generate the list of fields from * @return map containing the fields and their values + * @throws IllegalAccessException cannot access */ public static Object getValueIncludingSuperclasses( String variable, Object object ) throws IllegalAccessException @@ -182,18 +180,18 @@ public static Object getValueIncludingSuperclasses( String variable, Object obje } /** - * Generates a map of the fields and values on a given object, - * also pulls from superclasses + * Generates a map of the fields and values on a given object, also pulls from superclasses * * @param object the object to generate the list of fields from * @return map containing the fields and their values + * @throws IllegalAccessException cannot access */ - public static Map getVariablesAndValuesIncludingSuperclasses( Object object ) + public static Map getVariablesAndValuesIncludingSuperclasses( Object object ) throws IllegalAccessException { - HashMap map = new HashMap (); + Map map = new HashMap<>(); - gatherVariablesAndValuesIncludingSuperclasses(object, map); + gatherVariablesAndValuesIncludingSuperclasses( object, map ); return map; } @@ -205,38 +203,42 @@ public static Map getVariablesAndValuesIncludingSuperclasses( Object object ) public static boolean isSetter( Method method ) { return method.getReturnType().equals( Void.TYPE ) && // FIXME: needed /required? - !Modifier.isStatic( method.getModifiers() ) && - method.getParameterTypes().length == 1; + !Modifier.isStatic( method.getModifiers() ) && method.getParameterTypes().length == 1; } /** - * populates a map of the fields and values on a given object, - * also pulls from superclasses + * populates a map of the fields and values on a given object, also pulls from superclasses * * @param object the object to generate the list of fields from * @param map to populate */ - private static void gatherVariablesAndValuesIncludingSuperclasses( Object object, Map map ) + private static void gatherVariablesAndValuesIncludingSuperclasses( Object object, Map map ) throws IllegalAccessException { - Class clazz = object.getClass(); + Class clazz = object.getClass(); + + if ( Float.parseFloat( System.getProperty( "java.specification.version" ) ) >= 11 + && Class.class.getCanonicalName().equals( clazz.getCanonicalName() ) ) + { + // Updating Class fields accessibility is forbidden on Java 16 (and throws warning from version 11) + // No concrete use case to modify accessibility at this level + return; + } Field[] fields = clazz.getDeclaredFields(); - AccessibleObject.setAccessible( fields, true); + AccessibleObject.setAccessible( fields, true ); - for (int i = 0; i < fields.length; ++i) + for ( Field field : fields ) { - Field field = fields[i]; - map.put( field.getName(), field.get( object ) ); } - Class superclass = clazz.getSuperclass(); + Class superclass = clazz.getSuperclass(); - if ( !Object.class.equals( superclass ) ) + if ( !Object.class.equals( superclass ) ) { gatherVariablesAndValuesIncludingSuperclasses( superclass, map ); } diff --git a/src/main/java/org/codehaus/plexus/util/Scanner.java b/src/main/java/org/codehaus/plexus/util/Scanner.java index 1449e8c3..20bf85fb 100644 --- a/src/main/java/org/codehaus/plexus/util/Scanner.java +++ b/src/main/java/org/codehaus/plexus/util/Scanner.java @@ -1,7 +1,5 @@ package org.codehaus.plexus.util; -import java.io.File; - /* * Copyright The Codehaus Foundation. * @@ -18,38 +16,36 @@ * limitations under the License. */ +import java.io.File; +import java.util.Comparator; -public interface Scanner +/** + * Scan a directory tree for files, with specified inclusions and exclusions. + */ +public interface Scanner { /** - * Sets the list of include patterns to use. All '/' and '\' characters - * are replaced by File.separatorChar, so the separator used - * need not match File.separatorChar. + * Sets the list of include patterns to use. All '/' and '\' characters are replaced by + * File.separatorChar, so the separator used need not match File.separatorChar. *

            * When a pattern ends with a '/' or '\', "**" is appended. * - * @param includes A list of include patterns. - * May be null, indicating that all files - * should be included. If a non-null - * list is given, all elements must be - * non-null. + * @param includes A list of include patterns. May be null, indicating that all files should be + * included. If a non-null list is given, all elements must be non-null. */ - void setIncludes(String[] includes); - + void setIncludes( String[] includes ); + /** - * Sets the list of exclude patterns to use. All '/' and '\' characters - * are replaced by File.separatorChar, so the separator used - * need not match File.separatorChar. + * Sets the list of exclude patterns to use. All '/' and '\' characters are replaced by + * File.separatorChar, so the separator used need not match File.separatorChar. *

            * When a pattern ends with a '/' or '\', "**" is appended. * - * @param excludes A list of exclude patterns. - * May be null, indicating that no files - * should be excluded. If a non-null list is - * given, all elements must be non-null. + * @param excludes A list of exclude patterns. May be null, indicating that no files should be + * excluded. If a non-null list is given, all elements must be non-null. */ - void setExcludes(String[] excludes); + void setExcludes( String[] excludes ); /** * Adds default exclusions to the current exclusions set. @@ -57,40 +53,43 @@ public interface Scanner void addDefaultExcludes(); /** - * Scans the base directory for files which match at least one include - * pattern and don't match any exclude patterns. + * Scans the base directory for files which match at least one include pattern and don't match any exclude patterns. * - * @exception IllegalStateException if the base directory was set - * incorrectly (i.e. if it is null, doesn't exist, - * or isn't a directory). + * @exception IllegalStateException if the base directory was set incorrectly (i.e. if it is null, + * doesn't exist, or isn't a directory). */ void scan(); /** - * Returns the names of the files which matched at least one of the - * include patterns and none of the exclude patterns. - * The names are relative to the base directory. + * Returns the names of the files which matched at least one of the include patterns and none of the exclude + * patterns. The names are relative to the base directory. * - * @return the names of the files which matched at least one of the - * include patterns and none of the exclude patterns. + * @return the names of the files which matched at least one of the include patterns and none of the exclude + * patterns. */ String[] getIncludedFiles(); - + /** - * Returns the names of the directories which matched at least one of the - * include patterns and none of the exclude patterns. - * The names are relative to the base directory. + * Returns the names of the directories which matched at least one of the include patterns and none of the exclude + * patterns. The names are relative to the base directory. * - * @return the names of the directories which matched at least one of the - * include patterns and none of the exclude patterns. + * @return the names of the directories which matched at least one of the include patterns and none of the exclude + * patterns. */ String[] getIncludedDirectories(); /** - * Returns the base directory to be scanned. - * This is the directory which is scanned recursively. + * Returns the base directory to be scanned. This is the directory which is scanned recursively. * * @return the base directory to be scanned */ File getBasedir(); + + /** + * Use a filename comparator in each directory when scanning. + * + * @param filenameComparator the Comparator instance to use + * @since 3.3.0 + */ + void setFilenameComparator( Comparator filenameComparator ); } diff --git a/src/main/java/org/codehaus/plexus/util/SelectorUtils.java b/src/main/java/org/codehaus/plexus/util/SelectorUtils.java index 4d94408f..de39f4fe 100644 --- a/src/main/java/org/codehaus/plexus/util/SelectorUtils.java +++ b/src/main/java/org/codehaus/plexus/util/SelectorUtils.java @@ -17,11 +17,11 @@ * distribution. * * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: + * any, must include the following acknowledgement: * "This product includes software developed by the * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * Alternately, this acknowledgement may appear in the software itself, + * if and wherever such third-party acknowledgements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived @@ -55,27 +55,34 @@ package org.codehaus.plexus.util; import java.io.File; +import java.util.ArrayList; +import java.util.List; import java.util.StringTokenizer; -import java.util.Vector; /** - *

            This is a utility class used by selectors and DirectoryScanner. The - * functionality more properly belongs just to selectors, but unfortunately - * DirectoryScanner exposed these as protected methods. Thus we have to - * support any subclasses of DirectoryScanner that may access these methods. - *

            + *

            This is a utility class used by selectors and DirectoryScanner. The functionality more properly belongs just to + * selectors, but unfortunately DirectoryScanner exposed these as protected methods. Thus we have to support any + * subclasses of DirectoryScanner that may access these methods.

            + * *

            This is a Singleton.

            * - * @author Arnout J. Kuiper - * ajkuiper@wxs.nl + * @author Arnout J. Kuiper ajkuiper@wxs.nl * @author Magesh Umasankar * @author Bruce Atherton + * * @since 1.5 - * @version $Id$ */ public final class SelectorUtils { + public static final String PATTERN_HANDLER_PREFIX = "["; + + public static final String PATTERN_HANDLER_SUFFIX = "]"; + + public static final String REGEX_HANDLER_PREFIX = "%regex" + PATTERN_HANDLER_PREFIX; + + public static final String ANT_HANDLER_PREFIX = "%ant" + PATTERN_HANDLER_PREFIX; + private static SelectorUtils instance = new SelectorUtils(); /** @@ -86,7 +93,7 @@ private SelectorUtils() } /** - * Retrieves the manager of the Singleton. + * @return Retrieves the manager of the Singleton. */ public static SelectorUtils getInstance() { @@ -94,20 +101,14 @@ public static SelectorUtils getInstance() } /** - * Tests whether or not a given path matches the start of a given - * pattern up to the first "**". - *

            - * This is not a general purpose test and should only be used if you - * can live with false positives. For example, pattern=**\a - * and str=b will yield true. - * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. + *

            Tests whether or not a given path matches the start of a given pattern up to the first "**".

            + * + *

            This is not a general purpose test and should only be used if you can live with false positives. For example, + * pattern=**\a and str=b will yield true.

            * - * @return whether or not a given path matches the start of a given - * pattern up to the first "**". + * @param pattern The pattern to match against. Must not be null. + * @param str The path to match, as a String. Must not be null. + * @return whether or not a given path matches the start of a given pattern up to the first "**". */ public static boolean matchPatternStart( String pattern, String str ) { @@ -115,54 +116,104 @@ public static boolean matchPatternStart( String pattern, String str ) } /** - * Tests whether or not a given path matches the start of a given - * pattern up to the first "**". - *

            - * This is not a general purpose test and should only be used if you - * can live with false positives. For example, pattern=**\a - * and str=b will yield true. - * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * @param isCaseSensitive Whether or not matching should be performed - * case sensitively. + *

            Tests whether or not a given path matches the start of a given pattern up to the first "**".

            + * + *

            This is not a general purpose test and should only be used if you can live with false positives. For example, + * pattern=**\a and str=b will yield true.

            * - * @return whether or not a given path matches the start of a given - * pattern up to the first "**". + * @param pattern The pattern to match against. Must not be null. + * @param str The path to match, as a String. Must not be null. + * @param isCaseSensitive Whether or not matching should be performed case sensitively. + * @return whether or not a given path matches the start of a given pattern up to the first "**". */ - public static boolean matchPatternStart( String pattern, String str, + public static boolean matchPatternStart( String pattern, String str, boolean isCaseSensitive ) + { + if ( isRegexPrefixedPattern( pattern ) ) + { + // FIXME: ICK! But we can't do partial matches for regex, so we have to reserve judgement until we have + // a file to deal with, or we can definitely say this is an exclusion... + return true; + } + else + { + if ( isAntPrefixedPattern( pattern ) ) + { + pattern = pattern.substring( ANT_HANDLER_PREFIX.length(), + pattern.length() - PATTERN_HANDLER_SUFFIX.length() ); + } + + String altStr = str.replace( '\\', '/' ); + + return matchAntPathPatternStart( pattern, str, File.separator, isCaseSensitive ) + || matchAntPathPatternStart( pattern, altStr, "/", isCaseSensitive ); + } + } + + static boolean isAntPrefixedPattern( String pattern ) + { + return pattern.length() > ( ANT_HANDLER_PREFIX.length() + PATTERN_HANDLER_SUFFIX.length() + 1 ) + && pattern.startsWith( ANT_HANDLER_PREFIX ) && pattern.endsWith( PATTERN_HANDLER_SUFFIX ); + } + + @SuppressWarnings( "SimplifiableIfStatement" ) + static boolean matchAntPathPatternStart( MatchPattern pattern, String str, String separator, boolean isCaseSensitive ) + { + if ( separatorPatternStartSlashMismatch( pattern, str, separator ) ) + { + return false; + } + + return matchAntPathPatternStart( pattern.getTokenizedPathString(), str, separator, isCaseSensitive ); + } + + static boolean matchAntPathPatternStart( String pattern, String str, String separator, boolean isCaseSensitive ) { // When str starts with a File.separator, pattern has to start with a // File.separator. // When pattern starts with a File.separator, str has to start with a // File.separator. - if ( str.startsWith( File.separator ) != - pattern.startsWith( File.separator ) ) + if ( separatorPatternStartSlashMismatch( pattern, str, separator ) ) { return false; } - Vector patDirs = tokenizePath( pattern ); - Vector strDirs = tokenizePath( str ); + String[] patDirs = tokenizePathToString( pattern, separator ); + return matchAntPathPatternStart( patDirs, str, separator, isCaseSensitive ); + } + + // When str starts with a File.separator, pattern has to start with a + // File.separator. + // When pattern starts with a File.separator, str has to start with a + // File.separator. + private static boolean separatorPatternStartSlashMismatch( String pattern, String str, String separator ) + { + return str.startsWith( separator ) != pattern.startsWith( separator ); + } + + private static boolean separatorPatternStartSlashMismatch( MatchPattern matchPattern, String str, String separator ) + { + return str.startsWith( separator ) != matchPattern.startsWith( separator ); + } + + static boolean matchAntPathPatternStart( String[] patDirs, String str, String separator, boolean isCaseSensitive ) + { + String[] strDirs = tokenizePathToString( str, separator ); int patIdxStart = 0; - int patIdxEnd = patDirs.size() - 1; + int patIdxEnd = patDirs.length - 1; int strIdxStart = 0; - int strIdxEnd = strDirs.size() - 1; + int strIdxEnd = strDirs.length - 1; // up to first '**' while ( patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd ) { - String patDir = (String) patDirs.elementAt( patIdxStart ); + String patDir = patDirs[patIdxStart]; if ( patDir.equals( "**" ) ) { break; } - if ( !match( patDir, (String) strDirs.elementAt( strIdxStart ), - isCaseSensitive ) ) + if ( !match( patDir, strDirs[strIdxStart], isCaseSensitive ) ) { return false; } @@ -170,34 +221,15 @@ public static boolean matchPatternStart( String pattern, String str, strIdxStart++; } - if ( strIdxStart > strIdxEnd ) - { - // String is exhausted - return true; - } - else if ( patIdxStart > patIdxEnd ) - { - // String not exhausted, but pattern is. Failure. - return false; - } - else - { - // pattern now holds ** while string is not exhausted - // this will generate false positives but we can live with that. - return true; - } + return strIdxStart > strIdxEnd || patIdxStart <= patIdxEnd; } /** * Tests whether or not a given path matches a given pattern. * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * - * @return true if the pattern matches against the string, - * or false otherwise. + * @param pattern The pattern to match against. Must not be null. + * @param str The path to match, as a String. Must not be null. + * @return true if the pattern matches against the string, or false otherwise. */ public static boolean matchPath( String pattern, String str ) { @@ -207,50 +239,84 @@ public static boolean matchPath( String pattern, String str ) /** * Tests whether or not a given path matches a given pattern. * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * @param isCaseSensitive Whether or not matching should be performed - * case sensitively. - * - * @return true if the pattern matches against the string, - * or false otherwise. + * @param pattern The pattern to match against. Must not be null. + * @param str The path to match, as a String. Must not be null. + * @param isCaseSensitive Whether or not matching should be performed case sensitively. + * @return true if the pattern matches against the string, or false otherwise. */ - public static boolean matchPath( String pattern, String str, - boolean isCaseSensitive ) + public static boolean matchPath( String pattern, String str, boolean isCaseSensitive ) { - // When str starts with a File.separator, pattern has to start with a - // File.separator. - // When pattern starts with a File.separator, str has to start with a - // File.separator. - if ( str.startsWith( File.separator ) != - pattern.startsWith( File.separator ) ) + return matchPath( pattern, str, File.separator, isCaseSensitive ); + } + + public static boolean matchPath( String pattern, String str, String separator, boolean isCaseSensitive ) + { + if ( isRegexPrefixedPattern( pattern ) ) + { + pattern = + pattern.substring( REGEX_HANDLER_PREFIX.length(), pattern.length() - PATTERN_HANDLER_SUFFIX.length() ); + + return str.matches( pattern ); + } + else + { + if ( isAntPrefixedPattern( pattern ) ) + { + pattern = pattern.substring( ANT_HANDLER_PREFIX.length(), + pattern.length() - PATTERN_HANDLER_SUFFIX.length() ); + } + + return matchAntPathPattern( pattern, str, separator, isCaseSensitive ); + } + } + + static boolean isRegexPrefixedPattern( String pattern ) + { + return pattern.length() > ( REGEX_HANDLER_PREFIX.length() + PATTERN_HANDLER_SUFFIX.length() + 1 ) + && pattern.startsWith( REGEX_HANDLER_PREFIX ) && pattern.endsWith( PATTERN_HANDLER_SUFFIX ); + } + + static boolean matchAntPathPattern( MatchPattern matchPattern, String str, String separator, + boolean isCaseSensitive ) + { + if ( separatorPatternStartSlashMismatch( matchPattern, str, separator ) ) + { + return false; + } + String[] patDirs = matchPattern.getTokenizedPathString(); + String[] strDirs = tokenizePathToString( str, separator ); + return matchAntPathPattern( patDirs, strDirs, isCaseSensitive ); + } + + static boolean matchAntPathPattern( String pattern, String str, String separator, boolean isCaseSensitive ) + { + if ( separatorPatternStartSlashMismatch( pattern, str, separator ) ) { return false; } + String[] patDirs = tokenizePathToString( pattern, separator ); + String[] strDirs = tokenizePathToString( str, separator ); + return matchAntPathPattern( patDirs, strDirs, isCaseSensitive ); - Vector patDirs = tokenizePath( pattern ); - Vector strDirs = tokenizePath( str ); + } + static boolean matchAntPathPattern( String[] patDirs, String[] strDirs, boolean isCaseSensitive ) + { int patIdxStart = 0; - int patIdxEnd = patDirs.size() - 1; + int patIdxEnd = patDirs.length - 1; int strIdxStart = 0; - int strIdxEnd = strDirs.size() - 1; + int strIdxEnd = strDirs.length - 1; // up to first '**' while ( patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd ) { - String patDir = (String) patDirs.elementAt( patIdxStart ); + String patDir = patDirs[patIdxStart]; if ( patDir.equals( "**" ) ) { break; } - if ( !match( patDir, (String) strDirs.elementAt( strIdxStart ), - isCaseSensitive ) ) + if ( !match( patDir, strDirs[strIdxStart], isCaseSensitive ) ) { - patDirs = null; - strDirs = null; return false; } patIdxStart++; @@ -261,10 +327,8 @@ public static boolean matchPath( String pattern, String str, // String is exhausted for ( int i = patIdxStart; i <= patIdxEnd; i++ ) { - if ( !patDirs.elementAt( i ).equals( "**" ) ) + if ( !patDirs[i].equals( "**" ) ) { - patDirs = null; - strDirs = null; return false; } } @@ -275,8 +339,6 @@ public static boolean matchPath( String pattern, String str, if ( patIdxStart > patIdxEnd ) { // String not exhausted, but pattern is. Failure. - patDirs = null; - strDirs = null; return false; } } @@ -284,16 +346,142 @@ public static boolean matchPath( String pattern, String str, // up to last '**' while ( patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd ) { - String patDir = (String) patDirs.elementAt( patIdxEnd ); + String patDir = patDirs[patIdxEnd]; if ( patDir.equals( "**" ) ) { break; } - if ( !match( patDir, (String) strDirs.elementAt( strIdxEnd ), - isCaseSensitive ) ) + if ( !match( patDir, strDirs[strIdxEnd], isCaseSensitive ) ) + { + return false; + } + patIdxEnd--; + strIdxEnd--; + } + if ( strIdxStart > strIdxEnd ) + { + // String is exhausted + for ( int i = patIdxStart; i <= patIdxEnd; i++ ) + { + if ( !patDirs[i].equals( "**" ) ) + { + return false; + } + } + return true; + } + + while ( patIdxStart != patIdxEnd && strIdxStart <= strIdxEnd ) + { + int patIdxTmp = -1; + for ( int i = patIdxStart + 1; i <= patIdxEnd; i++ ) + { + if ( patDirs[i].equals( "**" ) ) + { + patIdxTmp = i; + break; + } + } + if ( patIdxTmp == patIdxStart + 1 ) + { + // '**/**' situation, so skip one + patIdxStart++; + continue; + } + // Find the pattern between padIdxStart & padIdxTmp in str between + // strIdxStart & strIdxEnd + int patLength = ( patIdxTmp - patIdxStart - 1 ); + int strLength = ( strIdxEnd - strIdxStart + 1 ); + int foundIdx = -1; + strLoop: for ( int i = 0; i <= strLength - patLength; i++ ) + { + for ( int j = 0; j < patLength; j++ ) + { + String subPat = patDirs[patIdxStart + j + 1]; + String subStr = strDirs[strIdxStart + i + j]; + if ( !match( subPat, subStr, isCaseSensitive ) ) + { + continue strLoop; + } + } + + foundIdx = strIdxStart + i; + break; + } + + if ( foundIdx == -1 ) + { + return false; + } + + patIdxStart = patIdxTmp; + strIdxStart = foundIdx + patLength; + } + + for ( int i = patIdxStart; i <= patIdxEnd; i++ ) + { + if ( !patDirs[i].equals( "**" ) ) + { + return false; + } + } + + return true; + } + + static boolean matchAntPathPattern( char[][] patDirs, char[][] strDirs, boolean isCaseSensitive ) + { + int patIdxStart = 0; + int patIdxEnd = patDirs.length - 1; + int strIdxStart = 0; + int strIdxEnd = strDirs.length - 1; + + // up to first '**' + while ( patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd ) + { + char[] patDir = patDirs[patIdxStart]; + if ( isDoubleStar( patDir ) ) + { + break; + } + if ( !match( patDir, strDirs[strIdxStart], isCaseSensitive ) ) + { + return false; + } + patIdxStart++; + strIdxStart++; + } + if ( strIdxStart > strIdxEnd ) + { + // String is exhausted + for ( int i = patIdxStart; i <= patIdxEnd; i++ ) + { + if ( !isDoubleStar( patDirs[i] ) ) + { + return false; + } + } + return true; + } + else + { + if ( patIdxStart > patIdxEnd ) + { + // String not exhausted, but pattern is. Failure. + return false; + } + } + + // up to last '**' + while ( patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd ) + { + char[] patDir = patDirs[patIdxEnd]; + if ( isDoubleStar( patDir ) ) + { + break; + } + if ( !match( patDir, strDirs[strIdxEnd], isCaseSensitive ) ) { - patDirs = null; - strDirs = null; return false; } patIdxEnd--; @@ -304,10 +492,8 @@ public static boolean matchPath( String pattern, String str, // String is exhausted for ( int i = patIdxStart; i <= patIdxEnd; i++ ) { - if ( !patDirs.elementAt( i ).equals( "**" ) ) + if ( !isDoubleStar( patDirs[i] ) ) { - patDirs = null; - strDirs = null; return false; } } @@ -319,7 +505,7 @@ public static boolean matchPath( String pattern, String str, int patIdxTmp = -1; for ( int i = patIdxStart + 1; i <= patIdxEnd; i++ ) { - if ( patDirs.elementAt( i ).equals( "**" ) ) + if ( isDoubleStar( patDirs[i] ) ) { patIdxTmp = i; break; @@ -336,27 +522,24 @@ public static boolean matchPath( String pattern, String str, int patLength = ( patIdxTmp - patIdxStart - 1 ); int strLength = ( strIdxEnd - strIdxStart + 1 ); int foundIdx = -1; - strLoop: - for ( int i = 0; i <= strLength - patLength; i++ ) - { - for ( int j = 0; j < patLength; j++ ) - { - String subPat = (String) patDirs.elementAt( patIdxStart + j + 1 ); - String subStr = (String) strDirs.elementAt( strIdxStart + i + j ); - if ( !match( subPat, subStr, isCaseSensitive ) ) - { - continue strLoop; - } - } - - foundIdx = strIdxStart + i; - break; - } + strLoop: for ( int i = 0; i <= strLength - patLength; i++ ) + { + for ( int j = 0; j < patLength; j++ ) + { + char[] subPat = patDirs[patIdxStart + j + 1]; + char[] subStr = strDirs[strIdxStart + i + j]; + if ( !match( subPat, subStr, isCaseSensitive ) ) + { + continue strLoop; + } + } + + foundIdx = strIdxStart + i; + break; + } if ( foundIdx == -1 ) { - patDirs = null; - strDirs = null; return false; } @@ -366,10 +549,8 @@ public static boolean matchPath( String pattern, String str, for ( int i = patIdxStart; i <= patIdxEnd; i++ ) { - if ( !patDirs.elementAt( i ).equals( "**" ) ) + if ( !isDoubleStar( patDirs[i] ) ) { - patDirs = null; - strDirs = null; return false; } } @@ -377,19 +558,19 @@ public static boolean matchPath( String pattern, String str, return true; } + private static boolean isDoubleStar( char[] patDir ) + { + return patDir != null && patDir.length == 2 && patDir[0] == '*' && patDir[1] == '*'; + } + /** - * Tests whether or not a string matches against a pattern. - * The pattern may contain two special characters:
            + * Tests whether or not a string matches against a pattern. The pattern may contain two special characters:
            * '*' means zero or more characters
            * '?' means one and only one character * - * @param pattern The pattern to match against. - * Must not be null. - * @param str The string which must be matched against the pattern. - * Must not be null. - * - * @return true if the string matches against the pattern, - * or false otherwise. + * @param pattern The pattern to match against. Must not be null. + * @param str The string which must be matched against the pattern. Must not be null. + * @return true if the string matches against the pattern, or false otherwise. */ public static boolean match( String pattern, String str ) { @@ -397,27 +578,24 @@ public static boolean match( String pattern, String str ) } /** - * Tests whether or not a string matches against a pattern. - * The pattern may contain two special characters:
            + * Tests whether or not a string matches against a pattern. The pattern may contain two special characters:
            * '*' means zero or more characters
            * '?' means one and only one character * - * @param pattern The pattern to match against. - * Must not be null. - * @param str The string which must be matched against the pattern. - * Must not be null. - * @param isCaseSensitive Whether or not matching should be performed - * case sensitively. - * - * - * @return true if the string matches against the pattern, - * or false otherwise. + * @param pattern The pattern to match against. Must not be null. + * @param str The string which must be matched against the pattern. Must not be null. + * @param isCaseSensitive Whether or not matching should be performed case sensitively. + * @return true if the string matches against the pattern, or false otherwise. */ - public static boolean match( String pattern, String str, - boolean isCaseSensitive ) + public static boolean match( String pattern, String str, boolean isCaseSensitive ) { char[] patArr = pattern.toCharArray(); char[] strArr = str.toCharArray(); + return match( patArr, strArr, isCaseSensitive ); + } + + public static boolean match( char[] patArr, char[] strArr, boolean isCaseSensitive ) + { int patIdxStart = 0; int patIdxEnd = patArr.length - 1; int strIdxStart = 0; @@ -425,9 +603,9 @@ public static boolean match( String pattern, String str, char ch; boolean containsStar = false; - for ( int i = 0; i < patArr.length; i++ ) + for ( char aPatArr : patArr ) { - if ( patArr[i] == '*' ) + if ( aPatArr == '*' ) { containsStar = true; break; @@ -529,8 +707,7 @@ public static boolean match( String pattern, String str, int patLength = ( patIdxTmp - patIdxStart - 1 ); int strLength = ( strIdxEnd - strIdxStart + 1 ); int foundIdx = -1; - strLoop: - for ( int i = 0; i <= strLength - patLength; i++ ) + strLoop: for ( int i = 0; i <= strLength - patLength; i++ ) { for ( int j = 0; j < patLength; j++ ) { @@ -578,8 +755,8 @@ private static boolean equals( char c1, char c2, boolean isCaseSensitive ) if ( !isCaseSensitive ) { // NOTE: Try both upper case and lower case as done by String.equalsIgnoreCase() - if ( Character.toUpperCase( c1 ) == Character.toUpperCase( c2 ) || - Character.toLowerCase( c1 ) == Character.toLowerCase( c2 ) ) + if ( Character.toUpperCase( c1 ) == Character.toUpperCase( c2 ) + || Character.toLowerCase( c1 ) == Character.toLowerCase( c2 ) ) { return true; } @@ -587,38 +764,26 @@ private static boolean equals( char c1, char c2, boolean isCaseSensitive ) return false; } - /** - * Breaks a path up into a Vector of path elements, tokenizing on - * File.separator. - * - * @param path Path to tokenize. Must not be null. - * - * @return a Vector of path elements from the tokenized path - */ - public static Vector tokenizePath( String path ) + private static String[] tokenizePathToString( String path, String separator ) { - Vector ret = new Vector(); - StringTokenizer st = new StringTokenizer( path, File.separator ); + List ret = new ArrayList(); + StringTokenizer st = new StringTokenizer( path, separator ); while ( st.hasMoreTokens() ) { - ret.addElement( st.nextToken() ); + ret.add( st.nextToken() ); } - return ret; + return ret.toArray( new String[0] ); } - /** - * Returns dependency information on these two files. If src has been - * modified later than target, it returns true. If target doesn't exist, - * it likewise returns true. Otherwise, target is newer than src and - * is not out of date, thus the method returns false. It also returns - * false if the src file doesn't even exist, since how could the + * Returns dependency information on these two files. If src has been modified later than target, it returns true. + * If target doesn't exist, it likewise returns true. Otherwise, target is newer than src and is not out of date, + * thus the method returns false. It also returns false if the src file doesn't even exist, since how could the * target then be out of date. * * @param src the original file * @param target the file being compared against - * @param granularity the amount in seconds of slack we will give in - * determining out of dateness + * @param granularity the amount in seconds of slack we will give in determining out of dateness * @return whether the target is out of date */ public static boolean isOutOfDate( File src, File target, int granularity ) @@ -639,16 +804,15 @@ public static boolean isOutOfDate( File src, File target, int granularity ) } /** - * "Flattens" a string by removing all whitespace (space, tab, linefeed, - * carriage return, and formfeed). This uses StringTokenizer and the - * default set of tokens as documented in the single arguement constructor. + * "Flattens" a string by removing all whitespace (space, tab, linefeed, carriage return, and formfeed). This uses + * StringTokenizer and the default set of tokens as documented in the single argument constructor. * * @param input a String to remove all whitespace. * @return a String that has had all whitespace removed. */ public static String removeWhitespace( String input ) { - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); if ( input != null ) { StringTokenizer st = new StringTokenizer( input ); diff --git a/src/main/java/org/codehaus/plexus/util/StringInputStream.java b/src/main/java/org/codehaus/plexus/util/StringInputStream.java index b1265504..ea1c46c8 100644 --- a/src/main/java/org/codehaus/plexus/util/StringInputStream.java +++ b/src/main/java/org/codehaus/plexus/util/StringInputStream.java @@ -61,14 +61,15 @@ import java.io.StringReader; /** - * Wraps a String as an InputStream. Note that data will be lost for - * characters not in ISO Latin 1, as a simple char->byte mapping is assumed. + * Wraps a String as an InputStream. Note that data will be lost for characters not in ISO Latin 1, as a simple + * char->byte mapping is assumed. * * @author Magesh Umasankar * @deprecated As of version 1.5.2 this class should no longer be used because it does not properly handle character * encoding. Instead, wrap the output from {@link String#getBytes(String)} into a * {@link java.io.ByteArrayInputStream}. */ +@Deprecated public class StringInputStream extends InputStream { @@ -86,16 +87,15 @@ public StringInputStream( String source ) } /** - * Reads from the Stringreader, returning the same value. Note that - * data will be lost for characters not in ISO Latin 1. Clients - * assuming a return value in the range -1 to 255 may even fail on - * such input. + * Reads from the Stringreader, returning the same value. Note that data will be lost for characters not in ISO + * Latin 1. Clients assuming a return value in the range -1 to 255 may even fail on such input. * * @return the value of the next character in the StringReader - * * @exception IOException if the original StringReader fails to be read */ - public int read() throws IOException + @Override + public int read() + throws IOException { return in.read(); } @@ -105,7 +105,9 @@ public int read() throws IOException * * @exception IOException if the original StringReader fails to be closed */ - public void close() throws IOException + @Override + public void close() + throws IOException { in.close(); } @@ -113,9 +115,9 @@ public void close() throws IOException /** * Marks the read limit of the StringReader. * - * @param limit the maximum limit of bytes that can be read before the - * mark position becomes invalid + * @param limit the maximum limit of bytes that can be read before the mark position becomes invalid */ + @Override public synchronized void mark( final int limit ) { try @@ -133,7 +135,9 @@ public synchronized void mark( final int limit ) * * @exception IOException if the StringReader fails to be reset */ - public synchronized void reset() throws IOException + @Override + public synchronized void reset() + throws IOException { in.reset(); } @@ -141,10 +145,9 @@ public synchronized void reset() throws IOException /** * @see InputStream#markSupported */ + @Override public boolean markSupported() { return in.markSupported(); } } - - diff --git a/src/main/java/org/codehaus/plexus/util/StringOutputStream.java b/src/main/java/org/codehaus/plexus/util/StringOutputStream.java index 7b57f7a7..ef22b575 100644 --- a/src/main/java/org/codehaus/plexus/util/StringOutputStream.java +++ b/src/main/java/org/codehaus/plexus/util/StringOutputStream.java @@ -23,32 +23,40 @@ * Wraps a String as an OutputStream. * * @author Emmanuel Venisse - * @version $Id$ + * * @deprecated As of version 1.5.2 this class should no longer be used because it does not properly handle character * encoding. Instead, use {@link java.io.ByteArrayOutputStream#toString(String)}. */ +@Deprecated public class StringOutputStream extends OutputStream { private StringBuffer buf = new StringBuffer(); - public void write( byte[] b ) throws IOException + @Override + public void write( byte[] b ) + throws IOException { buf.append( new String( b ) ); } - public void write( byte[] b, int off, int len ) throws IOException + @Override + public void write( byte[] b, int off, int len ) + throws IOException { buf.append( new String( b, off, len ) ); } - public void write( int b ) throws IOException + @Override + public void write( int b ) + throws IOException { byte[] bytes = new byte[1]; - bytes[0] = (byte)b; + bytes[0] = (byte) b; buf.append( new String( bytes ) ); } + @Override public String toString() { return buf.toString(); diff --git a/src/main/java/org/codehaus/plexus/util/StringUtils.java b/src/main/java/org/codehaus/plexus/util/StringUtils.java index 7e485e46..2e6a2f3f 100644 --- a/src/main/java/org/codehaus/plexus/util/StringUtils.java +++ b/src/main/java/org/codehaus/plexus/util/StringUtils.java @@ -17,11 +17,11 @@ * distribution. * * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: + * any, must include the following acknowledgement: * "This product includes software developed by the * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * Alternately, this acknowledgement may appear in the software itself, + * if and wherever such third-party acknowledgements normally appear. * * 4. The names "The Jakarta Project", "Commons", and "Apache Software * Foundation" must not be used to endorse or promote products derived @@ -57,16 +57,16 @@ import java.util.Iterator; import java.util.Locale; import java.util.Map; +import java.util.Objects; import java.util.StringTokenizer; -import java.util.regex.Matcher; -import java.util.regex.Pattern; /** - *

            Common String manipulation routines.

            - * - *

            Originally from - * Turbine and the - * GenerationJavaCore library.

            + *

            + * Common String manipulation routines. + *

            + *

            + * Originally from Turbine and the GenerationJavaCore library. + *

            * * @author Jon S. Stevens * @author Daniel Rall @@ -80,29 +80,31 @@ * @author Alexander Day Chaffee * @author Vincent Siveton * @since 1.0 - * @version $Id$ + * */ public class StringUtils { /** - *

            StringUtils instances should NOT be constructed in - * standard programming. Instead, the class should be used as - * StringUtils.trim(" foo ");.

            - * - *

            This constructor is public to permit tools that require a JavaBean - * manager to operate.

            + *

            + * StringUtils instances should NOT be constructed in standard programming. Instead, the class should + * be used as StringUtils.trim(" foo ");. + *

            + *

            + * This constructor is public to permit tools that require a JavaBean manager to operate. + *

            */ public StringUtils() { } // Empty - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Removes control characters, including whitespace, from both - * ends of this String, handling null by returning - * an empty String.

            + *

            + * Removes control characters, including whitespace, from both ends of this String, handling null by + * returning an empty String. + *

            * * @see java.lang.String#trim() * @param str the String to check @@ -114,9 +116,10 @@ public static String clean( String str ) } /** - *

            Removes control characters, including whitespace, from both - * ends of this String, handling null by returning - * null.

            + *

            + * Removes control characters, including whitespace, from both ends of this String, handling null by + * returning null. + *

            * * @see java.lang.String#trim() * @param str the String to check @@ -128,18 +131,19 @@ public static String trim( String str ) } /** - *

            Deletes all whitespaces from a String.

            - * - *

            Whitespace is defined by - * {@link Character#isWhitespace(char)}.

            + *

            + * Deletes all whitespaces from a String. + *

            + *

            + * Whitespace is defined by {@link Character#isWhitespace(char)}. + *

            * * @param str String target to delete whitespace from * @return the String without whitespaces - * @throws NullPointerException */ public static String deleteWhitespace( String str ) { - StringBuffer buffer = new StringBuffer(); + StringBuilder buffer = new StringBuilder(); int sz = str.length(); for ( int i = 0; i < sz; i++ ) { @@ -152,31 +156,34 @@ public static String deleteWhitespace( String str ) } /** - *

            Checks if a String is non null and is - * not empty (length > 0).

            + *

            + * Checks if a String is non null and is not empty (length > 0). + *

            * * @param str the String to check * @return true if the String is non-null, and not length zero */ public static boolean isNotEmpty( String str ) { - return ( ( str != null ) && ( str.length() > 0 ) ); + return ( ( str != null ) && ( !str.isEmpty() ) ); } /** - *

            Checks if a (trimmed) String is null or empty.

            - * - *

            Note: In future releases, this method will no longer trim the input string such that it works + *

            + * Checks if a (trimmed) String is null or empty. + *

            + *

            + * Note: In future releases, this method will no longer trim the input string such that it works * complementary to {@link #isNotEmpty(String)}. Code that wants to test for whitespace-only strings should be - * migrated to use {@link #isBlank(String)} instead.

            + * migrated to use {@link #isBlank(String)} instead. + *

            * * @param str the String to check - * @return true if the String is null, or - * length zero once trimmed + * @return true if the String is null, or length zero once trimmed */ public static boolean isEmpty( String str ) { - return ( ( str == null ) || ( str.trim().length() == 0 ) ); + return ( ( str == null ) || ( str.trim().isEmpty() ) ); } /** @@ -236,37 +243,42 @@ public static boolean isNotBlank( String str ) } // Equals and IndexOf - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Compares two Strings, returning true if they are equal.

            - * - *

            nulls are handled without exceptions. Two null - * references are considered to be equal. The comparison is case sensitive.

            + *

            + * Compares two Strings, returning true if they are equal. + *

            + *

            + * nulls are handled without exceptions. Two null references are considered to be equal. + * The comparison is case sensitive. + *

            * * @see java.lang.String#equals(Object) * @param str1 the first string * @param str2 the second string - * @return true if the Strings are equal, case sensitive, or - * both null + * @return true if the Strings are equal, case sensitive, or both null + * @see Objects#equals(Object, Object) */ + @Deprecated public static boolean equals( String str1, String str2 ) { - return ( str1 == null ? str2 == null : str1.equals( str2 ) ); + return Objects.equals( str1, str2 ); } /** - *

            Compares two Strings, returning true if they are equal ignoring - * the case.

            - * - *

            Nulls are handled without exceptions. Two null - * references are considered equal. Comparison is case insensitive.

            + *

            + * Compares two Strings, returning true if they are equal ignoring the case. + *

            + *

            + * Nulls are handled without exceptions. Two null references are considered equal. + * Comparison is case insensitive. + *

            * * @see java.lang.String#equalsIgnoreCase(String) - * @param str1 the first string - * @param str2 the second string - * @return true if the Strings are equal, case insensitive, or - * both null + * @param str1 the first string + * @param str2 the second string + * @return true if the Strings are equal, case insensitive, or both null */ public static boolean equalsIgnoreCase( String str1, String str2 ) { @@ -274,9 +286,12 @@ public static boolean equalsIgnoreCase( String str1, String str2 ) } /** - *

            Find the first index of any of a set of potential substrings.

            - * - *

            null String will return -1.

            + *

            + * Find the first index of any of a set of potential substrings. + *

            + *

            + * null String will return -1. + *

            * * @param str the String to check * @param searchStrs the Strings to search for @@ -294,10 +309,10 @@ public static int indexOfAny( String str, String[] searchStrs ) // String's can't have a MAX_VALUEth index. int ret = Integer.MAX_VALUE; - int tmp = 0; - for ( int i = 0; i < sz; i++ ) + int tmp; + for ( String searchStr : searchStrs ) { - tmp = str.indexOf( searchStrs[i] ); + tmp = str.indexOf( searchStr ); if ( tmp == -1 ) { continue; @@ -313,12 +328,15 @@ public static int indexOfAny( String str, String[] searchStrs ) } /** - *

            Find the latest index of any of a set of potential substrings.

            - * - *

            null string will return -1.

            + *

            + * Find the latest index of any of a set of potential substrings. + *

            + *

            + * null string will return -1. + *

            * - * @param str the String to check - * @param searchStrs the Strings to search for + * @param str the String to check + * @param searchStrs the Strings to search for * @return the last index of any of the Strings * @throws NullPointerException if any of searchStrs[i] is null */ @@ -328,12 +346,11 @@ public static int lastIndexOfAny( String str, String[] searchStrs ) { return -1; } - int sz = searchStrs.length; int ret = -1; - int tmp = 0; - for ( int i = 0; i < sz; i++ ) + int tmp; + for ( String searchStr : searchStrs ) { - tmp = str.lastIndexOf( searchStrs[i] ); + tmp = str.lastIndexOf( searchStr ); if ( tmp > ret ) { ret = tmp; @@ -343,17 +360,19 @@ public static int lastIndexOfAny( String str, String[] searchStrs ) } // Substring - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Gets a substring from the specified string avoiding exceptions.

            - * - *

            A negative start position can be used to start n - * characters from the end of the String.

            + *

            + * Gets a substring from the specified string avoiding exceptions. + *

            + *

            + * A negative start position can be used to start n characters from the end of the String. + *

            * * @param str the String to get the substring from - * @param start the position to start from, negative means - * count back from the end of the String by this many characters + * @param start the position to start from, negative means count back from the end of the String by this many + * characters * @return substring from start position */ public static String substring( String str, int start ) @@ -382,17 +401,19 @@ public static String substring( String str, int start ) } /** - *

            Gets a substring from the specified String avoiding exceptions.

            - * - *

            A negative start position can be used to start/end n - * characters from the end of the String.

            + *

            + * Gets a substring from the specified String avoiding exceptions. + *

            + *

            + * A negative start position can be used to start/end n characters from the end of the String. + *

            * * @param str the String to get the substring from - * @param start the position to start from, negative means - * count back from the end of the string by this many characters - * @param end the position to end at (exclusive), negative means - * count back from the end of the String by this many characters - * @return substring from start position to end positon + * @param start the position to start from, negative means count back from the end of the string by this many + * characters + * @param end the position to end at (exclusive), negative means count back from the end of the String by this many + * characters + * @return substring from start position to end position */ public static String substring( String str, int start, int end ) { @@ -437,11 +458,13 @@ public static String substring( String str, int start, int end ) } /** - *

            Gets the leftmost n characters of a String.

            - * - *

            If n characters are not available, or the - * String is null, the String will be returned without - * an exception.

            + *

            + * Gets the leftmost n characters of a String. + *

            + *

            + * If n characters are not available, or the String is null, the String will be returned + * without an exception. + *

            * * @param str the String to get the leftmost characters from * @param len the length of the required String @@ -465,11 +488,13 @@ public static String left( String str, int len ) } /** - *

            Gets the rightmost n characters of a String.

            - * - *

            If n characters are not available, or the String - * is null, the String will be returned without an - * exception.

            + *

            + * Gets the rightmost n characters of a String. + *

            + *

            + * If n characters are not available, or the String is null, the String will be returned + * without an exception. + *

            * * @param str the String to get the rightmost characters from * @param len the length of the required String @@ -493,11 +518,13 @@ public static String right( String str, int len ) } /** - *

            Gets n characters from the middle of a String.

            - * - *

            If n characters are not available, the remainder - * of the String will be returned without an exception. If the - * String is null, null will be returned.

            + *

            + * Gets n characters from the middle of a String. + *

            + *

            + * If n characters are not available, the remainder of the String will be returned without an + * exception. If the String is null, null will be returned. + *

            * * @param str the String to get the characters from * @param pos the position to start from @@ -508,8 +535,7 @@ public static String right( String str, int len ) */ public static String mid( String str, int pos, int len ) { - if ( ( pos < 0 ) || - ( ( str != null ) && ( pos > str.length() ) ) ) + if ( ( pos < 0 ) || ( ( str != null ) && ( pos > str.length() ) ) ) { throw new StringIndexOutOfBoundsException( "String index " + pos + " is out of bounds" ); } @@ -532,13 +558,15 @@ public static String mid( String str, int pos, int len ) } // Splitting - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Splits the provided text into a array, using whitespace as the - * separator.

            - * - *

            The separator is not included in the returned String array.

            + *

            + * Splits the provided text into a array, using whitespace as the separator. + *

            + *

            + * The separator is not included in the returned String array. + *

            * * @param str the String to parse * @return an array of parsed Strings @@ -549,7 +577,9 @@ public static String[] split( String str ) } /** - * @see #split(String, String, int) + * @param text The string to parse. + * @param separator Characters used as the delimiters. If null, splits on whitespace. + * @return an array of parsed Strings */ public static String[] split( String text, String separator ) { @@ -557,26 +587,26 @@ public static String[] split( String text, String separator ) } /** - *

            Splits the provided text into a array, based on a given separator.

            - * - *

            The separator is not included in the returned String array. The - * maximum number of splits to perfom can be controlled. A null - * separator will cause parsing to be on whitespace.

            - * - *

            This is useful for quickly splitting a String directly into - * an array of tokens, instead of an enumeration of tokens (as - * StringTokenizer does).

            + *

            + * Splits the provided text into a array, based on a given separator. + *

            + *

            + * The separator is not included in the returned String array. The maximum number of splits to perform can be + * controlled. A null separator will cause parsing to be on whitespace. + *

            + *

            + * This is useful for quickly splitting a String directly into an array of tokens, instead of an enumeration of + * tokens (as StringTokenizer does). + *

            * * @param str The string to parse. - * @param separator Characters used as the delimiters. If - * null, splits on whitespace. - * @param max The maximum number of elements to include in the - * array. A zero or negative value implies no limit. + * @param separator Characters used as the delimiters. If null, splits on whitespace. + * @param max The maximum number of elements to include in the array. A zero or negative value implies no limit. * @return an array of parsed Strings */ public static String[] split( String str, String separator, int max ) { - StringTokenizer tok = null; + StringTokenizer tok; if ( separator == null ) { // Null separator means we're using StringTokenizer's default @@ -596,7 +626,7 @@ public static String[] split( String str, String separator, int max ) String[] list = new String[listSize]; int i = 0; - int lastTokenBegin = 0; + int lastTokenBegin; int lastTokenEnd = 0; while ( tok.hasMoreTokens() ) { @@ -622,11 +652,14 @@ public static String[] split( String str, String separator, int max ) } // Joining - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Concatenates elements of an array into a single String.

            - * - *

            The difference from join is that concatenate has no delimiter.

            + *

            + * Concatenates elements of an array into a single String. + *

            + *

            + * The difference from join is that concatenate has no delimiter. + *

            * * @param array the array of values to concatenate. * @return the concatenated string. @@ -637,11 +670,12 @@ public static String concatenate( Object[] array ) } /** - *

            Joins the elements of the provided array into a single String - * containing the provided list of elements.

            - * - *

            No delimiter is added before or after the list. A - * null separator is the same as a blank String.

            + *

            + * Joins the elements of the provided array into a single String containing the provided list of elements. + *

            + *

            + * No delimiter is added before or after the list. A null separator is the same as a blank String. + *

            * * @param array the array of values to join together * @param separator the separator character to use @@ -654,9 +688,8 @@ public static String join( Object[] array, String separator ) separator = ""; } int arraySize = array.length; - int bufSize = ( arraySize == 0 ? 0 : ( array[0].toString().length() + - separator.length() ) * arraySize ); - StringBuffer buf = new StringBuffer( bufSize ); + int bufSize = ( arraySize == 0 ? 0 : ( array[0].toString().length() + separator.length() ) * arraySize ); + StringBuilder buf = new StringBuilder( bufSize ); for ( int i = 0; i < arraySize; i++ ) { @@ -670,23 +703,24 @@ public static String join( Object[] array, String separator ) } /** - *

            Joins the elements of the provided Iterator into - * a single String containing the provided elements.

            - * - *

            No delimiter is added before or after the list. A - * null separator is the same as a blank String.

            + *

            + * Joins the elements of the provided Iterator into a single String containing the provided elements. + *

            + *

            + * No delimiter is added before or after the list. A null separator is the same as a blank String. + *

            * * @param iterator the Iterator of values to join together - * @param separator the separator character to use + * @param separator the separator character to use * @return the joined String */ - public static String join( Iterator iterator, String separator ) + public static String join( Iterator iterator, String separator ) { if ( separator == null ) { separator = ""; } - StringBuffer buf = new StringBuffer( 256 ); // Java default is 16, probably too small + StringBuilder buf = new StringBuilder( 256 ); // Java default is 16, probably too small while ( iterator.hasNext() ) { buf.append( iterator.next() ); @@ -698,15 +732,16 @@ public static String join( Iterator iterator, String separator ) return buf.toString(); } - - // Replacing - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Replace a char with another char inside a larger String, once.

            - * - *

            A null reference passed to this method is a no-op.

            + *

            + * Replace a char with another char inside a larger String, once. + *

            + *

            + * A null reference passed to this method is a no-op. + *

            * * @see #replace(String text, char repl, char with, int max) * @param text text to search and replace in @@ -720,9 +755,12 @@ public static String replaceOnce( String text, char repl, char with ) } /** - *

            Replace all occurances of a char within another char.

            - * - *

            A null reference passed to this method is a no-op.

            + *

            + * Replace all occurrences of a char within another char. + *

            + *

            + * A null reference passed to this method is a no-op. + *

            * * @see #replace(String text, char repl, char with, int max) * @param text text to search and replace in @@ -736,10 +774,13 @@ public static String replace( String text, char repl, char with ) } /** - *

            Replace a char with another char inside a larger String, - * for the first max values of the search char.

            - * - *

            A null reference passed to this method is a no-op.

            + *

            + * Replace a char with another char inside a larger String, for the first max values of the search + * char. + *

            + *

            + * A null reference passed to this method is a no-op. + *

            * * @param text text to search and replace in * @param repl char to search for @@ -753,9 +794,12 @@ public static String replace( String text, char repl, char with, int max ) } /** - *

            Replace a String with another String inside a larger String, once.

            - * - *

            A null reference passed to this method is a no-op.

            + *

            + * Replace a String with another String inside a larger String, once. + *

            + *

            + * A null reference passed to this method is a no-op. + *

            * * @see #replace(String text, String repl, String with, int max) * @param text text to search and replace in @@ -769,9 +813,12 @@ public static String replaceOnce( String text, String repl, String with ) } /** - *

            Replace all occurances of a String within another String.

            - * - *

            A null reference passed to this method is a no-op.

            + *

            + * Replace all occurrences of a String within another String. + *

            + *

            + * A null reference passed to this method is a no-op. + *

            * * @see #replace(String text, String repl, String with, int max) * @param text text to search and replace in @@ -785,10 +832,13 @@ public static String replace( String text, String repl, String with ) } /** - *

            Replace a String with another String inside a larger String, - * for the first max values of the search String.

            - * - *

            A null reference passed to this method is a no-op.

            + *

            + * Replace a String with another String inside a larger String, for the first max values of the search + * String. + *

            + *

            + * A null reference passed to this method is a no-op. + *

            * * @param text text to search and replace in * @param repl String to search for @@ -803,11 +853,11 @@ public static String replace( String text, String repl, String with, int max ) return text; } - StringBuffer buf = new StringBuffer( text.length() ); - int start = 0, end = 0; + StringBuilder buf = new StringBuilder( text.length() ); + int start = 0, end; while ( ( end = text.indexOf( repl, start ) ) != -1 ) { - buf.append( text.substring( start, end ) ).append( with ); + buf.append( text, start, end ).append( with ); start = end + repl.length(); if ( --max == 0 ) @@ -815,12 +865,14 @@ public static String replace( String text, String repl, String with, int max ) break; } } - buf.append( text.substring( start ) ); + buf.append( text, start, text.length() ); return buf.toString(); } /** - *

            Overlay a part of a String with another String.

            + *

            + * Overlay a part of a String with another String. + *

            * * @param text String to do overlaying in * @param overlay String to overlay @@ -831,21 +883,20 @@ public static String replace( String text, String repl, String with, int max ) */ public static String overlayString( String text, String overlay, int start, int end ) { - return new StringBuffer( start + overlay.length() + text.length() - end + 1 ) - .append( text.substring( 0, start ) ) - .append( overlay ) - .append( text.substring( end ) ) - .toString(); + return new StringBuilder( start + overlay.length() + text.length() - end + + 1 ).append( text, 0, start ).append( overlay ).append( text, end, text.length() ).toString(); } // Centering - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Center a String in a larger String of size n.

            - * - *

            Uses spaces as the value to buffer the String with. - * Equivalent to center(str, size, " ").

            + *

            + * Center a String in a larger String of size n. + *

            + *

            + * Uses spaces as the value to buffer the String with. Equivalent to center(str, size, " "). + *

            * * @param str String to center * @param size int size of new String @@ -858,9 +909,12 @@ public static String center( String str, int size ) } /** - *

            Center a String in a larger String of size n.

            - * - *

            Uses a supplied String as the value to buffer the String with.

            + *

            + * Center a String in a larger String of size n. + *

            + *

            + * Uses a supplied String as the value to buffer the String with. + *

            * * @param str String to center * @param size int size of new String @@ -883,10 +937,12 @@ public static String center( String str, int size, String delim ) } // Chomping - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Remove the last newline, and everything after it from a String.

            + *

            + * Remove the last newline, and everything after it from a String. + *

            * * @param str String to chomp the newline from * @return String without chomped newline @@ -898,8 +954,9 @@ public static String chomp( String str ) } /** - *

            Remove the last value of a supplied String, and everything after - * it from a String.

            + *

            + * Remove the last value of a supplied String, and everything after it from a String. + *

            * * @param str String to chomp from * @param sep String to chomp @@ -920,8 +977,9 @@ public static String chomp( String str, String sep ) } /** - *

            Remove a newline if and only if it is at the end - * of the supplied String.

            + *

            + * Remove a newline if and only if it is at the end of the supplied String. + *

            * * @param str String to chomp from * @return String without chomped ending @@ -933,7 +991,9 @@ public static String chompLast( String str ) } /** - *

            Remove a value if and only if the String ends with that value.

            + *

            + * Remove a value if and only if the String ends with that value. + *

            * * @param str String to chomp from * @param sep String to chomp @@ -958,8 +1018,9 @@ public static String chompLast( String str, String sep ) } /** - *

            Remove everything and return the last value of a supplied String, and - * everything after it from a String.

            + *

            + * Remove everything and return the last value of a supplied String, and everything after it from a String. + *

            * * @param str String to chomp from * @param sep String to chomp @@ -984,8 +1045,9 @@ else if ( idx != -1 ) } /** - *

            Remove the first value of a supplied String, and everything before it - * from a String.

            + *

            + * Remove the first value of a supplied String, and everything before it from a String. + *

            * * @param str String to chomp from * @param sep String to chomp @@ -1006,8 +1068,9 @@ public static String prechomp( String str, String sep ) } /** - *

            Remove and return everything before the first value of a - * supplied String from another String.

            + *

            + * Remove and return everything before the first value of a supplied String from another String. + *

            * * @param str String to chomp from * @param sep String to chomp @@ -1028,13 +1091,15 @@ public static String getPrechomp( String str, String sep ) } // Chopping - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Remove the last character from a String.

            - * - *

            If the String ends in \r\n, then remove both - * of them.

            + *

            + * Remove the last character from a String. + *

            + *

            + * If the String ends in \r\n, then remove both of them. + *

            * * @param str String to chop last character from * @return String without last character @@ -1064,8 +1129,10 @@ public static String chop( String str ) } /** - *

            Remove \n from end of a String if it's there. - * If a \r precedes it, then remove that too.

            + *

            + * Remove \n from end of a String if it's there. If a \r precedes it, then remove that + * too. + *

            * * @param str String to chop a newline from * @return String without newline @@ -1089,16 +1156,17 @@ public static String chopNewline( String str ) return str.substring( 0, lastIdx ); } - // Conversion - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- // spec 3.10.6 /** - *

            Escapes any values it finds into their String form.

            - * - *

            So a tab becomes the characters '\\' and - * 't'.

            + *

            + * Escapes any values it finds into their String form. + *

            + *

            + * So a tab becomes the characters '\\' and 't'. + *

            * * @param str String to escape values in * @return String with escaped values @@ -1106,10 +1174,10 @@ public static String chopNewline( String str ) */ public static String escape( String str ) { - // improved with code from cybertiger@cyberiantiger.org - // unicode from him, and defaul for < 32's. + // improved with code from cybertiger@cyberiantiger.org + // unicode from him, and default for < 32's. int sz = str.length(); - StringBuffer buffer = new StringBuffer( 2 * sz ); + StringBuilder buffer = new StringBuilder( 2 * sz ); for ( int i = 0; i < sz; i++ ) { char ch = str.charAt( i ); @@ -1151,7 +1219,7 @@ else if ( ch < 32 ) buffer.append( '\\' ); buffer.append( 'r' ); break; - default : + default: if ( ch > 0xf ) { buffer.append( "\\u00" + Integer.toHexString( ch ) ); @@ -1179,7 +1247,7 @@ else if ( ch < 32 ) buffer.append( '\\' ); buffer.append( '\\' ); break; - default : + default: buffer.append( ch ); break; } @@ -1189,21 +1257,22 @@ else if ( ch < 32 ) } // Padding - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Repeat a String n times to form a - * new string.

            + *

            + * Repeat a String n times to form a new string. + *

            * * @param str String to repeat * @param repeat number of times to repeat str * @return String with repeated String - * @throws NegativeArraySizeException if repeat < 0 + * @throws NegativeArraySizeException if repeat < 0 * @throws NullPointerException if str is null */ public static String repeat( String str, int repeat ) { - StringBuffer buffer = new StringBuffer( repeat * str.length() ); + StringBuilder buffer = new StringBuilder( repeat * str.length() ); for ( int i = 0; i < repeat; i++ ) { buffer.append( str ); @@ -1212,9 +1281,12 @@ public static String repeat( String str, int repeat ) } /** - *

            Right pad a String with spaces.

            - * - *

            The String is padded to the size of n.

            + *

            + * Right pad a String with spaces. + *

            + *

            + * The String is padded to the size of n. + *

            * * @param str String to repeat * @param size number of times to repeat str @@ -1227,9 +1299,12 @@ public static String rightPad( String str, int size ) } /** - *

            Right pad a String with a specified string.

            - * - *

            The String is padded to the size of n.

            + *

            + * Right pad a String with a specified string. + *

            + *

            + * The String is padded to the size of n. + *

            * * @param str String to pad out * @param size size to pad to @@ -1249,9 +1324,12 @@ public static String rightPad( String str, int size, String delim ) } /** - *

            Left pad a String with spaces.

            - * - *

            The String is padded to the size of n.

            + *

            + * Left pad a String with spaces. + *

            + *

            + * The String is padded to the size of n. + *

            * * @param str String to pad out * @param size size to pad to @@ -1284,10 +1362,12 @@ public static String leftPad( String str, int size, String delim ) } // Stripping - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Remove whitespace from the front and back of a String.

            + *

            + * Remove whitespace from the front and back of a String. + *

            * * @param str the String to remove whitespace from * @return the stripped String @@ -1298,11 +1378,12 @@ public static String strip( String str ) } /** - *

            Remove a specified String from the front and back of a - * String.

            - * - *

            If whitespace is wanted to be removed, used the - * {@link #strip(java.lang.String)} method.

            + *

            + * Remove a specified String from the front and back of a String. + *

            + *

            + * If whitespace is wanted to be removed, used the {@link #strip(java.lang.String)} method. + *

            * * @param str the String to remove a string from * @param delim the String to remove at start and end @@ -1315,8 +1396,9 @@ public static String strip( String str, String delim ) } /** - *

            Strip whitespace from the front and back of every String - * in the array.

            + *

            + * Strip whitespace from the front and back of every String in the array. + *

            * * @param strs the Strings to remove whitespace from * @return the stripped Strings @@ -1327,8 +1409,9 @@ public static String[] stripAll( String[] strs ) } /** - *

            Strip the specified delimiter from the front and back of - * every String in the array.

            + *

            + * Strip the specified delimiter from the front and back of every String in the array. + *

            * * @param strs the Strings to remove a String from * @param delimiter the String to remove at start and end @@ -1350,10 +1433,12 @@ public static String[] stripAll( String[] strs, String delimiter ) } /** - *

            Strip any of a supplied String from the end of a String.

            - * - *

            If the strip String is null, whitespace is - * stripped.

            + *

            + * Strip any of a supplied String from the end of a String. + *

            + *

            + * If the strip String is null, whitespace is stripped. + *

            * * @param str the String to remove characters from * @param strip the String to remove @@ -1385,10 +1470,12 @@ public static String stripEnd( String str, String strip ) } /** - *

            Strip any of a supplied String from the start of a String.

            - * - *

            If the strip String is null, whitespace is - * stripped.

            + *

            + * Strip any of a supplied String from the start of a String. + *

            + *

            + * If the strip String is null, whitespace is stripped. + *

            * * @param str the String to remove characters from * @param strip the String to remove @@ -1423,11 +1510,12 @@ public static String stripStart( String str, String strip ) } // Case conversion - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Convert a String to upper case, null String - * returns null.

            + *

            + * Convert a String to upper case, null String returns null. + *

            * * @param str the String to uppercase * @return the upper cased String @@ -1442,8 +1530,9 @@ public static String upperCase( String str ) } /** - *

            Convert a String to lower case, null String - * returns null.

            + *

            + * Convert a String to lower case, null String returns null. + *

            * * @param str the string to lowercase * @return the lower cased String @@ -1458,10 +1547,12 @@ public static String lowerCase( String str ) } /** - *

            Uncapitalise a String.

            - * - *

            That is, convert the first character into lower-case. - * null is returned as null.

            + *

            + * Uncapitalise a String. + *

            + *

            + * That is, convert the first character into lower-case. null is returned as null. + *

            * * @param str the String to uncapitalise * @return uncapitalised String @@ -1478,18 +1569,18 @@ else if ( str.length() == 0 ) } else { - return new StringBuffer( str.length() ) - .append( Character.toLowerCase( str.charAt( 0 ) ) ) - .append( str.substring( 1 ) ) - .toString(); + return new StringBuilder( str.length() ).append( Character.toLowerCase( str.charAt( 0 ) ) ).append( str, 1, + str.length() ).toString(); } } /** - *

            Capitalise a String.

            - * - *

            That is, convert the first character into title-case. - * null is returned as null.

            + *

            + * Capitalise a String. + *

            + *

            + * That is, convert the first character into title-case. null is returned as null. + *

            * * @param str the String to capitalise * @return capitalised String @@ -1506,20 +1597,21 @@ else if ( str.length() == 0 ) } else { - return new StringBuffer( str.length() ) - .append( Character.toTitleCase( str.charAt( 0 ) ) ) - .append( str.substring( 1 ) ) - .toString(); + return new StringBuilder( str.length() ).append( Character.toTitleCase( str.charAt( 0 ) ) ).append( str, 1, + str.length() ).toString(); } } /** - *

            Swaps the case of String.

            - * - *

            Properly looks after making sure the start of words - * are Titlecase and not Uppercase.

            - * - *

            null is returned as null.

            + *

            + * Swaps the case of String. + *

            + *

            + * Properly looks after making sure the start of words are Titlecase and not Uppercase. + *

            + *

            + * null is returned as null. + *

            * * @param str the String to swap the case of * @return the modified String @@ -1531,11 +1623,11 @@ public static String swapCase( String str ) return null; } int sz = str.length(); - StringBuffer buffer = new StringBuffer( sz ); + StringBuilder buffer = new StringBuilder( sz ); boolean whitespace = false; - char ch = 0; - char tmp = 0; + char ch; + char tmp; for ( int i = 0; i < sz; i++ ) { @@ -1569,14 +1661,16 @@ else if ( Character.isLowerCase( ch ) ) return buffer.toString(); } - /** - *

            Capitalise all the words in a String.

            - * - *

            Uses {@link Character#isWhitespace(char)} as a - * separator between words.

            - * - *

            null will return null.

            + *

            + * Capitalise all the words in a String. + *

            + *

            + * Uses {@link Character#isWhitespace(char)} as a separator between words. + *

            + *

            + * null will return null. + *

            * * @param str the String to capitalise * @return capitalised String @@ -1588,7 +1682,7 @@ public static String capitaliseAllWords( String str ) return null; } int sz = str.length(); - StringBuffer buffer = new StringBuffer( sz ); + StringBuilder buffer = new StringBuilder( sz ); boolean space = true; for ( int i = 0; i < sz; i++ ) { @@ -1612,14 +1706,17 @@ else if ( space ) } /** - *

            Uncapitalise all the words in a string.

            - * - *

            Uses {@link Character#isWhitespace(char)} as a - * separator between words.

            - * - *

            null will return null.

            + *

            + * Uncapitalise all the words in a string. + *

            + *

            + * Uses {@link Character#isWhitespace(char)} as a separator between words. + *

            + *

            + * null will return null. + *

            * - * @param str the string to uncapitalise + * @param str the string to uncapitalise * @return uncapitalised string */ public static String uncapitaliseAllWords( String str ) @@ -1629,7 +1726,7 @@ public static String uncapitaliseAllWords( String str ) return null; } int sz = str.length(); - StringBuffer buffer = new StringBuffer( sz ); + StringBuilder buffer = new StringBuilder( sz ); boolean space = true; for ( int i = 0; i < sz; i++ ) { @@ -1653,14 +1750,15 @@ else if ( space ) } // Nested extraction - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Get the String that is nested in between two instances of the - * same String.

            - * - *

            If str is null, will - * return null.

            + *

            + * Get the String that is nested in between two instances of the same String. + *

            + *

            + * If str is null, will return null. + *

            * * @param str the String containing nested-string * @param tag the String before and after nested-string @@ -1673,7 +1771,9 @@ public static String getNestedString( String str, String tag ) } /** - *

            Get the String that is nested in between two Strings.

            + *

            + * Get the String that is nested in between two Strings. + *

            * * @param str the String containing nested-string * @param open the String before nested-string @@ -1700,13 +1800,16 @@ public static String getNestedString( String str, String open, String close ) } /** - *

            How many times is the substring in the larger String.

            - * - *

            null returns 0.

            + *

            + * How many times is the substring in the larger String. + *

            + *

            + * null returns 0. + *

            * * @param str the String to check * @param sub the substring to count - * @return the number of occurances, 0 if the String is null + * @return the number of occurrences, 0 if the String is null * @throws NullPointerException if sub is null */ public static int countMatches( String str, String sub ) @@ -1730,13 +1833,15 @@ public static int countMatches( String str, String sub ) } // Character Tests - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Checks if the String contains only unicode letters.

            - * - *

            null will return false. - * An empty String will return true.

            + *

            + * Checks if the String contains only unicode letters. + *

            + *

            + * null will return false. An empty String will return true. + *

            * * @param str the String to check * @return true if only contains letters, and is non-null @@ -1759,10 +1864,12 @@ public static boolean isAlpha( String str ) } /** - *

            Checks if the String contains only whitespace.

            - * - *

            null will return false. An - * empty String will return true.

            + *

            + * Checks if the String contains only whitespace. + *

            + *

            + * null will return false. An empty String will return true. + *

            * * @param str the String to check * @return true if only contains whitespace, and is non-null @@ -1785,15 +1892,15 @@ public static boolean isWhitespace( String str ) } /** - *

            Checks if the String contains only unicode letters and - * space (' ').

            - * - *

            null will return false. An - * empty String will return true.

            + *

            + * Checks if the String contains only unicode letters and space (' '). + *

            + *

            + * null will return false. An empty String will return true. + *

            * * @param str the String to check - * @return true if only contains letters and space, - * and is non-null + * @return true if only contains letters and space, and is non-null */ public static boolean isAlphaSpace( String str ) { @@ -1804,8 +1911,7 @@ public static boolean isAlphaSpace( String str ) int sz = str.length(); for ( int i = 0; i < sz; i++ ) { - if ( ( Character.isLetter( str.charAt( i ) ) == false ) && - ( str.charAt( i ) != ' ' ) ) + if ( ( Character.isLetter( str.charAt( i ) ) == false ) && ( str.charAt( i ) != ' ' ) ) { return false; } @@ -1814,14 +1920,15 @@ public static boolean isAlphaSpace( String str ) } /** - *

            Checks if the String contains only unicode letters or digits.

            - * - *

            null will return false. An empty - * String will return true.

            + *

            + * Checks if the String contains only unicode letters or digits. + *

            + *

            + * null will return false. An empty String will return true. + *

            * * @param str the String to check - * @return true if only contains letters or digits, - * and is non-null + * @return true if only contains letters or digits, and is non-null */ public static boolean isAlphanumeric( String str ) { @@ -1841,15 +1948,15 @@ public static boolean isAlphanumeric( String str ) } /** - *

            Checks if the String contains only unicode letters, digits - * or space (' ').

            - * - *

            null will return false. An empty - * String will return true.

            + *

            + * Checks if the String contains only unicode letters, digits or space (' '). + *

            + *

            + * null will return false. An empty String will return true. + *

            * * @param str the String to check - * @return true if only contains letters, digits or space, - * and is non-null + * @return true if only contains letters, digits or space, and is non-null */ public static boolean isAlphanumericSpace( String str ) { @@ -1860,8 +1967,7 @@ public static boolean isAlphanumericSpace( String str ) int sz = str.length(); for ( int i = 0; i < sz; i++ ) { - if ( ( Character.isLetterOrDigit( str.charAt( i ) ) == false ) && - ( str.charAt( i ) != ' ' ) ) + if ( ( Character.isLetterOrDigit( str.charAt( i ) ) == false ) && ( str.charAt( i ) != ' ' ) ) { return false; } @@ -1870,10 +1976,12 @@ public static boolean isAlphanumericSpace( String str ) } /** - *

            Checks if the String contains only unicode digits.

            - * - *

            null will return false. - * An empty String will return true.

            + *

            + * Checks if the String contains only unicode digits. + *

            + *

            + * null will return false. An empty String will return true. + *

            * * @param str the String to check * @return true if only contains digits, and is non-null @@ -1896,15 +2004,15 @@ public static boolean isNumeric( String str ) } /** - *

            Checks if the String contains only unicode digits or space - * (' ').

            - * - *

            null will return false. An empty - * String will return true.

            + *

            + * Checks if the String contains only unicode digits or space (' '). + *

            + *

            + * null will return false. An empty String will return true. + *

            * * @param str the String to check - * @return true if only contains digits or space, - * and is non-null + * @return true if only contains digits or space, and is non-null */ public static boolean isNumericSpace( String str ) { @@ -1915,8 +2023,7 @@ public static boolean isNumericSpace( String str ) int sz = str.length(); for ( int i = 0; i < sz; i++ ) { - if ( ( Character.isDigit( str.charAt( i ) ) == false ) && - ( str.charAt( i ) != ' ' ) ) + if ( ( Character.isDigit( str.charAt( i ) ) == false ) && ( str.charAt( i ) != ' ' ) ) { return false; } @@ -1925,45 +2032,51 @@ public static boolean isNumericSpace( String str ) } // Defaults - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Returns either the passed in Object as a String, - * or, if the Object is null, an empty - * String.

            + *

            + * Returns either the passed in Object as a String, or, if the Object is + * null, an empty String. + *

            * * @param obj the Object to check - * @return the passed in Object's toString, or blank if it was - * null + * @return the passed in Object's toString, or blank if it was null + * @see Objects#toString(Object, String) */ + @Deprecated public static String defaultString( Object obj ) { return defaultString( obj, "" ); } /** - *

            Returns either the passed in Object as a String, - * or, if the Object is null, a passed - * in default String.

            + *

            + * Returns either the passed in Object as a String, or, if the Object is + * null, a passed in default String. + *

            * * @param obj the Object to check - * @param defaultString the default String to return if str is - * null - * @return the passed in string, or the default if it was - * null + * @param defaultString the default String to return if str is null + * @return the passed in string, or the default if it was null + * @see Objects#toString(Object, String) */ + @Deprecated public static String defaultString( Object obj, String defaultString ) { - return ( obj == null ) ? defaultString : obj.toString(); + return Objects.toString( obj, defaultString ); } // Reversing - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - *

            Reverse a String.

            - * - *

            null String returns null.

            + *

            + * Reverse a String. + *

            + *

            + * null String returns null. + *

            * * @param str the String to reverse * @return the reversed String @@ -1974,15 +2087,17 @@ public static String reverse( String str ) { return null; } - return new StringBuffer( str ).reverse().toString(); + return new StringBuilder( str ).reverse().toString(); } /** - *

            Reverses a String that is delimited by a specific character.

            - * - *

            The Strings between the delimiters are not reversed. - * Thus java.lang.String becomes String.lang.java (if the delimiter - * is '.').

            + *

            + * Reverses a String that is delimited by a specific character. + *

            + *

            + * The Strings between the delimiters are not reversed. Thus java.lang.String becomes String.lang.java (if the + * delimiter is '.'). + *

            * * @param str the String to reverse * @param delimiter the delimiter to use @@ -1998,11 +2113,14 @@ public static String reverseDelimitedString( String str, String delimiter ) } /** - *

            Reverses an array.

            - * - *

            TAKEN FROM CollectionsUtils.

            + *

            + * Reverses an array. + *

            + *

            + * TAKEN FROM CollectionsUtils. + *

            * - * @param array the array to reverse + * @param array the array to reverse */ private static void reverseArray( Object[] array ) { @@ -2021,18 +2139,17 @@ private static void reverseArray( Object[] array ) } // Abbreviating - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - * Turn "Now is the time for all good men" into "Now is the time for..." + * @return Turn "Now is the time for all good men" into "Now is the time for..." *

            * Specifically: *

            - * If str is less than max characters long, return it. - * Else abbreviate it to (substring(str, 0, max-3) + "..."). - * If maxWidth is less than 3, throw an IllegalArgumentException. - * In no case will it return a string of length greater than maxWidth. - * + * If str is less than max characters long, return it. Else abbreviate it to (substring(str, 0, max-3) + "..."). If + * maxWidth is less than 3, throw an IllegalArgumentException. In no case will it return a string of length greater + * than maxWidth. + * @param s string * @param maxWidth maximum length of result string **/ public static String abbreviate( String s, int maxWidth ) @@ -2041,14 +2158,12 @@ public static String abbreviate( String s, int maxWidth ) } /** - * Turn "Now is the time for all good men" into "...is the time for..." - *

            - * Works like abbreviate(String, int), but allows you to specify a "left edge" - * offset. Note that this left edge is not necessarily going to be the leftmost - * character in the result, or the first - * character following the ellipses, but it will appear somewhere in the result. - * In no case will it return a string of length greater than maxWidth. + * @return Turn "Now is the time for all good men" into "...is the time for..." * + * Works like abbreviate(String, int), but allows you to specify a "left edge" offset. Note that this left edge is + * not necessarily going to be the leftmost character in the result, or the first character following the ellipses, + * but it will appear somewhere in the result. In no case will it return a string of length greater than maxWidth. + * @param s string * @param offset left edge of source string * @param maxWidth maximum length of result string **/ @@ -2086,15 +2201,15 @@ public static String abbreviate( String s, int offset, int maxWidth ) } // Difference - //-------------------------------------------------------------------------- + // -------------------------------------------------------------------------- /** - * Compare two strings, and return the portion where they differ. - * (More precisely, return the remainder of the second string, - * starting from where it's different from the first.) + * Compare two strings, and return the portion where they differ. (More precisely, return the remainder of the + * second string, starting from where it's different from the first.) *

            - * E.g. strdiff("i am a machine", "i am a robot") -> "robot" - * + * E.g. strdiff("i am a machine", "i am a robot") -> "robot" + * @param s1 string + * @param s2 string * @return the portion of s2 where it differs from s1; returns the empty string ("") if they are equal **/ public static String difference( String s1, String s2 ) @@ -2110,9 +2225,10 @@ public static String difference( String s1, String s2 ) /** * Compare two strings, and return the index at which the strings begin to differ. *

            - * E.g. strdiff("i am a machine", "i am a robot") -> 7 + * E.g. strdiff("i am a machine", "i am a robot") -> 7 *

            - * + * @param s1 string + * @param s2 string * @return the index where s2 and s1 begin to differ; -1 if they are equal **/ public static int differenceAt( String s1, String s2 ) @@ -2132,9 +2248,9 @@ public static int differenceAt( String s1, String s2 ) return -1; } - public static String interpolate( String text, Map namespace ) + public static String interpolate( String text, Map namespace ) { - Iterator keys = namespace.keySet().iterator(); + Iterator keys = namespace.keySet().iterator(); while ( keys.hasNext() ) { @@ -2149,11 +2265,11 @@ public static String interpolate( String text, Map namespace ) String value = obj.toString(); - text = StringUtils.replace( text, "${" + key + "}", value ); + text = replace( text, "${" + key + "}", value ); - if ( key.indexOf( " " ) == -1 ) + if ( !key.contains( " " ) ) { - text = StringUtils.replace( text, "$" + key, value ); + text = replace( text, "$" + key, value ); } } return text; @@ -2163,7 +2279,7 @@ public static String removeAndHump( String data, String replaceThis ) { String temp; - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); temp = data; @@ -2199,7 +2315,7 @@ public static String lowercaseFirstLetter( String data ) public static String addAndDeHump( String view ) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for ( int i = 0; i < view.length(); i++ ) { @@ -2215,7 +2331,9 @@ public static String addAndDeHump( String view ) } /** - *

            Quote and escape a String with the given character, handling null.

            + *

            + * Quote and escape a String with the given character, handling null. + *

            * *
                  * StringUtils.quoteAndEscape(null, *)    = null
            @@ -2225,70 +2343,78 @@ public static String addAndDeHump( String view )
                  * StringUtils.quoteAndEscape("a\"bc", '\'') = 'a\"bc'
                  * 
            * - * @param source - * @param quoteChar + * @param source the source String + * @param quoteChar the char used to quote * @return the String quoted and escaped * @since 1.5.1 * @see #quoteAndEscape(String, char, char[], char[], char, boolean) */ - public static String quoteAndEscape( String source, - char quoteChar ) + public static String quoteAndEscape( String source, char quoteChar ) { - return quoteAndEscape( source, quoteChar, new char[]{ quoteChar }, new char[]{ ' ' }, '\\', false ); + return quoteAndEscape( source, quoteChar, new char[] { quoteChar }, new char[] { ' ' }, '\\', false ); } /** - *

            Quote and escape a String with the given character, handling null.

            + *

            + * Quote and escape a String with the given character, handling null. + *

            * - * @param source - * @param quoteChar - * @param quotingTriggers + * @param source the source String + * @param quoteChar the char used to quote + * @param quotingTriggers chars generating a quote * @return the String quoted and escaped * @since 1.5.1 * @see #quoteAndEscape(String, char, char[], char[], char, boolean) */ - public static String quoteAndEscape( String source, - char quoteChar, - char[] quotingTriggers ) + public static String quoteAndEscape( String source, char quoteChar, char[] quotingTriggers ) { - return quoteAndEscape( source, quoteChar, new char[]{ quoteChar }, quotingTriggers, '\\', false ); + return quoteAndEscape( source, quoteChar, new char[] { quoteChar }, quotingTriggers, '\\', false ); } /** - * @param source - * @param quoteChar - * @param escapedChars - * @param escapeChar - * @param force + * @param source the source String + * @param quoteChar the char used to quote + * @param escapedChars chars to escape + * @param escapeChar char used for escaping + * @param force force the quoting * @return the String quoted and escaped * @since 1.5.1 * @see #quoteAndEscape(String, char, char[], char[], char, boolean) */ - public static String quoteAndEscape( String source, - char quoteChar, - final char[] escapedChars, - char escapeChar, - boolean force ) + public static String quoteAndEscape( String source, char quoteChar, final char[] escapedChars, char escapeChar, + boolean force ) { - return quoteAndEscape( source, quoteChar, escapedChars, new char[]{ ' ' }, escapeChar, force ); + return quoteAndEscape( source, quoteChar, escapedChars, new char[] { ' ' }, escapeChar, force ); } /** - * @param source - * @param quoteChar - * @param escapedChars - * @param quotingTriggers - * @param escapeChar - * @param force + * @param source the source String + * @param quoteChar the char used to quote + * @param escapedChars chars to escape + * @param quotingTriggers chars generating a quote + * @param escapeChar char used for escaping + * @param force force the quoting * @return the String quoted and escaped * @since 1.5.1 */ - public static String quoteAndEscape( String source, - char quoteChar, - final char[] escapedChars, - final char[] quotingTriggers, - char escapeChar, - boolean force ) + public static String quoteAndEscape( String source, char quoteChar, final char[] escapedChars, + final char[] quotingTriggers, char escapeChar, boolean force ) + { + return quoteAndEscape( source, quoteChar, escapedChars, quotingTriggers, escapeChar + "%s", force ); + } + + /** + * @param source the source String + * @param quoteChar the char used to quote + * @param escapedChars chars to escape + * @param quotingTriggers chars generating a quote + * @param escapePattern pattern used for escaping + * @param force force the quoting + * @return the String quoted and escaped + * @since 3.0.4 + */ + public static String quoteAndEscape( String source, char quoteChar, final char[] escapedChars, + final char[] quotingTriggers, String escapePattern, boolean force ) { if ( source == null ) { @@ -2296,12 +2422,12 @@ public static String quoteAndEscape( String source, } if ( !force && source.startsWith( Character.toString( quoteChar ) ) - && source.endsWith( Character.toString( quoteChar ) ) ) + && source.endsWith( Character.toString( quoteChar ) ) ) { return source; } - String escaped = escape( source, escapedChars, escapeChar ); + String escaped = escape( source, escapedChars, escapePattern ); boolean quote = false; if ( force ) @@ -2314,9 +2440,9 @@ else if ( !escaped.equals( source ) ) } else { - for ( int i = 0; i < quotingTriggers.length; i++ ) + for ( char quotingTrigger : quotingTriggers ) { - if ( escaped.indexOf( quotingTriggers[i] ) > -1 ) + if ( escaped.indexOf( quotingTrigger ) > -1 ) { quote = true; break; @@ -2333,26 +2459,37 @@ else if ( !escaped.equals( source ) ) } /** - * @param source - * @param escapedChars - * @param escapeChar + * @param source the source String + * @param escapedChars chars to escape + * @param escapeChar char used for escaping * @return the String escaped * @since 1.5.1 */ public static String escape( String source, final char[] escapedChars, char escapeChar ) + { + return escape( source, escapedChars, escapeChar + "%s" ); + } + + /** + * @param source the source String + * @param escapedChars chars to escape + * @param escapePattern pattern used for escaping + * @return the String escaped + * @since 3.0.4 + */ + public static String escape( String source, final char[] escapedChars, String escapePattern ) { if ( source == null ) { return null; } - char[] eqc = new char[ escapedChars.length ]; + char[] eqc = new char[escapedChars.length]; System.arraycopy( escapedChars, 0, eqc, 0, escapedChars.length ); Arrays.sort( eqc ); - StringBuffer buffer = new StringBuffer( source.length() ); + StringBuilder buffer = new StringBuilder( source.length() ); - int escapeCount = 0; for ( int i = 0; i < source.length(); i++ ) { final char c = source.charAt( i ); @@ -2360,19 +2497,19 @@ public static String escape( String source, final char[] escapedChars, char esca if ( result > -1 ) { - buffer.append( escapeChar ); - escapeCount++; + buffer.append( String.format( escapePattern, c ) ); + } + else + { + buffer.append( c ); } - - buffer.append( c ); } return buffer.toString(); } /** - * Remove all duplicate whitespace characters and line terminators are replaced with a single - * space. + * Remove all duplicate whitespace characters and line terminators are replaced with a single space. * * @param s a not null String * @return a string with unique whitespace. @@ -2380,30 +2517,37 @@ public static String escape( String source, final char[] escapedChars, char esca */ public static String removeDuplicateWhitespace( String s ) { - String patternStr = "\\s+"; - String replaceStr = " "; - Pattern pattern = Pattern.compile( patternStr ); - Matcher matcher = pattern.matcher( s ); - return matcher.replaceAll( replaceStr ); + StringBuilder result = new StringBuilder(); + int length = s.length(); + boolean isPreviousWhiteSpace = false; + for ( int i = 0; i < length; i++ ) + { + char c = s.charAt( i ); + boolean thisCharWhiteSpace = Character.isWhitespace( c ); + if ( !( isPreviousWhiteSpace && thisCharWhiteSpace ) ) + { + result.append( c ); + } + isPreviousWhiteSpace = thisCharWhiteSpace; + } + return result.toString(); } /** - * Parses the given String and replaces all occurrences of - * '\n', '\r' and '\r\n' with the system line separator. + * Parses the given String and replaces all occurrences of '\n', '\r' and '\r\n' with the system line separator. * * @param s a not null String * @return a String that contains only System line separators. * @see #unifyLineSeparators(String, String) * @since 1.5.7 */ - public static String unifyLineSeparators( String s ) - { - return unifyLineSeparators( s, System.getProperty( "line.separator" ) ); - } + public static String unifyLineSeparators( String s ) + { + return unifyLineSeparators( s, System.getProperty( "line.separator" ) ); + } /** - * Parses the given String and replaces all occurrences of - * '\n', '\r' and '\r\n' with the system line separator. + * Parses the given String and replaces all occurrences of '\n', '\r' and '\r\n' with the system line separator. * * @param s a not null String * @param ls the wanted line separator ("\n" on UNIX), if null using the System line separator. @@ -2411,8 +2555,8 @@ public static String unifyLineSeparators( String s ) * @throws IllegalArgumentException if ls is not '\n', '\r' and '\r\n' characters. * @since 1.5.7 */ - public static String unifyLineSeparators( String s, String ls ) - { + public static String unifyLineSeparators( String s, String ls ) + { if ( s == null ) { return null; @@ -2430,7 +2574,7 @@ public static String unifyLineSeparators( String s, String ls ) int length = s.length(); - StringBuffer buffer = new StringBuffer( length ); + StringBuilder buffer = new StringBuilder( length ); for ( int i = 0; i < length; i++ ) { if ( s.charAt( i ) == '\r' ) @@ -2456,10 +2600,13 @@ else if ( s.charAt( i ) == '\n' ) } /** - *

            Checks if String contains a search character, handling null. - * This method uses {@link String#indexOf(int)}.

            - * - *

            A null or empty ("") String will return false.

            + *

            + * Checks if String contains a search character, handling null. This method uses + * {@link String#indexOf(int)}. + *

            + *

            + * A null or empty ("") String will return false. + *

            * *
                  * StringUtils.contains(null, *)    = false
            @@ -2468,10 +2615,9 @@ else if ( s.charAt( i ) == '\n' )
                  * StringUtils.contains("abc", 'z') = false
                  * 
            * - * @param str the String to check, may be null - * @param searchChar the character to find - * @return true if the String contains the search character, - * false if not or null string input + * @param str the String to check, may be null + * @param searchChar the character to find + * @return true if the String contains the search character, false if not or null string input * @since 1.5.7 */ public static boolean contains( String str, char searchChar ) @@ -2484,10 +2630,13 @@ public static boolean contains( String str, char searchChar ) } /** - *

            Checks if String contains a search String, handling null. - * This method uses {@link String#indexOf(int)}.

            - * - *

            A null String will return false.

            + *

            + * Checks if String contains a search String, handling null. This method uses + * {@link String#indexOf(int)}. + *

            + *

            + * A null String will return false. + *

            * *
                  * StringUtils.contains(null, *)     = false
            @@ -2498,10 +2647,9 @@ public static boolean contains( String str, char searchChar )
                  * StringUtils.contains("abc", "z")  = false
                  * 
            * - * @param str the String to check, may be null - * @param searchStr the String to find, may be null - * @return true if the String contains the search String, - * false if not or null string input + * @param str the String to check, may be null + * @param searchStr the String to find, may be null + * @return true if the String contains the search String, false if not or null string input * @since 1.5.7 */ public static boolean contains( String str, String searchStr ) @@ -2510,6 +2658,6 @@ public static boolean contains( String str, String searchStr ) { return false; } - return str.indexOf( searchStr ) >= 0; + return str.contains( searchStr ); } } diff --git a/src/main/java/org/codehaus/plexus/util/SweeperPool.java b/src/main/java/org/codehaus/plexus/util/SweeperPool.java index e1fed5da..0a2a97a4 100644 --- a/src/main/java/org/codehaus/plexus/util/SweeperPool.java +++ b/src/main/java/org/codehaus/plexus/util/SweeperPool.java @@ -18,13 +18,12 @@ import java.util.ArrayList; - /** - * Pools a bunch of objects . Runs a sweeper periodically to - * keep it down to size. The objects in the pool first get disposed first. + * Pools a bunch of objects . Runs a sweeper periodically to keep it down to size. The objects in the pool first get + * disposed first. * * @author Bert van Brakel - * @version $Id$ + * */ public class SweeperPool { @@ -34,46 +33,40 @@ public class SweeperPool /** Sweeps the pool periodically to trim it's size */ private transient Sweeper sweeper; - /** Absolute maxiumuim size of the pool.*/ + /** Absolute maximum size of the pool. */ private transient int maxSize; /** The size the pool gets trimmed down to */ private transient int minSize; - /** When the sweeper runs - * and the pool is over this size, then the pool is trimmed */ + /** + * When the sweeper runs and the pool is over this size, then the pool is trimmed + */ private int triggerSize; /** Holds the pooled objects */ - private ArrayList pooledObjects; + private ArrayList pooledObjects; /** Flag indicating this pool is shuting down */ private boolean shuttingDown = false; - //private Vector used; + // private Vector used; /** + * There are a number of settings to control how the pool operates. + * @param maxSize if the pool has reached this size, any objects added are immediately disposed. If the + * pool is this size when the sweeper runs, then the pool is also trimmed to minSize irrespective of + * the triggerSize. + * @param minSize - this is the size the pool is trimmed to + * @param triggerSize - this determines if the pool is trimmed when the sweeper runs. If the pool size is + * greater or equal than this value then the pool is trimmed to minSize. * - *

            There are a number of settings to control how the pool operates. - *

              - *
            • minSize - this is the size the pool is trimmed to
            • - *
            • triggerSize - this determines if the pool is trimmed when - * the sweeper runs. If the pool size is greater or equal than this value then - * the pool is trimmed to minSize. - *
            • maxSize - if the pool has reached this size, any objects added - * are immediatley disposed. If the pool is this size when the sweeper runs, then - * the pool is also trimmed to minSize irrespective of the triggerSize. - *
            • - *
            • sweepInterval - how often the sweeper runs. Is actually the - * time since the sweeper last finished a pass. 0 if the sweeper should not run. - *
            • - *
            - *

            - * + * @param sweepInterval how often the sweeper runs. Is actually the time since the sweeper last finished + * a pass. 0 if the sweeper should not run. + * @param intialCapacity the intial capacity *

            Any value less than 0 is automatically converted to 0

            */ - public SweeperPool( int maxSize, int minSize, int intialCapacity, - int sweepInterval, int triggerSize ) + public SweeperPool( int maxSize, int minSize, int intialCapacity, int sweepInterval, int triggerSize ) { super(); this.maxSize = saneConvert( maxSize ); @@ -81,7 +74,7 @@ public SweeperPool( int maxSize, int minSize, int intialCapacity, this.triggerSize = saneConvert( triggerSize ); pooledObjects = new ArrayList( intialCapacity ); - //only run a sweeper if sweep interval is positive + // only run a sweeper if sweep interval is positive if ( sweepInterval > 0 ) { sweeper = new Sweeper( this, sweepInterval ); @@ -91,18 +84,12 @@ public SweeperPool( int maxSize, int minSize, int intialCapacity, private int saneConvert( int value ) { - if ( value < 0 ) - { - return 0; - } - else - { - return value; - } + return Math.max( value, 0 ); } /** * Return the pooled object + * @return first available object from the pool */ public synchronized Object get() { @@ -115,7 +102,7 @@ public synchronized Object get() Object obj = pooledObjects.remove( 0 ); objectRetrieved( obj ); - //used.add(obj); + // used.add(obj); return obj; } } @@ -124,16 +111,13 @@ public synchronized Object get() * Add an object to the pool * * @param obj the object to pool. Can be null. - * * @return true if the object was added to the pool, false if it was disposed or null - * */ public synchronized boolean put( Object obj ) { objectAdded( obj ); - if ( ( obj != null ) && ( pooledObjects.size() < maxSize ) - && ( shuttingDown == false ) ) + if ( ( obj != null ) && ( pooledObjects.size() < maxSize ) && ( shuttingDown == false ) ) { pooledObjects.add( obj ); @@ -141,7 +125,7 @@ public synchronized boolean put( Object obj ) } else if ( obj != null ) { - //no longer need the object, so dispose it + // no longer need the object, so dispose it objectDisposed( obj ); } @@ -149,8 +133,7 @@ else if ( obj != null ) } /** - * Return the number of pooled objects. This is never - * greater than t maximuim size of the pool + * Return the number of pooled objects. This is never greater than t maximum size of the pool * * @return the number of pooled objects */ @@ -161,7 +144,6 @@ public synchronized int getSize() /** * Dispose of this pool. Stops the sweeper and disposes each object in the pool - * */ public void dispose() { @@ -176,7 +158,7 @@ public void dispose() } catch ( InterruptedException e ) { - System.err.println( "Unexpected execption occurred: " ); + System.err.println( "Unexpected exception occurred: " ); e.printStackTrace(); } } @@ -187,9 +169,9 @@ public void dispose() // and we don't want to throw a ConcurrentModificationException Object[] objects = pooledObjects.toArray(); - for ( int i = 0; i < objects.length; i++ ) + for ( Object object : objects ) { - objectDisposed( objects[i] ); + objectDisposed( object ); } pooledObjects.clear(); @@ -219,7 +201,6 @@ boolean isDisposed() /** * Trim the pool down to min size - * */ public synchronized void trim() { @@ -234,49 +215,48 @@ public synchronized void trim() } /** - * Override this to be notified of object disposal. Called - * after the object has been removed. Occurs when the pool + * Override this to be notified of object disposal. Called after the object has been removed. Occurs when the pool * is trimmed. * - * @param obj + * @param obj the Object */ public void objectDisposed( Object obj ) { } /** - * Override this to be notified of object addition. - * Called before object is to be added. + * Override this to be notified of object addition. Called before object is to be added. * - * @param obj + * @param obj the Object */ public void objectAdded( Object obj ) { } /** - * Override this to be notified of object retrieval. - * Called after object removed from the pool, but - * before returned to the client. + * Override this to be notified of object retrieval. Called after object removed from the pool, but before returned + * to the client. * - * @param obj + * @param obj the Object */ public void objectRetrieved( Object obj ) { } /** - * Periodically at sweepInterval goes through - * and tests if the pool should be trimmed. + * Periodically at sweepInterval goes through and tests if the pool should be trimmed. * * @author bert - * */ - private static class Sweeper implements Runnable + private static class Sweeper + implements Runnable { private final transient SweeperPool pool; + private transient boolean service = false; + private final transient int sweepInterval; + private transient Thread t = null; /** @@ -290,10 +270,11 @@ public Sweeper( SweeperPool pool, int sweepInterval ) } /** - * Run the seeper. + * Run the sweeper. * * @see java.lang.Runnable#run() */ + @Override public void run() { debug( "started" ); @@ -306,8 +287,8 @@ public void run() { try { - //wait specified number of seconds - //before running next sweep + // wait specified number of seconds + // before running next sweep wait( sweepInterval * 1000 ); } catch ( InterruptedException e ) diff --git a/src/main/java/org/codehaus/plexus/util/TypeFormat.java b/src/main/java/org/codehaus/plexus/util/TypeFormat.java index 8f1ef854..f950003b 100644 --- a/src/main/java/org/codehaus/plexus/util/TypeFormat.java +++ b/src/main/java/org/codehaus/plexus/util/TypeFormat.java @@ -6,358 +6,383 @@ package org.codehaus.plexus.util; /** - *

            This class provides utility methods to parse CharSequence - * into primitive types and to format primitive types into - * StringBuffer.

            - * - *

            Methods from this utility class do not create temporary objects - * and are typically faster than standard library methods (e.g {@link - * #parseDouble} is up to 15x faster than Double.parseDouble). - *

            - * - *

            For class instances, formatting is typically performed using specialized - * java.text.Format (Locale sensitive) - * and/or using conventional methods (class sensitive). For example:

            + * 

            + * This class provides utility methods to parse CharSequence into primitive types and to format primitive + * types into StringBuffer. + *

            + *

            + * Methods from this utility class do not create temporary objects and are typically faster than standard library + * methods (e.g {@link #parseDouble} is up to 15x faster than Double.parseDouble). + *

            + * For class instances, formatting is typically performed using specialized java.text.Format + * (Locale sensitive) and/or using conventional methods (class sensitive). For example: + * + *
              *     public class Foo {
              *         public static Foo valueOf(CharSequence chars) {...} // Parses.
              *         public StringBuffer appendTo(StringBuffer sb) {...} // Formats.
              *         public String toString() {
              *             return appendTo(new StringBuffer()).toString();
              *         }
            - *     }

            + * } + *
            + *

            + * This class is public domain (not copyrighted). + *

            * - *

            This class is public domain (not copyrighted).

            - * - * @author Jean-Marie Dautelle + * @author Jean-Marie Dautelle * @version 4.6, June 22, 2003 */ -public final class TypeFormat { +public final class TypeFormat +{ /** * Holds the characters used to represent numbers. */ - private final static char[] DIGITS = { - '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , - 'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 'g' , 'h' , 'i' , 'j' , - 'k' , 'l' , 'm' , 'n' , 'o' , 'p' , 'q' , 'r' , 's' , 't' , - 'u' , 'v' , 'w' , 'x' , 'y' , 'z' }; + private final static char[] DIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', + 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' }; /** * Default constructor (forbids derivation). */ - private TypeFormat() {} + private TypeFormat() + { + } /** - * Searches for a particular sequence within a character sequence - * (general purpose parsing function). + * Searches for a particular sequence within a character sequence (general purpose parsing function). * - * @param pattern the character sequence to search for. - * @param chars the character sequence being searched. - * @param fromIndex the index in chars to start the search - * from. - * @return the index in the range - * [fromIndex, chars.length()-pattern.length()] - * or -1 if the character sequence is not found. + * @param pattern the character sequence to search for. + * @param chars the character sequence being searched. + * @param fromIndex the index in chars to start the search from. + * @return the index in the range [fromIndex, chars.length()-pattern.length()] or -1 if + * the character sequence is not found. */ - public static int indexOf(CharSequence pattern, CharSequence chars, - int fromIndex) { + public static int indexOf( CharSequence pattern, CharSequence chars, int fromIndex ) + { int patternLength = pattern.length(); - fromIndex = Math.max(0, fromIndex); - if (patternLength != 0) { // At least one character to search for. - char firstChar = pattern.charAt(0); + fromIndex = Math.max( 0, fromIndex ); + if ( patternLength != 0 ) + { // At least one character to search for. + char firstChar = pattern.charAt( 0 ); int last = chars.length() - patternLength; - for (int i=fromIndex; i <= last; i++) { - if (chars.charAt(i) == firstChar) { + for ( int i = fromIndex; i <= last; i++ ) + { + if ( chars.charAt( i ) == firstChar ) + { boolean match = true; - for (int j=1; j < patternLength; j++) { - if (chars.charAt(i+j) != pattern.charAt(j)) { + for ( int j = 1; j < patternLength; j++ ) + { + if ( chars.charAt( i + j ) != pattern.charAt( j ) ) + { match = false; break; } } - if (match) { + if ( match ) + { return i; } } } return -1; - } else { - return Math.min(0, fromIndex); + } + else + { + return Math.min( 0, fromIndex ); } } /** * Parses the specified CharSequence as a boolean. * - * @param chars the character sequence to parse. + * @param chars the character sequence to parse. * @return the corresponding boolean. */ - public static boolean parseBoolean(CharSequence chars) { - return (chars.length() == 4) && - (chars.charAt(0) == 't' || chars.charAt(0) == 'T') && - (chars.charAt(1) == 'r' || chars.charAt(1) == 'R') && - (chars.charAt(2) == 'u' || chars.charAt(2) == 'U') && - (chars.charAt(3) == 'e' || chars.charAt(3) == 'E'); + public static boolean parseBoolean( CharSequence chars ) + { + return ( chars.length() == 4 ) && ( chars.charAt( 0 ) == 't' || chars.charAt( 0 ) == 'T' ) + && ( chars.charAt( 1 ) == 'r' || chars.charAt( 1 ) == 'R' ) + && ( chars.charAt( 2 ) == 'u' || chars.charAt( 2 ) == 'U' ) + && ( chars.charAt( 3 ) == 'e' || chars.charAt( 3 ) == 'E' ); } /** - * Parses the specified CharSequence as a signed decimal - * short. + * Parses the specified CharSequence as a signed decimal short. * - * @param chars the character sequence to parse. + * @param chars the character sequence to parse. * @return parseShort(chars, 10) - * @throws NumberFormatException if the specified character sequence - * does not contain a parsable short. - * @see #parseShort(CharSequence, int) + * @throws NumberFormatException if the specified character sequence does not contain a parsable short. + * @see #parseShort(CharSequence, int) */ - public static short parseShort(CharSequence chars) { - return parseShort(chars, 10); + public static short parseShort( CharSequence chars ) + { + return parseShort( chars, 10 ); } /** - * Parses the specified CharSequence as a signed - * short in the specified radix. The characters in the string - * must all be digits of the specified radix, except the first character - * which may be a plus sign '+' or a minus sign - * '-'. + * Parses the specified CharSequence as a signed short in the specified radix. The + * characters in the string must all be digits of the specified radix, except the first character which may be a + * plus sign '+' or a minus sign '-'. * - * @param chars the character sequence to parse. - * @param radix the radix to be used while parsing. + * @param chars the character sequence to parse. + * @param radix the radix to be used while parsing. * @return the corresponding short. - * @throws NumberFormatException if the specified character sequence - * does not contain a parsable short. + * @throws NumberFormatException if the specified character sequence does not contain a parsable short. */ - public static short parseShort(CharSequence chars, int radix) { - try { - boolean isNegative = (chars.charAt(0) == '-') ? true : false; + public static short parseShort( CharSequence chars, int radix ) + { + try + { + boolean isNegative = ( chars.charAt( 0 ) == '-' ) ? true : false; int result = 0; - int limit = (isNegative) ? Short.MIN_VALUE : -Short.MAX_VALUE; + int limit = ( isNegative ) ? Short.MIN_VALUE : -Short.MAX_VALUE; int multmin = limit / radix; int length = chars.length(); - int i = (isNegative || (chars.charAt(0) == '+')) ? 1 : 0; - while (true) { - int digit = Character.digit(chars.charAt(i), radix); + int i = ( isNegative || ( chars.charAt( 0 ) == '+' ) ) ? 1 : 0; + while ( true ) + { + int digit = Character.digit( chars.charAt( i ), radix ); int tmp = result * radix; - if ((digit < 0) || (result < multmin) || - (tmp < limit + digit)) { // Overflow. - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); + if ( ( digit < 0 ) || ( result < multmin ) || ( tmp < limit + digit ) ) + { // Overflow. + throw new NumberFormatException( "For input characters: \"" + chars.toString() + "\"" ); } // Accumulates negatively. result = tmp - digit; - if (++i >= length) { + if ( ++i >= length ) + { break; } } - return (short) (isNegative ? result : -result); - } catch (IndexOutOfBoundsException e) { - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); + return (short) ( isNegative ? result : -result ); + } + catch ( IndexOutOfBoundsException e ) + { + throw new NumberFormatException( "For input characters: \"" + chars.toString() + "\"" ); } } /** - * Parses the specified CharSequence as a signed decimal - * int. + * Parses the specified CharSequence as a signed decimal int. * - * @param chars the character sequence to parse. + * @param chars the character sequence to parse. * @return parseInt(chars, 10) - * @throws NumberFormatException if the specified character sequence - * does not contain a parsable int. - * @see #parseInt(CharSequence, int) + * @throws NumberFormatException if the specified character sequence does not contain a parsable int. + * @see #parseInt(CharSequence, int) */ - public static int parseInt(CharSequence chars) { - return parseInt(chars, 10); + public static int parseInt( CharSequence chars ) + { + return parseInt( chars, 10 ); } /** - * Parses the specified CharSequence as a signed - * int in the specified radix. The characters in the string - * must all be digits of the specified radix, except the first character - * which may be a plus sign '+' or a minus sign - * '-'. + * Parses the specified CharSequence as a signed int in the specified radix. The + * characters in the string must all be digits of the specified radix, except the first character which may be a + * plus sign '+' or a minus sign '-'. * - * @param chars the character sequence to parse. - * @param radix the radix to be used while parsing. + * @param chars the character sequence to parse. + * @param radix the radix to be used while parsing. * @return the corresponding int. - * @throws NumberFormatException if the specified character sequence - * does not contain a parsable int. + * @throws NumberFormatException if the specified character sequence does not contain a parsable int. */ - public static int parseInt(CharSequence chars, int radix) { - try { - boolean isNegative = (chars.charAt(0) == '-') ? true : false; + public static int parseInt( CharSequence chars, int radix ) + { + try + { + boolean isNegative = ( chars.charAt( 0 ) == '-' ) ? true : false; int result = 0; - int limit = (isNegative) ? Integer.MIN_VALUE : -Integer.MAX_VALUE; + int limit = ( isNegative ) ? Integer.MIN_VALUE : -Integer.MAX_VALUE; int multmin = limit / radix; int length = chars.length(); - int i = (isNegative || (chars.charAt(0) == '+')) ? 1 : 0; - while (true) { - int digit = Character.digit(chars.charAt(i), radix); + int i = ( isNegative || ( chars.charAt( 0 ) == '+' ) ) ? 1 : 0; + while ( true ) + { + int digit = Character.digit( chars.charAt( i ), radix ); int tmp = result * radix; - if ((digit < 0) || (result < multmin) || - (tmp < limit + digit)) { // Overflow. - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); + if ( ( digit < 0 ) || ( result < multmin ) || ( tmp < limit + digit ) ) + { // Overflow. + throw new NumberFormatException( "For input characters: \"" + chars.toString() + "\"" ); } // Accumulates negatively to avoid surprises near MAX_VALUE result = tmp - digit; - if (++i >= length) { + if ( ++i >= length ) + { break; } } return isNegative ? result : -result; - } catch (IndexOutOfBoundsException e) { - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); + } + catch ( IndexOutOfBoundsException e ) + { + throw new NumberFormatException( "For input characters: \"" + chars.toString() + "\"" ); } } /** - * Parses the specified CharSequence as a signed decimal - * long. + * Parses the specified CharSequence as a signed decimal long. * - * @param chars the character sequence to parse. + * @param chars the character sequence to parse. * @return parseLong(chars, 10) - * @throws NumberFormatException if the specified character sequence - * does not contain a parsable long. - * @see #parseLong(CharSequence, int) + * @throws NumberFormatException if the specified character sequence does not contain a parsable long. + * @see #parseLong(CharSequence, int) */ - public static long parseLong(CharSequence chars) { - return parseLong(chars, 10); + public static long parseLong( CharSequence chars ) + { + return parseLong( chars, 10 ); } /** - * Parses the specified CharSequence as a signed - * long in the specified radix. The characters in the string - * must all be digits of the specified radix, except the first character - * which may be a plus sign '+' or a minus sign - * '-'. + * Parses the specified CharSequence as a signed long in the specified radix. The + * characters in the string must all be digits of the specified radix, except the first character which may be a + * plus sign '+' or a minus sign '-'. * - * @param chars the character sequence to parse. - * @param radix the radix to be used while parsing. + * @param chars the character sequence to parse. + * @param radix the radix to be used while parsing. * @return the corresponding long. - * @throws NumberFormatException if the specified character sequence - * does not contain a parsable long. + * @throws NumberFormatException if the specified character sequence does not contain a parsable long. */ - public static long parseLong(CharSequence chars, int radix) { - try { - boolean isNegative = (chars.charAt(0) == '-') ? true : false; + public static long parseLong( CharSequence chars, int radix ) + { + try + { + boolean isNegative = ( chars.charAt( 0 ) == '-' ) ? true : false; long result = 0; - long limit = (isNegative) ? Long.MIN_VALUE : -Long.MAX_VALUE; + long limit = ( isNegative ) ? Long.MIN_VALUE : -Long.MAX_VALUE; long multmin = limit / radix; int length = chars.length(); - int i = (isNegative || (chars.charAt(0) == '+')) ? 1 : 0; - while (true) { - int digit = Character.digit(chars.charAt(i), radix); + int i = ( isNegative || ( chars.charAt( 0 ) == '+' ) ) ? 1 : 0; + while ( true ) + { + int digit = Character.digit( chars.charAt( i ), radix ); long tmp = result * radix; - if ((digit < 0) || (result < multmin) || - (tmp < limit + digit)) { // Overflow. - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); + if ( ( digit < 0 ) || ( result < multmin ) || ( tmp < limit + digit ) ) + { // Overflow. + throw new NumberFormatException( "For input characters: \"" + chars.toString() + "\"" ); } // Accumulates negatively to avoid surprises near MAX_VALUE result = tmp - digit; - if (++i >= length) { + if ( ++i >= length ) + { break; } } return isNegative ? result : -result; - } catch (IndexOutOfBoundsException e) { - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); + } + catch ( IndexOutOfBoundsException e ) + { + throw new NumberFormatException( "For input characters: \"" + chars.toString() + "\"" ); } } /** * Parses this CharSequence as a float. * - * @param chars the character sequence to parse. + * @param chars the character sequence to parse. * @return the float number represented by the specified character sequence. - * @throws NumberFormatException if the character sequence does not contain - * a parsable float. + * @throws NumberFormatException if the character sequence does not contain a parsable float. */ - public static float parseFloat(CharSequence chars) { - double d = parseDouble(chars); - if ( (d >= Float.MIN_VALUE) && (d <= Float.MAX_VALUE)) { + public static float parseFloat( CharSequence chars ) + { + double d = parseDouble( chars ); + if ( ( d >= Float.MIN_VALUE ) && ( d <= Float.MAX_VALUE ) ) + { return (float) d; - } else { - throw new NumberFormatException( - "Float overflow for input characters: \"" + - chars.toString() + "\""); + } + else + { + throw new NumberFormatException( "Float overflow for input characters: \"" + chars.toString() + "\"" ); } } /** * Parses this CharSequence as a double. * - * @param chars the character sequence to parse. + * @param chars the character sequence to parse. * @return the double number represented by this character sequence. - * @throws NumberFormatException if the character sequence does not contain - * a parsable double. + * @throws NumberFormatException if the character sequence does not contain a parsable double. */ - public static double parseDouble(CharSequence chars) - throws NumberFormatException { - try { + public static double parseDouble( CharSequence chars ) + throws NumberFormatException + { + try + { int length = chars.length(); double result = 0.0; int exp = 0; - boolean isNegative = (chars.charAt(0) == '-') ? true : false; - int i = (isNegative || (chars.charAt(0) == '+')) ? 1 : 0; + boolean isNegative = ( chars.charAt( 0 ) == '-' ) ? true : false; + int i = ( isNegative || ( chars.charAt( 0 ) == '+' ) ) ? 1 : 0; // Checks special cases NaN or Infinity. - if ((chars.charAt(i) == 'N') || (chars.charAt(i) == 'I')) { - if (chars.toString().equals("NaN")) { + if ( ( chars.charAt( i ) == 'N' ) || ( chars.charAt( i ) == 'I' ) ) + { + if ( chars.toString().equals( "NaN" ) ) + { return Double.NaN; - } else if (chars.subSequence(i, length).toString(). - equals("Infinity")) { - return isNegative ? Double.NEGATIVE_INFINITY : - Double.POSITIVE_INFINITY; + } + else if ( chars.subSequence( i, length ).toString().equals( "Infinity" ) ) + { + return isNegative ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY; } } // Reads decimal number. boolean fraction = false; - while (true) { - char c = chars.charAt(i); - if ( (c == '.') && (!fraction)) { + while ( true ) + { + char c = chars.charAt( i ); + if ( ( c == '.' ) && ( !fraction ) ) + { fraction = true; - } else if ((c == 'e') || (c == 'E')) { + } + else if ( ( c == 'e' ) || ( c == 'E' ) ) + { break; - } else if ((c >= '0') && (c <= '9')) { - result = result * 10 + (c - '0'); - if (fraction) { + } + else if ( ( c >= '0' ) && ( c <= '9' ) ) + { + result = result * 10 + ( c - '0' ); + if ( fraction ) + { exp--; } - } else { - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); } - if (++i >= length) { + else + { + throw new NumberFormatException( "For input characters: \"" + chars.toString() + "\"" ); + } + if ( ++i >= length ) + { break; } } - result = isNegative ? - result : result; + result = isNegative ? -result : result; // Reads exponent (if any). - if (i < length) { + if ( i < length ) + { i++; - boolean negE = (chars.charAt(i) == '-') ? true : false; - i = (negE || (chars.charAt(i) == '+')) ? i+1 : i; + boolean negE = ( chars.charAt( i ) == '-' ) ? true : false; + i = ( negE || ( chars.charAt( i ) == '+' ) ) ? i + 1 : i; int valE = 0; - while (true) { - char c = chars.charAt(i); - if ((c >= '0') && (c <= '9')) { - valE = valE * 10 + (c - '0'); - if (valE > 10000000) { // Hard-limit to avoid overflow. + while ( true ) + { + char c = chars.charAt( i ); + if ( ( c >= '0' ) && ( c <= '9' ) ) + { + valE = valE * 10 + ( c - '0' ); + if ( valE > 10000000 ) + { // Hard-limit to avoid overflow. valE = 10000000; } - } else { - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + - "\""); } - if (++i >= length) { + else + { + throw new NumberFormatException( "For input characters: \"" + chars.toString() + "\"" ); + } + if ( ++i >= length ) + { break; } } @@ -365,502 +390,579 @@ public static double parseDouble(CharSequence chars) } // Returns product decimal number with exponent. - return multE(result, exp); + return multE( result, exp ); - } catch (IndexOutOfBoundsException e) { - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); + } + catch ( IndexOutOfBoundsException e ) + { + throw new NumberFormatException( "For input characters: \"" + chars.toString() + "\"" ); } } + /** - * Formats the specified boolean and appends the resulting - * text to the StringBuffer argument. + * Formats the specified boolean and appends the resulting text to the StringBuffer + * argument. * - * @param b a boolean. - * @param sb the StrinBuffer to append. + * @param b a boolean. + * @param sb the StringBuffer to append. * @return the specified StringBuffer object. - * @see #parseBoolean + * @see #parseBoolean */ - public static StringBuffer format(boolean b, StringBuffer sb) { - return b ? sb.append("true") : sb.append("false"); + public static StringBuffer format( boolean b, StringBuffer sb ) + { + return b ? sb.append( "true" ) : sb.append( "false" ); } /** - * Formats the specified short and appends the resulting - * text (decimal representation) to the StringBuffer argument. + * Formats the specified short and appends the resulting text (decimal representation) to the + * StringBuffer argument. + *

            + * Note: This method is preferred to StringBuffer.append(short) + * as it does not create temporary String objects (several times faster for small + * numbers). + *

            * - *

            Note: This method is preferred to StringBuffer.append(short) - * as it does not create temporary String - * objects (several times faster for small numbers).

            - * - * @param s the short number. - * @param sb the StrinBuffer to append. + * @param s the short number. + * @param sb the StringBuffer to append. * @return the specified StringBuffer object. - * @see #parseShort + * @see #parseShort */ - public static StringBuffer format(short s, StringBuffer sb) { - return format((int)s, sb); // Forwards to int formatting (fast). + public static StringBuffer format( short s, StringBuffer sb ) + { + return format( (int) s, sb ); // Forwards to int formatting (fast). } /** - * Formats the specified short in the specified radix and - * appends the resulting text to the StringBuffer argument. + * Formats the specified short in the specified radix and appends the resulting text to the + * StringBuffer argument. * - * @param s the short number. - * @param radix the radix. - * @param sb the StrinBuffer to append. + * @param s the short number. + * @param radix the radix. + * @param sb the StringBuffer to append. * @return the specified StringBuffer object. - * @see #parseShort(CharSequence, int) - * throws IllegalArgumentException if radix is not in [2 .. 36] range. + * @see #parseShort(CharSequence, int) throws IllegalArgumentException if radix is not in [2 .. 36] range. */ - public static StringBuffer format(short s, int radix, StringBuffer sb) { - return format((int)s, radix, sb); // Forwards to int formatting (fast). + public static StringBuffer format( short s, int radix, StringBuffer sb ) + { + return format( (int) s, radix, sb ); // Forwards to int formatting (fast). } /** - * Formats the specified int and appends the resulting - * text (decimal representation) to the StringBuffer argument. - * - *

            Note: This method is preferred to StringBuffer.append(int) - * as it does not create temporary String - * objects (several times faster for small numbers).

            + * Formats the specified int and appends the resulting text (decimal representation) to the + * StringBuffer argument. + *

            + * Note: This method is preferred to StringBuffer.append(int) + * as it does not create temporary String objects (several times faster for small + * numbers). + *

            * - * @param i the int number. - * @param sb the StrinBuffer to append. + * @param i the int number. + * @param sb the StringBuffer to append. * @return the specified StringBuffer object. - * @see #parseInt + * @see #parseInt */ - public static StringBuffer format(int i, StringBuffer sb) { - if (i <= 0) { - if (i == Integer.MIN_VALUE) { // Negation would overflow. - return sb.append("-2147483648"); // 11 char max. - } else if (i == 0) { - return sb.append('0'); + public static StringBuffer format( int i, StringBuffer sb ) + { + if ( i <= 0 ) + { + if ( i == Integer.MIN_VALUE ) + { // Negation would overflow. + return sb.append( "-2147483648" ); // 11 char max. + } + else if ( i == 0 ) + { + return sb.append( '0' ); } i = -i; - sb.append('-'); + sb.append( '-' ); } int j = 1; - for (; (j < 10) && (i >= INT_POW_10[j]); j++) {} + for ( ; ( j < 10 ) && ( i >= INT_POW_10[j] ); j++ ) + { + } // POW_10[j] > i >= POW_10[j-1] - for (j--; j >= 0; j--) { + for ( j--; j >= 0; j-- ) + { int pow10 = INT_POW_10[j]; int digit = i / pow10; i -= digit * pow10; - sb.append(DIGITS[digit]); + sb.append( DIGITS[digit] ); } return sb; } + private static final int[] INT_POW_10 = new int[10]; - static { + static + { int pow = 1; - for (int i=0; i < 10; i++) { + for ( int i = 0; i < 10; i++ ) + { INT_POW_10[i] = pow; pow *= 10; } } /** - * Formats the specified int in the specified radix and appends - * the resulting text to the StringBuffer argument. + * Formats the specified int in the specified radix and appends the resulting text to the + * StringBuffer argument. * - * @param i the int number. - * @param radix the radix. - * @param sb the StrinBuffer to append. + * @param i the int number. + * @param radix the radix. + * @param sb the StringBuffer to append. * @return the specified StringBuffer object. - * @see #parseInt(CharSequence, int) - * throws IllegalArgumentException if radix is not in [2 .. 36] range. + * @see #parseInt(CharSequence, int) throws IllegalArgumentException if radix is not in [2 .. 36] range. */ - public static StringBuffer format(int i, int radix, StringBuffer sb) { - if (radix == 10) { - return format(i, sb); // Faster version. - } else if (radix < 2 || radix > 36) { - throw new IllegalArgumentException("radix: " + radix); - } - if (i < 0) { - sb.append('-'); - } else { + public static StringBuffer format( int i, int radix, StringBuffer sb ) + { + if ( radix == 10 ) + { + return format( i, sb ); // Faster version. + } + else if ( radix < 2 || radix > 36 ) + { + throw new IllegalArgumentException( "radix: " + radix ); + } + if ( i < 0 ) + { + sb.append( '-' ); + } + else + { i = -i; } - format2(i, radix, sb); + format2( i, radix, sb ); return sb; } - private static void format2(int i, int radix, StringBuffer sb) { - if (i <= -radix) { - format2(i / radix, radix, sb); - sb.append(DIGITS[-(i % radix)]); - } else { - sb.append(DIGITS[-i]); + + private static void format2( int i, int radix, StringBuffer sb ) + { + if ( i <= -radix ) + { + format2( i / radix, radix, sb ); + sb.append( DIGITS[-( i % radix )] ); + } + else + { + sb.append( DIGITS[-i] ); } } /** - * Formats the specified long and appends the resulting - * text (decimal representation) to the StringBuffer argument. - * - *

            Note: This method is preferred to StringBuffer.append(long) - * as it does not create temporary String - * objects (several times faster for small numbers).

            + * Formats the specified long and appends the resulting text (decimal representation) to the + * StringBuffer argument. + *

            + * Note: This method is preferred to StringBuffer.append(long) + * as it does not create temporary String objects (several times faster for small + * numbers). + *

            * - * @param l the long number. - * @param sb the StrinBuffer to append. + * @param l the long number. + * @param sb the StringBuffer to append. * @return the specified StringBuffer object. - * @see #parseLong + * @see #parseLong */ - public static StringBuffer format(long l, StringBuffer sb) { - if (l <= 0) { - if (l == Long.MIN_VALUE) { // Negation would overflow. - return sb.append("-9223372036854775808"); // 20 characters max. - } else if (l == 0) { - return sb.append('0'); + public static StringBuffer format( long l, StringBuffer sb ) + { + if ( l <= 0 ) + { + if ( l == Long.MIN_VALUE ) + { // Negation would overflow. + return sb.append( "-9223372036854775808" ); // 20 characters max. + } + else if ( l == 0 ) + { + return sb.append( '0' ); } l = -l; - sb.append('-'); + sb.append( '-' ); } int j = 1; - for (; (j < 19) && (l >= LONG_POW_10[j]); j++) {} + for ( ; ( j < 19 ) && ( l >= LONG_POW_10[j] ); j++ ) + { + } // POW_10[j] > l >= POW_10[j-1] - for (j--; j >= 0; j--) { + for ( j--; j >= 0; j-- ) + { long pow10 = LONG_POW_10[j]; - int digit = (int) (l / pow10); + int digit = (int) ( l / pow10 ); l -= digit * pow10; - sb.append(DIGITS[digit]); + sb.append( DIGITS[digit] ); } return sb; } + private static final long[] LONG_POW_10 = new long[19]; - static { + static + { long pow = 1; - for (int i=0; i < 19; i++) { + for ( int i = 0; i < 19; i++ ) + { LONG_POW_10[i] = pow; pow *= 10; } } /** - * Formats the specified long in the specified radix and - * appends the resulting text to the StringBuffer argument. + * Formats the specified long in the specified radix and appends the resulting text to the + * StringBuffer argument. * - * @param l the long number. - * @param radix the radix. - * @param sb the StrinBuffer to append. + * @param l the long number. + * @param radix the radix. + * @param sb the StringBuffer to append. * @return the specified StringBuffer object. - * @see #parseLong(CharSequence, int) - * throws IllegalArgumentException if radix is not in [2 .. 36] range. + * @see #parseLong(CharSequence, int) throws IllegalArgumentException if radix is not in [2 .. 36] range. */ - public static StringBuffer format(long l, int radix, StringBuffer sb) { - if (radix == 10) { - return format(l, sb); // Faster version. - } else if (radix < 2 || radix > 36) { - throw new IllegalArgumentException("radix: " + radix); - } - if (l < 0) { - sb.append('-'); - } else { + public static StringBuffer format( long l, int radix, StringBuffer sb ) + { + if ( radix == 10 ) + { + return format( l, sb ); // Faster version. + } + else if ( radix < 2 || radix > 36 ) + { + throw new IllegalArgumentException( "radix: " + radix ); + } + if ( l < 0 ) + { + sb.append( '-' ); + } + else + { l = -l; } - format2(l, radix, sb); + format2( l, radix, sb ); return sb; } - private static void format2(long l, int radix, StringBuffer sb) { - if (l <= -radix) { - format2(l / radix, radix, sb); - sb.append(DIGITS[(int)-(l % radix)]); - } else { - sb.append(DIGITS[(int)-l]); + + private static void format2( long l, int radix, StringBuffer sb ) + { + if ( l <= -radix ) + { + format2( l / radix, radix, sb ); + sb.append( DIGITS[(int) -( l % radix )] ); + } + else + { + sb.append( DIGITS[(int) -l] ); } } /** - * Formats the specified float and appends the resulting - * text to the StringBuffer argument. + * Formats the specified float and appends the resulting text to the StringBuffer + * argument. * - * @param f the float number. - * @param sb the StrinBuffer to append. + * @param f the float number. + * @param sb the StringBuffer to append. * @return format(f, 0.0f, sb) - * @see #format(float, float, StringBuffer) + * @see #format(float, float, StringBuffer) */ - public static StringBuffer format(float f, StringBuffer sb) { - return format(f, 0.0f, sb); + public static StringBuffer format( float f, StringBuffer sb ) + { + return format( f, 0.0f, sb ); } /** - * Formats the specified float and appends the resulting text - * to the StringBuffer argument; the number of significative - * digits is deduced from the specifed precision. All digits at least as + * Formats the specified float and appends the resulting text to the StringBuffer + * argument; the number of significative digits is deduced from the specified precision. All digits at least as * significant as the specified precision are represented. For example: *
              *
            • format(5.6f, 0.01f, sb) appends "5.60"
            • *
            • format(5.6f, 0.1f, sb) appends "5.6"
            • *
            • format(5.6f, 1f, sb) appends "6"
            • *
            - * If the precision is 0.0f, the precision is assumed to be - * the intrinsic float precision (64 bits IEEE 754 format); - * no formatting is performed, all significant digits are displayed and - * trailing zeros are removed. + * If the precision is 0.0f, the precision is assumed to be the intrinsic float precision + * (64 bits IEEE 754 format); no formatting is performed, all significant digits are displayed and trailing zeros + * are removed. * - * @param f the float number. - * @param precision the maximum weight of the last digit represented. - * @param sb the StrinBuffer to append. + * @param f the float number. + * @param precision the maximum weight of the last digit represented. + * @param sb the StringBuffer to append. * @return the specified StringBuffer object. - * @throws IllegalArgumentException if the specified precision is negative - * or would result in too many digits (19+). + * @throws IllegalArgumentException if the specified precision is negative or would result in too many digits (19+). */ - public static StringBuffer format(float f, float precision, - StringBuffer sb) { + public static StringBuffer format( float f, float precision, StringBuffer sb ) + { // Adjusts precision. boolean precisionOnLastDigit; - if (precision > 0.0f) { + if ( precision > 0.0f ) + { precisionOnLastDigit = true; - } else if (precision == 0.0f) { - if (f != 0.0f) { + } + else if ( precision == 0.0f ) + { + if ( f != 0.0f ) + { precisionOnLastDigit = false; - precision = Math.max(Math.abs(f * FLOAT_RELATIVE_ERROR), - Float.MIN_VALUE); - } else { - return sb.append("0.0"); // Exact zero. + precision = Math.max( Math.abs( f * FLOAT_RELATIVE_ERROR ), Float.MIN_VALUE ); + } + else + { + return sb.append( "0.0" ); // Exact zero. } - } else { - throw new IllegalArgumentException( - "precision: Negative values not allowed"); } - return format(f, precision, precisionOnLastDigit, sb); + else + { + throw new IllegalArgumentException( "precision: Negative values not allowed" ); + } + return format( f, precision, precisionOnLastDigit, sb ); } /** - * Formats the specified double and appends the resulting - * text to the StringBuffer argument. - * - *

            Note : This method is preferred to StringBuffer.append(double) - * or even String.valueOf(double) as it - * does not create temporary String or - * FloatingDecimal objects (several times faster, - * e.g. 15x faster for Double.MAX_VALUE).

            + * Formats the specified double and appends the resulting text to the StringBuffer + * argument. + *

            + * Note : This method is preferred to StringBuffer.append(double) + * or even String.valueOf(double) as it does not create temporary + * String or + * FloatingDecimal objects (several times faster, e.g. 15x faster for + * Double.MAX_VALUE). + *

            * - * @param d the double number. - * @param sb the StrinBuffer to append. + * @param d the double number. + * @param sb the StringBuffer to append. * @return format(d, 0.0, sb) - * @see #format(double, double, StringBuffer) + * @see #format(double, double, StringBuffer) */ - public static StringBuffer format(double d, StringBuffer sb) { - return format(d, 0.0, sb); + public static StringBuffer format( double d, StringBuffer sb ) + { + return format( d, 0.0, sb ); } /** - * Formats the specified double and appends the resulting text - * to the StringBuffer argument; the number of significand - * digits is specified as integer argument. + * Formats the specified double and appends the resulting text to the StringBuffer + * argument; the number of significand digits is specified as integer argument. * - * @param d the double number. - * @param digits the number of significand digits (excludes exponent). - * @param sb the StrinBuffer to append. + * @param d the double number. + * @param digits the number of significand digits (excludes exponent). + * @param sb the StringBuffer to append. * @return the specified StringBuffer object. - * @throws IllegalArgumentException if the number of digits is not in - * range [1..19]. + * @throws IllegalArgumentException if the number of digits is not in range [1..19]. */ - public static StringBuffer format(double d, int digits, - StringBuffer sb) { - if ((digits >= 1) && (digits <= 19)) { - double precision = Math.abs(d / DOUBLE_POW_10[digits-1]); - return format(d, precision, sb); - } else { - throw new java.lang.IllegalArgumentException( - "digits: " + digits + " is not in range [1 .. 19]"); + public static StringBuffer format( double d, int digits, StringBuffer sb ) + { + if ( ( digits >= 1 ) && ( digits <= 19 ) ) + { + double precision = Math.abs( d / DOUBLE_POW_10[digits - 1] ); + return format( d, precision, sb ); + } + else + { + throw new java.lang.IllegalArgumentException( "digits: " + digits + " is not in range [1 .. 19]" ); } } /** - * Formats the specified double and appends the resulting text - * to the StringBuffer argument; the number of significative - * digits is deduced from the specifed precision. All digits at least as + * Formats the specified double and appends the resulting text to the StringBuffer + * argument; the number of significative digits is deduced from the specified precision. All digits at least as * significant as the specified precision are represented. For example: *
              *
            • format(5.6, 0.01, sb) appends "5.60"
            • *
            • format(5.6, 0.1, sb) appends "5.6"
            • *
            • format(5.6, 1, sb) appends "6"
            • *
            - * If the precision is 0.0, the precision is assumed to be - * the intrinsic double precision (64 bits IEEE 754 format); - * no formatting is performed, all significant digits are displayed and - * trailing zeros are removed. + * If the precision is 0.0, the precision is assumed to be the intrinsic double precision + * (64 bits IEEE 754 format); no formatting is performed, all significant digits are displayed and trailing zeros + * are removed. * - * @param d the double number. - * @param precision the maximum weight of the last digit represented. - * @param sb the StrinBuffer to append. + * @param d the double number. + * @param precision the maximum weight of the last digit represented. + * @param sb the StringBuffer to append. * @return the specified StringBuffer object. - * @throws IllegalArgumentException if the specified precision is negative - * or would result in too many digits (19+). + * @throws IllegalArgumentException if the specified precision is negative or would result in too many digits (19+). */ - public static StringBuffer format(double d, double precision, - StringBuffer sb) { + public static StringBuffer format( double d, double precision, StringBuffer sb ) + { // Adjusts precision. boolean precisionOnLastDigit = false; - if (precision > 0.0) { + if ( precision > 0.0 ) + { precisionOnLastDigit = true; - } else if (precision == 0.0) { - if (d != 0.0) { - precision = Math.max(Math.abs(d * DOUBLE_RELATIVE_ERROR), - Double.MIN_VALUE); - } else { - return sb.append("0.0"); // Exact zero. + } + else if ( precision == 0.0 ) + { + if ( d != 0.0 ) + { + precision = Math.max( Math.abs( d * DOUBLE_RELATIVE_ERROR ), Double.MIN_VALUE ); + } + else + { + return sb.append( "0.0" ); // Exact zero. } - } else if (precision < 0.0) { // Not NaN - throw new IllegalArgumentException( - "precision: Negative values not allowed"); } - return format(d, precision, precisionOnLastDigit, sb); + else if ( precision < 0.0 ) + { // Not NaN + throw new IllegalArgumentException( "precision: Negative values not allowed" ); + } + return format( d, precision, precisionOnLastDigit, sb ); } /** - * Formats the specified double and appends the resulting text - * to the StringBuffer argument; the number of significative - * digits is deduced from the specifed precision. + * Formats the specified double and appends the resulting text to the StringBuffer + * argument; the number of significative digits is deduced from the specified precision. * - * @param d the double number. - * @param precision the maximum weight of the last digit represented. - * @param precisionOnLastDigit indicates if the number of digits is - * deduced from the specified precision. - * @param sb the StrinBuffer to append. + * @param d the double number. + * @param precision the maximum weight of the last digit represented. + * @param precisionOnLastDigit indicates if the number of digits is deduced from the specified precision. + * @param sb the StringBuffer to append. * @return the specified StringBuffer object. */ - private static StringBuffer format(double d, double precision, - boolean precisionOnLastDigit, - StringBuffer sb) { + private static StringBuffer format( double d, double precision, boolean precisionOnLastDigit, StringBuffer sb ) + { // Special cases. - if (Double.isNaN(d)) { - return sb.append("NaN"); - } else if (Double.isInfinite(d)) { - return (d >= 0) ? sb.append("Infinity") : sb.append("-Infinity"); + if ( Double.isNaN( d ) ) + { + return sb.append( "NaN" ); + } + else if ( Double.isInfinite( d ) ) + { + return ( d >= 0 ) ? sb.append( "Infinity" ) : sb.append( "-Infinity" ); } - if (d < 0) { + if ( d < 0 ) + { d = -d; - sb.append('-'); + sb.append( '-' ); } // Formats decimal part. - int rank = (int) Math.floor(Math.log(precision) / LOG_10); - double digitValue = multE(d, -rank); - if (digitValue >= Long.MAX_VALUE) { - throw new IllegalArgumentException( - "Specified precision would result in too many digits"); + int rank = (int) Math.floor( Math.log( precision ) / LOG_10 ); + double digitValue = multE( d, -rank ); + if ( digitValue >= Long.MAX_VALUE ) + { + throw new IllegalArgumentException( "Specified precision would result in too many digits" ); } int digitStart = sb.length(); - format(Math.round(digitValue), sb); + format( Math.round( digitValue ), sb ); int digitLength = sb.length() - digitStart; int dotPos = digitLength + rank; boolean useScientificNotation = false; // Inserts dot ('.') - if ((dotPos <= -LEADING_ZEROS.length) || (dotPos > digitLength)) { + if ( ( dotPos <= -LEADING_ZEROS.length ) || ( dotPos > digitLength ) ) + { // Scientific notation has to be used ("x.xxxEyy"). - sb.insert(digitStart + 1, '.'); + sb.insert( digitStart + 1, '.' ); useScientificNotation = true; - } else if (dotPos > 0) { - // Dot within the string ("xxxx.xxxxx"). - sb.insert(digitStart + dotPos, '.'); - } else { + } + else if ( dotPos > 0 ) + { + // Dot within the string ("xxxx.xxxxx"). + sb.insert( digitStart + dotPos, '.' ); + } + else + { // Leading zeros ("0.xxxxx"). - sb.insert(digitStart, LEADING_ZEROS[-dotPos]); + sb.insert( digitStart, LEADING_ZEROS[-dotPos] ); } // Removes trailing zeros. - if (!precisionOnLastDigit) { + if ( !precisionOnLastDigit ) + { int newLength = sb.length(); - do { + do + { newLength--; - } while (sb.charAt(newLength) == '0'); - sb.setLength(newLength+1); + } + while ( sb.charAt( newLength ) == '0' ); + sb.setLength( newLength + 1 ); } // Avoids trailing '.' - if (sb.charAt(sb.length()-1) == '.') { - if (precisionOnLastDigit) { - sb.setLength(sb.length()-1); // Prefers "xxx" to "xxx." - } else { - sb.append('0'); // Prefer "xxx.0" to "xxx." + if ( sb.charAt( sb.length() - 1 ) == '.' ) + { + if ( precisionOnLastDigit ) + { + sb.setLength( sb.length() - 1 ); // Prefers "xxx" to "xxx." + } + else + { + sb.append( '0' ); // Prefer "xxx.0" to "xxx." } } // Writes exponent. - if (useScientificNotation) { - sb.append('E'); - format(dotPos - 1, sb); + if ( useScientificNotation ) + { + sb.append( 'E' ); + format( dotPos - 1, sb ); } return sb; } - private static final double LOG_10 = Math.log(10); - private static final float FLOAT_RELATIVE_ERROR = (float) Math.pow(2, -24); - private static final double DOUBLE_RELATIVE_ERROR = Math.pow(2, -53); - private static String[] LEADING_ZEROS = {"0.", "0.0", "0.00"}; + private static final double LOG_10 = Math.log( 10 ); + + private static final float FLOAT_RELATIVE_ERROR = (float) Math.pow( 2, -24 ); + + private static final double DOUBLE_RELATIVE_ERROR = Math.pow( 2, -53 ); + + private static String[] LEADING_ZEROS = { "0.", "0.0", "0.00" }; /** - * Returns the product of the specified value with 10 raised - * at the specified power exponent. + * Returns the product of the specified value with 10 raised at the specified power exponent. * - * @param value the value. - * @param E the exponent. + * @param value the value. + * @param E the exponent. * @return value * 10^E */ - private static final double multE(double value, int E) { - if (E >= 0) { - if (E <= 308) { + private static final double multE( double value, int E ) + { + if ( E >= 0 ) + { + if ( E <= 308 ) + { // Max: 1.7976931348623157E+308 - return value * DOUBLE_POW_10[E]; - } else { + return value * DOUBLE_POW_10[E]; + } + else + { value *= 1E21; // Exact multiplicand. - E = Math.min(308, E-21); + E = Math.min( 308, E - 21 ); return value * DOUBLE_POW_10[E]; } - } else { - if (E >= -308) { + } + else + { + if ( E >= -308 ) + { return value / DOUBLE_POW_10[-E]; - } else { + } + else + { // Min: 4.9E-324 value /= 1E21; // Exact divisor. - E = Math.max(-308, E+21); + E = Math.max( -308, E + 21 ); return value / DOUBLE_POW_10[-E]; } } } // Note: Approximation for exponents > 21. This may introduce round-off - // errors (e.g. 1E23 represented as "9.999999999999999E22"). + // errors (e.g. 1E23 represented as "9.999999999999999E22"). private static final double[] DOUBLE_POW_10 = new double[] { - 1E000, 1E001, 1E002, 1E003, 1E004, 1E005, 1E006, 1E007, 1E008, 1E009, - 1E010, 1E011, 1E012, 1E013, 1E014, 1E015, 1E016, 1E017, 1E018, 1E019, - 1E020, 1E021, 1E022, 1E023, 1E024, 1E025, 1E026, 1E027, 1E028, 1E029, - 1E030, 1E031, 1E032, 1E033, 1E034, 1E035, 1E036, 1E037, 1E038, 1E039, - 1E040, 1E041, 1E042, 1E043, 1E044, 1E045, 1E046, 1E047, 1E048, 1E049, - 1E050, 1E051, 1E052, 1E053, 1E054, 1E055, 1E056, 1E057, 1E058, 1E059, - 1E060, 1E061, 1E062, 1E063, 1E064, 1E065, 1E066, 1E067, 1E068, 1E069, - 1E070, 1E071, 1E072, 1E073, 1E074, 1E075, 1E076, 1E077, 1E078, 1E079, - 1E080, 1E081, 1E082, 1E083, 1E084, 1E085, 1E086, 1E087, 1E088, 1E089, - 1E090, 1E091, 1E092, 1E093, 1E094, 1E095, 1E096, 1E097, 1E098, 1E099, - - 1E100, 1E101, 1E102, 1E103, 1E104, 1E105, 1E106, 1E107, 1E108, 1E109, - 1E110, 1E111, 1E112, 1E113, 1E114, 1E115, 1E116, 1E117, 1E118, 1E119, - 1E120, 1E121, 1E122, 1E123, 1E124, 1E125, 1E126, 1E127, 1E128, 1E129, - 1E130, 1E131, 1E132, 1E133, 1E134, 1E135, 1E136, 1E137, 1E138, 1E139, - 1E140, 1E141, 1E142, 1E143, 1E144, 1E145, 1E146, 1E147, 1E148, 1E149, - 1E150, 1E151, 1E152, 1E153, 1E154, 1E155, 1E156, 1E157, 1E158, 1E159, - 1E160, 1E161, 1E162, 1E163, 1E164, 1E165, 1E166, 1E167, 1E168, 1E169, - 1E170, 1E171, 1E172, 1E173, 1E174, 1E175, 1E176, 1E177, 1E178, 1E179, - 1E180, 1E181, 1E182, 1E183, 1E184, 1E185, 1E186, 1E187, 1E188, 1E189, - 1E190, 1E191, 1E192, 1E193, 1E194, 1E195, 1E196, 1E197, 1E198, 1E199, - - 1E200, 1E201, 1E202, 1E203, 1E204, 1E205, 1E206, 1E207, 1E208, 1E209, - 1E210, 1E211, 1E212, 1E213, 1E214, 1E215, 1E216, 1E217, 1E218, 1E219, - 1E220, 1E221, 1E222, 1E223, 1E224, 1E225, 1E226, 1E227, 1E228, 1E229, - 1E230, 1E231, 1E232, 1E233, 1E234, 1E235, 1E236, 1E237, 1E238, 1E239, - 1E240, 1E241, 1E242, 1E243, 1E244, 1E245, 1E246, 1E247, 1E248, 1E249, - 1E250, 1E251, 1E252, 1E253, 1E254, 1E255, 1E256, 1E257, 1E258, 1E259, - 1E260, 1E261, 1E262, 1E263, 1E264, 1E265, 1E266, 1E267, 1E268, 1E269, - 1E270, 1E271, 1E272, 1E273, 1E274, 1E275, 1E276, 1E277, 1E278, 1E279, - 1E280, 1E281, 1E282, 1E283, 1E284, 1E285, 1E286, 1E287, 1E288, 1E289, - 1E290, 1E291, 1E292, 1E293, 1E294, 1E295, 1E296, 1E297, 1E298, 1E299, - - 1E300, 1E301, 1E302, 1E303, 1E304, 1E305, 1E306, 1E307, 1E308 }; + 1E000, 1E001, 1E002, 1E003, 1E004, 1E005, 1E006, 1E007, 1E008, 1E009, 1E010, 1E011, 1E012, 1E013, 1E014, 1E015, + 1E016, 1E017, 1E018, 1E019, 1E020, 1E021, 1E022, 1E023, 1E024, 1E025, 1E026, 1E027, 1E028, 1E029, 1E030, 1E031, + 1E032, 1E033, 1E034, 1E035, 1E036, 1E037, 1E038, 1E039, 1E040, 1E041, 1E042, 1E043, 1E044, 1E045, 1E046, 1E047, + 1E048, 1E049, 1E050, 1E051, 1E052, 1E053, 1E054, 1E055, 1E056, 1E057, 1E058, 1E059, 1E060, 1E061, 1E062, 1E063, + 1E064, 1E065, 1E066, 1E067, 1E068, 1E069, 1E070, 1E071, 1E072, 1E073, 1E074, 1E075, 1E076, 1E077, 1E078, 1E079, + 1E080, 1E081, 1E082, 1E083, 1E084, 1E085, 1E086, 1E087, 1E088, 1E089, 1E090, 1E091, 1E092, 1E093, 1E094, 1E095, + 1E096, 1E097, 1E098, 1E099, + + 1E100, 1E101, 1E102, 1E103, 1E104, 1E105, 1E106, 1E107, 1E108, 1E109, 1E110, 1E111, 1E112, 1E113, 1E114, 1E115, + 1E116, 1E117, 1E118, 1E119, 1E120, 1E121, 1E122, 1E123, 1E124, 1E125, 1E126, 1E127, 1E128, 1E129, 1E130, 1E131, + 1E132, 1E133, 1E134, 1E135, 1E136, 1E137, 1E138, 1E139, 1E140, 1E141, 1E142, 1E143, 1E144, 1E145, 1E146, 1E147, + 1E148, 1E149, 1E150, 1E151, 1E152, 1E153, 1E154, 1E155, 1E156, 1E157, 1E158, 1E159, 1E160, 1E161, 1E162, 1E163, + 1E164, 1E165, 1E166, 1E167, 1E168, 1E169, 1E170, 1E171, 1E172, 1E173, 1E174, 1E175, 1E176, 1E177, 1E178, 1E179, + 1E180, 1E181, 1E182, 1E183, 1E184, 1E185, 1E186, 1E187, 1E188, 1E189, 1E190, 1E191, 1E192, 1E193, 1E194, 1E195, + 1E196, 1E197, 1E198, 1E199, + + 1E200, 1E201, 1E202, 1E203, 1E204, 1E205, 1E206, 1E207, 1E208, 1E209, 1E210, 1E211, 1E212, 1E213, 1E214, 1E215, + 1E216, 1E217, 1E218, 1E219, 1E220, 1E221, 1E222, 1E223, 1E224, 1E225, 1E226, 1E227, 1E228, 1E229, 1E230, 1E231, + 1E232, 1E233, 1E234, 1E235, 1E236, 1E237, 1E238, 1E239, 1E240, 1E241, 1E242, 1E243, 1E244, 1E245, 1E246, 1E247, + 1E248, 1E249, 1E250, 1E251, 1E252, 1E253, 1E254, 1E255, 1E256, 1E257, 1E258, 1E259, 1E260, 1E261, 1E262, 1E263, + 1E264, 1E265, 1E266, 1E267, 1E268, 1E269, 1E270, 1E271, 1E272, 1E273, 1E274, 1E275, 1E276, 1E277, 1E278, 1E279, + 1E280, 1E281, 1E282, 1E283, 1E284, 1E285, 1E286, 1E287, 1E288, 1E289, 1E290, 1E291, 1E292, 1E293, 1E294, 1E295, + 1E296, 1E297, 1E298, 1E299, + + 1E300, 1E301, 1E302, 1E303, 1E304, 1E305, 1E306, 1E307, 1E308 }; } \ No newline at end of file diff --git a/src/main/java/org/codehaus/plexus/util/WriterFactory.java b/src/main/java/org/codehaus/plexus/util/WriterFactory.java index 3b28b9c0..cf8326c4 100644 --- a/src/main/java/org/codehaus/plexus/util/WriterFactory.java +++ b/src/main/java/org/codehaus/plexus/util/WriterFactory.java @@ -17,69 +17,72 @@ */ import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.FileWriter; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; import java.io.Writer; import java.nio.charset.Charset; +import java.nio.file.Files; import org.codehaus.plexus.util.xml.XmlStreamWriter; /** - * Utility to create Writers, with explicit encoding choice: platform default, - * XML, or specified. + * Utility to create Writers, with explicit encoding choice: platform default, XML, or specified. * * @author Herve Boutemy * @see Charset * @see Supported encodings - * @version $Id$ + * * @since 1.4.4 */ public class WriterFactory { /** - * ISO Latin Alphabet #1, also known as ISO-LATIN-1. - * Every implementation of the Java platform is required to support this character encoding. + * ISO Latin Alphabet #1, also known as ISO-LATIN-1. Every implementation of the Java platform is required to + * support this character encoding. + * * @see Charset */ public static final String ISO_8859_1 = "ISO-8859-1"; /** - * Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set. - * Every implementation of the Java platform is required to support this character encoding. + * Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set. Every + * implementation of the Java platform is required to support this character encoding. + * * @see Charset */ public static final String US_ASCII = "US-ASCII"; /** * Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either - * order accepted on input, big-endian used on output). - * Every implementation of the Java platform is required to support this character encoding. + * order accepted on input, big-endian used on output). Every implementation of the Java platform is required to + * support this character encoding. + * * @see Charset */ public static final String UTF_16 = "UTF-16"; /** - * Sixteen-bit Unicode Transformation Format, big-endian byte order. - * Every implementation of the Java platform is required to support this character encoding. + * Sixteen-bit Unicode Transformation Format, big-endian byte order. Every implementation of the Java platform is + * required to support this character encoding. + * * @see Charset */ public static final String UTF_16BE = "UTF-16BE"; /** - * Sixteen-bit Unicode Transformation Format, little-endian byte order. - * Every implementation of the Java platform is required to support this character encoding. + * Sixteen-bit Unicode Transformation Format, little-endian byte order. Every implementation of the Java platform is + * required to support this character encoding. + * * @see Charset */ public static final String UTF_16LE = "UTF-16LE"; /** - * Eight-bit Unicode Transformation Format. - * Every implementation of the Java platform is required to support this character encoding. + * Eight-bit Unicode Transformation Format. Every implementation of the Java platform is required to support this + * character encoding. + * * @see Charset */ public static final String UTF_8 = "UTF-8"; @@ -98,7 +101,7 @@ public class WriterFactory * @see XmlStreamWriter */ public static XmlStreamWriter newXmlWriter( OutputStream out ) - throws IOException + throws IOException { return new XmlStreamWriter( out ); } @@ -112,17 +115,16 @@ public static XmlStreamWriter newXmlWriter( OutputStream out ) * @see XmlStreamWriter */ public static XmlStreamWriter newXmlWriter( File file ) - throws IOException + throws IOException { return new XmlStreamWriter( file ); } /** - * Create a new Writer with default plaform encoding. + * Create a new Writer with default platform encoding. * * @param out not null output stream. * @return a writer instance for the output stream using the default platform charset. - * @throws IOException if any. * @see Charset#defaultCharset() */ public static Writer newPlatformWriter( OutputStream out ) @@ -131,7 +133,7 @@ public static Writer newPlatformWriter( OutputStream out ) } /** - * Create a new Writer with default plaform encoding. + * Create a new Writer with default platform encoding. * * @param file not null file. * @return a writer instance for the output file using the default platform charset. @@ -139,9 +141,9 @@ public static Writer newPlatformWriter( OutputStream out ) * @see Charset#defaultCharset() */ public static Writer newPlatformWriter( File file ) - throws IOException + throws IOException { - return new FileWriter( file ); + return Files.newBufferedWriter( file.toPath() ); } /** @@ -154,7 +156,7 @@ public static Writer newPlatformWriter( File file ) * @see Supported encodings */ public static Writer newWriter( OutputStream out, String encoding ) - throws UnsupportedEncodingException + throws UnsupportedEncodingException { return new OutputStreamWriter( out, encoding ); } @@ -165,13 +167,12 @@ public static Writer newWriter( OutputStream out, String encoding ) * @param file not null file. * @param encoding not null supported encoding. * @return a writer instance for the output file using the given encoding. - * @throws UnsupportedEncodingException if any. - * @throws FileNotFoundException if any. + * @throws IOException if any. * @see Supported encodings */ public static Writer newWriter( File file, String encoding ) - throws UnsupportedEncodingException, FileNotFoundException + throws IOException { - return newWriter( new FileOutputStream(file), encoding ); + return newWriter( Files.newOutputStream( file.toPath() ), encoding ); } } diff --git a/src/main/java/org/codehaus/plexus/util/interpolation/EnvarBasedValueSource.java b/src/main/java/org/codehaus/plexus/util/cli/AbstractStreamHandler.java similarity index 50% rename from src/main/java/org/codehaus/plexus/util/interpolation/EnvarBasedValueSource.java rename to src/main/java/org/codehaus/plexus/util/cli/AbstractStreamHandler.java index 3ea9232d..2ad16366 100644 --- a/src/main/java/org/codehaus/plexus/util/interpolation/EnvarBasedValueSource.java +++ b/src/main/java/org/codehaus/plexus/util/cli/AbstractStreamHandler.java @@ -1,4 +1,4 @@ -package org.codehaus.plexus.util.interpolation; +package org.codehaus.plexus.util.cli; /* * Copyright The Codehaus Foundation. @@ -16,25 +16,43 @@ * limitations under the License. */ -import java.io.IOException; - /** - * @version $Id$ - * - * @deprecated Use plexus-interpolation APIs instead. - * @version $Id$ + * @author Kristian Rosenvold */ -public class EnvarBasedValueSource - extends org.codehaus.plexus.interpolation.EnvarBasedValueSource +public class AbstractStreamHandler + extends Thread { - public EnvarBasedValueSource() - throws IOException + private boolean done; + + private volatile boolean disabled; + + public boolean isDone() + { + return done; + } + + public synchronized void waitUntilDone() + throws InterruptedException { + while ( !isDone() ) + { + wait(); + } } - public EnvarBasedValueSource( boolean caseSensitive ) - throws IOException + protected boolean isDisabled() { - super( caseSensitive ); + return disabled; } + + public void disable() + { + disabled = true; + } + + public void setDone() + { + done = true; + } + } diff --git a/src/main/java/org/codehaus/plexus/util/interpolation/MapBasedValueSource.java b/src/main/java/org/codehaus/plexus/util/cli/CommandLineCallable.java similarity index 65% rename from src/main/java/org/codehaus/plexus/util/interpolation/MapBasedValueSource.java rename to src/main/java/org/codehaus/plexus/util/cli/CommandLineCallable.java index e6d84610..0a861a75 100644 --- a/src/main/java/org/codehaus/plexus/util/interpolation/MapBasedValueSource.java +++ b/src/main/java/org/codehaus/plexus/util/cli/CommandLineCallable.java @@ -1,4 +1,4 @@ -package org.codehaus.plexus.util.interpolation; +package org.codehaus.plexus.util.cli; /* * Copyright The Codehaus Foundation. @@ -16,17 +16,17 @@ * limitations under the License. */ -import java.util.Map; +import java.util.concurrent.Callable; /** - * @version $Id$ - * @deprecated Use plexus-interpolation APIs instead. + * Callable wrapper that exposes the proper exception type to the client. + * + * @author Kristian Rosenvold */ -public class MapBasedValueSource - extends org.codehaus.plexus.interpolation.MapBasedValueSource +public interface CommandLineCallable + extends Callable { - public MapBasedValueSource( Map values ) - { - super( values ); - } + @Override + Integer call() + throws CommandLineException; } diff --git a/src/main/java/org/codehaus/plexus/util/cli/CommandLineException.java b/src/main/java/org/codehaus/plexus/util/cli/CommandLineException.java index bf36f527..9d0a439e 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/CommandLineException.java +++ b/src/main/java/org/codehaus/plexus/util/cli/CommandLineException.java @@ -18,7 +18,7 @@ /** * @author Trygve Laugstøl - * @version $Id$ + * */ public class CommandLineException extends Exception diff --git a/src/main/java/org/codehaus/plexus/util/cli/CommandLineTimeOutException.java b/src/main/java/org/codehaus/plexus/util/cli/CommandLineTimeOutException.java new file mode 100644 index 00000000..9d90c674 --- /dev/null +++ b/src/main/java/org/codehaus/plexus/util/cli/CommandLineTimeOutException.java @@ -0,0 +1,41 @@ +package org.codehaus.plexus.util.cli; + +/* + * 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. + */ + +/** + * @author olamy + * @since 1.5.9 + * + */ +public class CommandLineTimeOutException + extends CommandLineException +{ + + public CommandLineTimeOutException( String message ) + { + super( message ); + } + + public CommandLineTimeOutException( String message, Throwable cause ) + { + super( message, cause ); + } + +} diff --git a/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java b/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java index 70738d28..4a556c84 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java +++ b/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java @@ -16,58 +16,38 @@ * limitations under the License. */ -import org.codehaus.plexus.util.Os; -import org.codehaus.plexus.util.StringUtils; - -import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; import java.util.Locale; import java.util.Map; import java.util.Properties; import java.util.StringTokenizer; import java.util.Vector; +import org.codehaus.plexus.util.Os; +import org.codehaus.plexus.util.StringUtils; + /** * @author Trygve Laugstøl - * @version $Id$ + * */ public abstract class CommandLineUtils { - private static Map processes = Collections.synchronizedMap( new HashMap() ); - - static - { - Runtime.getRuntime().addShutdownHook( new Thread( "CommandlineUtil shutdown" ) - { - public void run() - { - if ( ( processes != null ) && ( processes.size() > 0 ) ) - { - System.err.println( "Destroying " + processes.size() + " processes" ); - for ( Iterator it = processes.values().iterator(); it.hasNext(); ) - { - System.err.println( "Destroying process.." ); - ( (Process) it.next() ).destroy(); - - } - System.err.println( "Destroyed " + processes.size() + " processes" ); - } - } - } ); - } + /** + * A {@code StreamConsumer} providing consumed lines as a {@code String}. + * + * @see #getOutput() + */ public static class StringStreamConsumer implements StreamConsumer { + private StringBuffer string = new StringBuffer(); private String ls = System.getProperty( "line.separator" ); + @Override public void consumeLine( String line ) { string.append( line ).append( ls ); @@ -77,27 +57,74 @@ public String getOutput() { return string.toString(); } + } + /** + * Number of milliseconds per second. + */ + private static final long MILLIS_PER_SECOND = 1000L; + + /** + * Number of nanoseconds per second. + */ + private static final long NANOS_PER_SECOND = 1000000000L; + public static int executeCommandLine( Commandline cl, StreamConsumer systemOut, StreamConsumer systemErr ) throws CommandLineException { return executeCommandLine( cl, null, systemOut, systemErr, 0 ); } - public static int executeCommandLine( Commandline cl, StreamConsumer systemOut, StreamConsumer systemErr, int timeoutInSeconds ) + public static int executeCommandLine( Commandline cl, StreamConsumer systemOut, StreamConsumer systemErr, + int timeoutInSeconds ) throws CommandLineException { return executeCommandLine( cl, null, systemOut, systemErr, timeoutInSeconds ); } - public static int executeCommandLine( Commandline cl, InputStream systemIn, StreamConsumer systemOut, StreamConsumer systemErr ) + public static int executeCommandLine( Commandline cl, InputStream systemIn, StreamConsumer systemOut, + StreamConsumer systemErr ) throws CommandLineException { return executeCommandLine( cl, systemIn, systemOut, systemErr, 0 ); } - public static int executeCommandLine( Commandline cl, InputStream systemIn, StreamConsumer systemOut, StreamConsumer systemErr, int timeoutInSeconds ) + /** + * @param cl The command line to execute + * @param systemIn The input to read from, must be thread safe + * @param systemOut A consumer that receives output, must be thread safe + * @param systemErr A consumer that receives system error stream output, must be thread safe + * @param timeoutInSeconds Positive integer to specify timeout, zero and negative integers for no timeout. + * @return A return value, see {@link Process#exitValue()} + * @throws CommandLineException or CommandLineTimeOutException if time out occurs + */ + public static int executeCommandLine( Commandline cl, InputStream systemIn, StreamConsumer systemOut, + StreamConsumer systemErr, int timeoutInSeconds ) + throws CommandLineException + { + final CommandLineCallable future = + executeCommandLineAsCallable( cl, systemIn, systemOut, systemErr, timeoutInSeconds ); + return future.call(); + } + + /** + * Immediately forks a process, returns a callable that will block until process is complete. + * + * @param cl The command line to execute + * @param systemIn The input to read from, must be thread safe + * @param systemOut A consumer that receives output, must be thread safe + * @param systemErr A consumer that receives system error stream output, must be thread safe + * @param timeoutInSeconds Positive integer to specify timeout, zero and negative integers for no timeout. + * @return A CommandLineCallable that provides the process return value, see {@link Process#exitValue()}. "call" + * must be called on this to be sure the forked process has terminated, no guarantees is made about any + * internal state before after the completion of the call statements + * @throws CommandLineException or CommandLineTimeOutException if time out occurs + */ + public static CommandLineCallable executeCommandLineAsCallable( final Commandline cl, final InputStream systemIn, + final StreamConsumer systemOut, + final StreamConsumer systemErr, + final int timeoutInSeconds ) throws CommandLineException { if ( cl == null ) @@ -105,101 +132,218 @@ public static int executeCommandLine( Commandline cl, InputStream systemIn, Stre throw new IllegalArgumentException( "cl cannot be null." ); } - Process p; + final Process p = cl.execute(); + + final Thread processHook = new Thread() + { + + { + this.setName( "CommandLineUtils process shutdown hook" ); + this.setContextClassLoader( null ); + } - p = cl.execute(); + @Override + public void run() + { + p.destroy(); + } - processes.put( new Long( cl.getPid() ), p ); + }; - StreamFeeder inputFeeder = null; + ShutdownHookUtils.addShutDownHook( processHook ); - if ( systemIn != null ) + return new CommandLineCallable() { - inputFeeder = new StreamFeeder( systemIn, p.getOutputStream() ); - } - StreamPumper outputPumper = new StreamPumper( p.getInputStream(), systemOut ); + @Override + public Integer call() + throws CommandLineException + { + StreamFeeder inputFeeder = null; + StreamPumper outputPumper = null; + StreamPumper errorPumper = null; + boolean success = false; + try + { + if ( systemIn != null ) + { + inputFeeder = new StreamFeeder( systemIn, p.getOutputStream() ); + inputFeeder.start(); + } - StreamPumper errorPumper = new StreamPumper( p.getErrorStream(), systemErr ); + outputPumper = new StreamPumper( p.getInputStream(), systemOut ); + outputPumper.start(); - if ( inputFeeder != null ) - { - inputFeeder.start(); - } + errorPumper = new StreamPumper( p.getErrorStream(), systemErr ); + errorPumper.start(); - outputPumper.start(); + int returnValue; + if ( timeoutInSeconds <= 0 ) + { + returnValue = p.waitFor(); + } + else + { + final long now = System.nanoTime(); + final long timeout = now + NANOS_PER_SECOND * timeoutInSeconds; - errorPumper.start(); + while ( isAlive( p ) && ( System.nanoTime() < timeout ) ) + { + // The timeout is specified in seconds. Therefore we must not sleep longer than one second + // but we should sleep as long as possible to reduce the number of iterations performed. + Thread.sleep( MILLIS_PER_SECOND - 1L ); + } - try - { - int returnValue; - if ( timeoutInSeconds <= 0 ) - { - returnValue = p.waitFor(); - } - else - { - long now = System.currentTimeMillis(); - long timeoutInMillis = 1000L * timeoutInSeconds; - long finish = now + timeoutInMillis; - while ( isAlive( p ) && ( System.currentTimeMillis() < finish ) ) - { - Thread.sleep( 10 ); - } - if ( isAlive( p ) ) - { - throw new InterruptedException( "Process timeout out after " + timeoutInSeconds + " seconds" ); - } - returnValue = p.exitValue(); - } + if ( isAlive( p ) ) + { + throw new InterruptedException( String.format( "Process timed out after %d seconds.", + timeoutInSeconds ) ); + } - if ( inputFeeder != null ) - { - synchronized ( inputFeeder ) - { - while ( !inputFeeder.isDone() ) + returnValue = p.exitValue(); + } + + // TODO Find out if waitUntilDone needs to be called using a try-finally construct. The method may + // throw an + // InterruptedException so that calls to waitUntilDone may be skipped. + // try + // { + // if ( inputFeeder != null ) + // { + // inputFeeder.waitUntilDone(); + // } + // } + // finally + // { + // try + // { + // outputPumper.waitUntilDone(); + // } + // finally + // { + // errorPumper.waitUntilDone(); + // } + // } + if ( inputFeeder != null ) { - inputFeeder.wait(); + inputFeeder.waitUntilDone(); } - } - } - synchronized ( outputPumper ) - { - while ( !outputPumper.isDone() ) - { - outputPumper.wait(); + outputPumper.waitUntilDone(); + errorPumper.waitUntilDone(); + + if ( inputFeeder != null ) + { + inputFeeder.close(); + handleException( inputFeeder, "stdin" ); + } + + outputPumper.close(); + handleException( outputPumper, "stdout" ); + + errorPumper.close(); + handleException( errorPumper, "stderr" ); + + success = true; + return returnValue; } - } + catch ( InterruptedException ex ) + { + throw new CommandLineTimeOutException( "Error while executing external command, process killed.", + ex ); - synchronized ( errorPumper ) - { - while ( !errorPumper.isDone() ) + } + finally { - errorPumper.wait(); + if ( inputFeeder != null ) + { + inputFeeder.disable(); + } + if ( outputPumper != null ) + { + outputPumper.disable(); + } + if ( errorPumper != null ) + { + errorPumper.disable(); + } + + try + { + ShutdownHookUtils.removeShutdownHook( processHook ); + processHook.run(); + } + finally + { + try + { + if ( inputFeeder != null ) + { + inputFeeder.close(); + + if ( success ) + { + success = false; + handleException( inputFeeder, "stdin" ); + success = true; // Only reached when no exception has been thrown. + } + } + } + finally + { + try + { + if ( outputPumper != null ) + { + outputPumper.close(); + + if ( success ) + { + success = false; + handleException( outputPumper, "stdout" ); + success = true; // Only reached when no exception has been thrown. + } + } + } + finally + { + if ( errorPumper != null ) + { + errorPumper.close(); + + if ( success ) + { + handleException( errorPumper, "stderr" ); + } + } + } + } + } } } - processes.remove( new Long( cl.getPid() ) ); + }; + } - return returnValue; - } - catch ( InterruptedException ex ) + private static void handleException( final StreamPumper streamPumper, final String streamName ) + throws CommandLineException + { + if ( streamPumper.getException() != null ) { - killProcess( cl.getPid() ); - throw new CommandLineException( "Error while executing external command, process killed.", ex ); + throw new CommandLineException( String.format( "Failure processing %s.", streamName ), + streamPumper.getException() ); + } - finally - { - if ( inputFeeder != null ) - { - inputFeeder.close(); - } + } - outputPumper.close(); + private static void handleException( final StreamFeeder streamFeeder, final String streamName ) + throws CommandLineException + { + if ( streamFeeder.getException() != null ) + { + throw new CommandLineException( String.format( "Failure processing %s.", streamName ), + streamFeeder.getException() ); - errorPumper.close(); } } @@ -211,6 +355,8 @@ public static int executeCommandLine( Commandline cl, InputStream systemIn, Stre * * @return The shell environment variables, can be empty but never null. * @throws IOException If the environment variables could not be queried from the shell. + * @see System#getenv() System.getenv() API, new in JDK 5.0, to get the same result since 2.0.2 System#getenv() + * will be used if available in the current running jvm. */ public static Properties getSystemEnvVars() throws IOException @@ -219,107 +365,46 @@ public static Properties getSystemEnvVars() } /** - * Return the shell environment variables. If caseSensitive == true, then envar - * keys will all be upper-case. + * Return the shell environment variables. If caseSensitive == true, then envar keys will all be + * upper-case. * * @param caseSensitive Whether environment variable keys should be treated case-sensitively. * @return Properties object of (possibly modified) envar keys mapped to their values. - * @throws IOException + * @throws IOException . + * @see System#getenv() System.getenv() API, new in JDK 5.0, to get the same result since 2.0.2 System#getenv() + * will be used if available in the current running jvm. */ public static Properties getSystemEnvVars( boolean caseSensitive ) throws IOException { - Process p = null; - Properties envVars = new Properties(); - - Runtime r = Runtime.getRuntime(); - - //If this is windows set the shell to command.com or cmd.exe with correct arguments. - if ( Os.isFamily( Os.FAMILY_WINDOWS ) ) + Map envs = System.getenv(); + for ( String key : envs.keySet() ) { - if ( Os.isFamily( Os.FAMILY_WIN9X ) ) + String value = envs.get( key ); + if ( !caseSensitive ) { - p = r.exec( "command.com /c set" ); - } - else - { - p = r.exec( "cmd.exe /c set" ); - } - } - else - { - p = r.exec( "env" ); - } - - BufferedReader br = new BufferedReader( new InputStreamReader( p.getInputStream() ) ); - - String line; - - String lastKey = null; - String lastVal = null; - - while ( ( line = br.readLine() ) != null ) - { - int idx = line.indexOf( '=' ); - - if ( idx > 0 ) - { - lastKey = line.substring( 0, idx ); - - if ( !caseSensitive ) - { - lastKey = lastKey.toUpperCase( Locale.ENGLISH ); - } - - lastVal = line.substring( idx + 1 ); - - envVars.setProperty( lastKey, lastVal ); - } - else if ( lastKey != null ) - { - lastVal += "\n" + line; - - envVars.setProperty( lastKey, lastVal ); + key = key.toUpperCase( Locale.ENGLISH ); } + envVars.put( key, value ); } - return envVars; } - /** - * Kill a process launched by executeCommandLine methods. - * Doesn't work correctly on windows, only the cmd process will be destroy but not the sub process (Bug ID 4770092) - * - * @param pid The pid of command return by Commandline.getPid() - */ - public static void killProcess( long pid ) + public static boolean isAlive( Process p ) { - Process p = (Process) processes.get( new Long( pid ) ); - - if ( p != null ) + if ( p == null ) { - p.destroy(); - System.out.println( "killed." ); - processes.remove( new Long( pid ) ); - } - else - { - System.out.println( "don't exist." ); + return false; } - } - public static boolean isAlive( long pid ) - { - return ( processes.get( new Long( pid ) ) != null ); - } - - public static boolean isAlive( Process p ) { try { p.exitValue(); return false; - } catch (IllegalThreadStateException e) { + } + catch ( IllegalThreadStateException e ) + { return true; } } @@ -339,8 +424,8 @@ public static String[] translateCommandline( String toProcess ) final int inDoubleQuote = 2; int state = normal; StringTokenizer tok = new StringTokenizer( toProcess, "\"\' ", true ); - Vector v = new Vector(); - StringBuffer current = new StringBuffer(); + Vector v = new Vector(); + StringBuilder current = new StringBuilder(); while ( tok.hasMoreTokens() ) { @@ -408,18 +493,22 @@ else if ( " ".equals( nextTok ) ) } /** - *

            Put quotes around the given String if necessary.

            - *

            If the argument doesn't include spaces or quotes, return it - * as is. If it contains double quotes, use single quotes - else - * surround the argument by double quotes.

            - * - * @throws CommandLineException if the argument contains both, single - * and double quotes. - * + *

            + * Put quotes around the given String if necessary. + *

            + *

            + * If the argument doesn't include spaces or quotes, return it as is. If it contains double quotes, use single + * quotes - else surround the argument by double quotes. + *

            + * @param argument the argument + * @return the transformed command line + * @throws CommandLineException if the argument contains both, single and double quotes. * @deprecated Use {@link StringUtils#quoteAndEscape(String, char, char[], char[], char, boolean)}, - * {@link StringUtils#quoteAndEscape(String, char, char[], char, boolean)}, or - * {@link StringUtils#quoteAndEscape(String, char)} instead. + * {@link StringUtils#quoteAndEscape(String, char, char[], char, boolean)}, or + * {@link StringUtils#quoteAndEscape(String, char)} instead. */ + @Deprecated + @SuppressWarnings( { "JavaDoc", "deprecation" } ) public static String quote( String argument ) throws CommandLineException { @@ -427,18 +516,23 @@ public static String quote( String argument ) } /** - *

            Put quotes around the given String if necessary.

            - *

            If the argument doesn't include spaces or quotes, return it - * as is. If it contains double quotes, use single quotes - else - * surround the argument by double quotes.

            - * - * @throws CommandLineException if the argument contains both, single - * and double quotes. - * + *

            + * Put quotes around the given String if necessary. + *

            + *

            + * If the argument doesn't include spaces or quotes, return it as is. If it contains double quotes, use single + * quotes - else surround the argument by double quotes. + *

            + * @param argument see name + * @param wrapExistingQuotes see name + * @return the transformed command line + * @throws CommandLineException if the argument contains both, single and double quotes. * @deprecated Use {@link StringUtils#quoteAndEscape(String, char, char[], char[], char, boolean)}, - * {@link StringUtils#quoteAndEscape(String, char, char[], char, boolean)}, or - * {@link StringUtils#quoteAndEscape(String, char)} instead. + * {@link StringUtils#quoteAndEscape(String, char, char[], char, boolean)}, or + * {@link StringUtils#quoteAndEscape(String, char)} instead. */ + @Deprecated + @SuppressWarnings( { "JavaDoc", "UnusedDeclaration", "deprecation" } ) public static String quote( String argument, boolean wrapExistingQuotes ) throws CommandLineException { @@ -446,17 +540,25 @@ public static String quote( String argument, boolean wrapExistingQuotes ) } /** + * @param argument the argument + * @param escapeSingleQuotes see name + * @param escapeDoubleQuotes see name + * @param wrapExistingQuotes see name + * @return the transformed command line + * @throws CommandLineException some trouble * @deprecated Use {@link StringUtils#quoteAndEscape(String, char, char[], char[], char, boolean)}, - * {@link StringUtils#quoteAndEscape(String, char, char[], char, boolean)}, or - * {@link StringUtils#quoteAndEscape(String, char)} instead. + * {@link StringUtils#quoteAndEscape(String, char, char[], char, boolean)}, or + * {@link StringUtils#quoteAndEscape(String, char)} instead. */ + @Deprecated + @SuppressWarnings( { "JavaDoc" } ) public static String quote( String argument, boolean escapeSingleQuotes, boolean escapeDoubleQuotes, boolean wrapExistingQuotes ) throws CommandLineException { - if ( argument.indexOf( "\"" ) > -1 ) + if ( argument.contains( "\"" ) ) { - if ( argument.indexOf( "\'" ) > -1 ) + if ( argument.contains( "\'" ) ) { throw new CommandLineException( "Can't handle single and double quotes in same argument" ); } @@ -472,7 +574,7 @@ else if ( wrapExistingQuotes ) } } } - else if ( argument.indexOf( "\'" ) > -1 ) + else if ( argument.contains( "\'" ) ) { if ( escapeDoubleQuotes ) { @@ -483,7 +585,7 @@ else if ( wrapExistingQuotes ) return '\"' + argument + '\"'; } } - else if ( argument.indexOf( " " ) > -1 ) + else if ( argument.contains( " " ) ) { if ( escapeDoubleQuotes ) { @@ -507,7 +609,7 @@ public static String toString( String[] line ) } // path containing one or more elements - final StringBuffer result = new StringBuffer(); + final StringBuilder result = new StringBuilder(); for ( int i = 0; i < line.length; i++ ) { if ( i > 0 ) diff --git a/src/main/java/org/codehaus/plexus/util/cli/Commandline.java b/src/main/java/org/codehaus/plexus/util/cli/Commandline.java index 5e0d5af4..c06147a9 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/Commandline.java +++ b/src/main/java/org/codehaus/plexus/util/cli/Commandline.java @@ -67,22 +67,17 @@ import java.io.File; import java.io.IOException; import java.util.Collections; -import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.Properties; import java.util.Vector; /** - *

            - * Commandline objects help handling command lines specifying processes to - * execute. - *

            - *

            - * The class can be used to define a command line as nested elements or as a - * helper to define a command line by an application. - *

            - *

            + *

            Commandline objects help handling command lines specifying processes to execute.

            + * + *

            The class can be used to define a command line as nested elements or as a helper to define a command line by an + * application.

            + * * * <someelement>
            *   <acommandline executable="/executable/to/run">
            @@ -92,11 +87,9 @@ *   </acommandline>
            * </someelement>
            *
            - *

            - *

            - * The element someelement must provide a method - * createAcommandline which returns an instance of this class. - *

            + * + *

            The element someelement must provide a method createAcommandline which returns an instance + * of this class.

            * * @author thomas.haas@softwired-inc.com * @author Stefan Bodewig @@ -107,18 +100,20 @@ public class Commandline /** * @deprecated Use {@link org.codehaus.plexus.util.Os} class instead. */ + @Deprecated protected static final String OS_NAME = "os.name"; /** * @deprecated Use {@link org.codehaus.plexus.util.Os} class instead. */ + @Deprecated protected static final String WINDOWS = "Windows"; - protected Vector arguments = new Vector(); + protected Vector arguments = new Vector<>(); - //protected Vector envVars = new Vector(); + // protected Vector envVars = new Vector(); // synchronized added to preserve synchronize of Vector class - protected Map envVars = Collections.synchronizedMap( new LinkedHashMap() ); + protected Map envVars = Collections.synchronizedMap( new LinkedHashMap() ); private long pid = -1; @@ -127,19 +122,22 @@ public class Commandline /** * @deprecated Use {@link Commandline#setExecutable(String)} instead. */ + @Deprecated protected String executable; /** - * @deprecated Use {@link Commandline#setWorkingDirectory(File)} or - * {@link Commandline#setWorkingDirectory(String)} instead. + * @deprecated Use {@link Commandline#setWorkingDirectory(File)} or {@link Commandline#setWorkingDirectory(String)} + * instead. */ + @Deprecated private File workingDir; /** - * Create a new command line object. - * Shell is autodetected from operating system + * Create a new command line object. Shell is autodetected from operating system Shell usage is only desirable when + * generating code for remote execution. * - * @param toProcess + * @param toProcess sh to process + * @param shell Shell to use */ public Commandline( String toProcess, Shell shell ) { @@ -165,8 +163,9 @@ public Commandline( String toProcess, Shell shell ) } /** - * Create a new command line object. - * Shell is autodetected from operating system + * Create a new command line object. Shell is autodetected from operating system Shell usage is only desirable when + * generating code for remote execution. + * @param shell the Shell */ public Commandline( Shell shell ) { @@ -174,10 +173,9 @@ public Commandline( Shell shell ) } /** - * Create a new command line object. - * Shell is autodetected from operating system + * Create a new command line object, given a command following POSIX sh quoting rules * - * @param toProcess + * @param toProcess the process */ public Commandline( String toProcess ) { @@ -203,7 +201,6 @@ public Commandline( String toProcess ) /** * Create a new command line object. - * Shell is autodetected from operating system */ public Commandline() { @@ -244,19 +241,18 @@ public class Marker } /** - * Return the number of arguments that preceeded this marker. - *

            - *

            The name of the executable - if set - is counted as the - * very first argument.

            + * @return the number of arguments that preceded this marker. + * + *

            The name of the executable - if set - is counted as the very first argument.

            */ public int getPosition() { if ( realPos == -1 ) { - realPos = ( getExecutable() == null ? 0 : 1 ); + realPos = ( getLiteralExecutable() == null ? 0 : 1 ); for ( int i = 0; i < position; i++ ) { - Arg arg = (Arg) arguments.elementAt( i ); + Arg arg = arguments.elementAt( i ); realPos += arg.getParts().length; } } @@ -265,12 +261,13 @@ public int getPosition() } /** - *

            Sets the shell or command-line interpretor for the detected operating system, - * and the shell arguments.

            + *

            + * Sets the shell or command-line interpreter for the detected operating system, and the shell arguments. + *

            */ private void setDefaultShell() { - //If this is windows set the shell to command.com or cmd.exe with correct arguments. + // If this is windows set the shell to command.com or cmd.exe with correct arguments. if ( Os.isFamily( Os.FAMILY_WINDOWS ) ) { if ( Os.isFamily( Os.FAMILY_WIN9X ) ) @@ -289,31 +286,32 @@ private void setDefaultShell() } /** - * Creates an argument object. - *

            - *

            Each commandline object has at most one instance of the - * argument class. This method calls + *

            Creates an argument object.

            + * + *

            Each commandline object has at most one instance of the argument class. This method calls * this.createArgument(false).

            * * @return the argument object. * @see #createArgument(boolean) * @deprecated Use {@link Commandline#createArg()} instead */ + @Deprecated public Argument createArgument() { return this.createArgument( false ); } /** - * Creates an argument object and adds it to our list of args. - *

            - *

            Each commandline object has at most one instance of the - * argument class.

            + *

            Creates an argument object and adds it to our list of args.

            + * + *

            Each commandline object has at most one instance of the argument class.

            * - * @param insertAtStart if true, the argument is inserted at the - * beginning of the list of args, otherwise it is appended. + * @param insertAtStart if true, the argument is inserted at the beginning of the list of args, otherwise it is + * appended. * @deprecated Use {@link Commandline#createArg(boolean)} instead + * @return Argument the argument Object */ + @Deprecated public Argument createArgument( boolean insertAtStart ) { Argument argument = new Argument(); @@ -329,10 +327,9 @@ public Argument createArgument( boolean insertAtStart ) } /** - * Creates an argument object. - *

            - *

            Each commandline object has at most one instance of the - * argument class. This method calls + *

            Creates an argument object.

            + * + *

            Each commandline object has at most one instance of the argument class. This method calls * this.createArgument(false).

            * * @return the argument object. @@ -344,13 +341,12 @@ public Arg createArg() } /** - * Creates an argument object and adds it to our list of args. - *

            - *

            Each commandline object has at most one instance of the - * argument class.

            + * @return Creates an argument object and adds it to our list of args. + * + *

            Each commandline object has at most one instance of the argument class.

            * - * @param insertAtStart if true, the argument is inserted at the - * beginning of the list of args, otherwise it is appended. + * @param insertAtStart if true, the argument is inserted at the beginning of the list of args, otherwise it is + * appended. */ public Arg createArg( boolean insertAtStart ) { @@ -367,9 +363,7 @@ public Arg createArg( boolean insertAtStart ) } /** - * Adds an argument object to our list of args. - * - * @return the argument object. + * @param argument the argument * @see #addArg(Arg,boolean) */ public void addArg( Arg argument ) @@ -379,9 +373,9 @@ public void addArg( Arg argument ) /** * Adds an argument object to our list of args. - * - * @param insertAtStart if true, the argument is inserted at the - * beginning of the list of args, otherwise it is appended. + * @param argument the argument + * @param insertAtStart if true, the argument is inserted at the beginning of the list of args, otherwise it is + * appended. */ public void addArg( Arg argument, boolean insertAtStart ) { @@ -397,6 +391,7 @@ public void addArg( Arg argument, boolean insertAtStart ) /** * Sets the executable to run. + * @param executable the executable */ public void setExecutable( String executable ) { @@ -404,6 +399,20 @@ public void setExecutable( String executable ) this.executable = executable; } + /** + * @return Executable to be run, as a literal string (no shell quoting/munging) + */ + public String getLiteralExecutable() + { + return executable; + } + + /** + * Return an executable name, quoted for shell use. Shell usage is only desirable when generating code for remote + * execution. + * + * @return Executable to be run, quoted for shell interpretation + */ public String getExecutable() { String exec = shell.getExecutable(); @@ -418,32 +427,35 @@ public String getExecutable() public void addArguments( String[] line ) { - for ( int i = 0; i < line.length; i++ ) + for ( String aLine : line ) { - createArgument().setValue( line[i] ); + createArgument().setValue( aLine ); } } /** * Add an environment variable + * @param name name + * @param value value */ public void addEnvironment( String name, String value ) { - //envVars.add( name + "=" + value ); + // envVars.add( name + "=" + value ); envVars.put( name, value ); } /** * Add system environment variables + * @throws Exception if error */ public void addSystemEnvironment() throws Exception { Properties systemEnvVars = CommandLineUtils.getSystemEnvVars(); - for ( Iterator i = systemEnvVars.keySet().iterator(); i.hasNext(); ) + for ( Object o : systemEnvVars.keySet() ) { - String key = (String) i.next(); + String key = (String) o; if ( !envVars.containsKey( key ) ) { addEnvironment( key, systemEnvVars.getProperty( key ) ); @@ -452,7 +464,8 @@ public void addSystemEnvironment() } /** - * Return the list of environment variables + * @return String[] Return the list of environment variables + * @throws CommandLineException if error */ public String[] getEnvironmentVariables() throws CommandLineException @@ -467,10 +480,10 @@ public String[] getEnvironmentVariables() } String[] environmentVars = new String[envVars.size()]; int i = 0; - for ( Iterator iterator = envVars.keySet().iterator(); iterator.hasNext(); ) + for ( Object o : envVars.keySet() ) { - String name = (String) iterator.next(); - String value = (String) envVars.get( name ); + String name = (String) o; + String value = envVars.get( name ); environmentVars[i] = name + "=" + value; i++; } @@ -478,12 +491,27 @@ public String[] getEnvironmentVariables() } /** - * Returns the executable and all defined arguments. + * @return Returns the executable and all defined arguments. + * For Windows Family, {@link Commandline#getShellCommandline()} is returned */ public String[] getCommandline() + { + if ( Os.isFamily( Os.FAMILY_WINDOWS ) ) + { + return getShellCommandline(); + } + + return getRawCommandline(); + } + + /** + * Returns the executable and all defined arguments. + * @return the command line as array not escaped neither quoted + */ + public String[] getRawCommandline() { final String[] args = getArguments(); - String executable = getExecutable(); + String executable = getLiteralExecutable(); if ( executable == null ) { @@ -495,33 +523,34 @@ public String[] getCommandline() return result; } - /** - * Returns the shell, executable and all defined arguments. + /** + * Returns the shell, executable and all defined arguments. Shell usage is only desirable when generating code for + * remote execution. + * @return the command line as array */ public String[] getShellCommandline() { // TODO: Provided only for backward compat. with <= 1.4 verifyShellState(); - return (String[]) getShell().getShellCommandLine( getArguments() ).toArray( new String[0] ); + return getShell().getShellCommandLine( getArguments() ).toArray( new String[0] ); } /** - * Returns all arguments defined by addLine, - * addValue or the argument object. + * @return Returns all arguments defined by addLine, addValue or the argument object. */ public String[] getArguments() { - Vector result = new Vector( arguments.size() * 2 ); + Vector result = new Vector<>( arguments.size() * 2 ); for ( int i = 0; i < arguments.size(); i++ ) { - Argument arg = (Argument) arguments.elementAt( i ); + Arg arg = arguments.elementAt( i ); String[] s = arg.getParts(); if ( s != null ) { - for ( int j = 0; j < s.length; j++ ) + for ( String value : s ) { - result.addElement( s[j] ); + result.addElement( value ); } } } @@ -531,6 +560,7 @@ public String[] getArguments() return res; } + @Override public String toString() { return StringUtils.join( getShellCommandline(), " " ); @@ -541,6 +571,7 @@ public int size() return getCommandline().length; } + @Override public Object clone() { Commandline c = new Commandline( (Shell) shell.clone() ); @@ -571,11 +602,11 @@ public void clearArgs() } /** - * Return a marker. - *

            - *

            This marker can be used to locate a position on the - * commandline - to insert something for example - when all - * parameters have been set.

            + * + *

            This marker can be used to locate a position on the commandline - to insert something for example - when all + * parameters have been set. + *

            + * @return Return a marker. */ public Marker createMarker() { @@ -584,6 +615,7 @@ public Marker createMarker() /** * Sets execution directory. + * @param path the working directory as String */ public void setWorkingDirectory( String path ) { @@ -593,6 +625,7 @@ public void setWorkingDirectory( String path ) /** * Sets execution directory. + * @param workingDirectory the File used as working directory */ public void setWorkingDirectory( File workingDirectory ) { @@ -614,6 +647,8 @@ public File getWorkingDirectory() /** * Executes the command. + * @return the Process + * @throws CommandLineException if error */ public Process execute() throws CommandLineException @@ -623,7 +658,7 @@ public Process execute() Process process; - //addEnvironment( "MAVEN_TEST_ENVAR", "MAVEN_TEST_ENVAR_VALUE" ); + // addEnvironment( "MAVEN_TEST_ENVAR", "MAVEN_TEST_ENVAR_VALUE" ); String[] environment = getEnvironmentVariables(); @@ -633,7 +668,7 @@ public Process execute() { if ( workingDir == null ) { - process = Runtime.getRuntime().exec( getShellCommandline(), environment ); + process = Runtime.getRuntime().exec( getCommandline(), environment, workingDir ); } else { @@ -648,7 +683,7 @@ else if ( !workingDir.isDirectory() ) + "\" does not specify a directory." ); } - process = Runtime.getRuntime().exec( getShellCommandline(), environment, workingDir ); + process = Runtime.getRuntime().exec( getCommandline(), environment, workingDir ); } } catch ( IOException ex ) @@ -662,6 +697,7 @@ else if ( !workingDir.isDirectory() ) /** * @deprecated Remove once backward compat with plexus-utils <= 1.4 is no longer a consideration */ + @Deprecated private void verifyShellState() { if ( shell.getWorkingDirectory() == null ) @@ -669,7 +705,7 @@ private void verifyShellState() shell.setWorkingDirectory( workingDir ); } - if ( shell.getExecutable() == null ) + if ( shell.getOriginalExecutable() == null ) { shell.setExecutable( executable ); } @@ -682,9 +718,10 @@ public Properties getSystemEnvVars() } /** - * Allows to set the shell to be used in this command line. + * Allows to set the shell to be used in this command line. Shell usage is only desirable when generating code for + * remote execution. * - * @param shell + * @param shell Shell to use * @since 1.2 */ public void setShell( Shell shell ) @@ -693,9 +730,11 @@ public void setShell( Shell shell ) } /** - * Get the shell to be used in this command line. - * + * Get the shell to be used in this command line. Shell usage is only desirable when generating code for remote + * execution. + * * @since 1.2 + * @return the Shell */ public Shell getShell() { @@ -703,8 +742,12 @@ public Shell getShell() } /** + * @param toProcess the process + * @return the command line arguments + * @throws Exception if error happen * @deprecated Use {@link CommandLineUtils#translateCommandline(String)} instead. */ + @Deprecated public static String[] translateCommandline( String toProcess ) throws Exception { @@ -712,8 +755,12 @@ public static String[] translateCommandline( String toProcess ) } /** + * @param argument the argument + * @return the quote arg + * @throws CommandLineException if error happen * @deprecated Use {@link CommandLineUtils#quote(String)} instead. */ + @Deprecated public static String quoteArgument( String argument ) throws CommandLineException { @@ -722,7 +769,10 @@ public static String quoteArgument( String argument ) /** * @deprecated Use {@link CommandLineUtils#toString(String[])} instead. + * @param line the lines + * @return lines as single String */ + @Deprecated public static String toString( String[] line ) { return CommandLineUtils.toString( line ); @@ -733,9 +783,11 @@ public static class Argument { private String[] parts; - /* (non-Javadoc) - * @see org.codehaus.plexus.util.cli.Argumnt#setValue(java.lang.String) + /* + * (non-Javadoc) + * @see org.codehaus.plexus.util.cli.Argument#setValue(java.lang.String) */ + @Override public void setValue( String value ) { if ( value != null ) @@ -744,9 +796,11 @@ public void setValue( String value ) } } - /* (non-Javadoc) - * @see org.codehaus.plexus.util.cli.Argumnt#setLine(java.lang.String) + /* + * (non-Javadoc) + * @see org.codehaus.plexus.util.cli.Argument#setLine(java.lang.String) */ + @Override public void setLine( String line ) { if ( line == null ) @@ -763,17 +817,21 @@ public void setLine( String line ) } } - /* (non-Javadoc) - * @see org.codehaus.plexus.util.cli.Argumnt#setFile(java.io.File) + /* + * (non-Javadoc) + * @see org.codehaus.plexus.util.cli.Argument#setFile(java.io.File) */ + @Override public void setFile( File value ) { parts = new String[] { value.getAbsolutePath() }; } - /* (non-Javadoc) - * @see org.codehaus.plexus.util.cli.Argumnt#getParts() + /* + * (non-Javadoc) + * @see org.codehaus.plexus.util.cli.Argument#getParts() */ + @Override public String[] getParts() { return parts; diff --git a/src/main/java/org/codehaus/plexus/util/cli/DefaultConsumer.java b/src/main/java/org/codehaus/plexus/util/cli/DefaultConsumer.java index 4e63ce41..802dfb02 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/DefaultConsumer.java +++ b/src/main/java/org/codehaus/plexus/util/cli/DefaultConsumer.java @@ -16,15 +16,26 @@ * limitations under the License. */ +import java.io.IOException; + /** * @author Emmanuel Venisse - * @version $Id$ + * */ public class DefaultConsumer implements StreamConsumer { + + @Override public void consumeLine( String line ) + throws IOException { System.out.println( line ); + + if ( System.out.checkError() ) + { + throw new IOException( String.format( "Failure printing line '%s' to stdout.", line ) ); + } } + } diff --git a/src/main/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizer.java b/src/main/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizer.java index 655dbad2..2db89002 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizer.java +++ b/src/main/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizer.java @@ -19,11 +19,10 @@ import java.util.StringTokenizer; /** - * The java.util.StringTokenizer is horribly broken. - * Given the string 1,,,3,,4 (, delim) - * It will return 1,3,4 - * Which is clearly wrong - 1,EMPTY,EMPTY,3,EMPTY,4 is what it should return - * @version $Id$ + * The java.util.StringTokenizer is horribly broken. Given the string 1,,,3,,4 (, delim) It will return 1,3,4 Which is + * clearly wrong - 1,EMPTY,EMPTY,3,EMPTY,4 is what it should return + * + * */ public final class EnhancedStringTokenizer { diff --git a/src/main/java/org/codehaus/plexus/util/cli/ShutdownHookUtils.java b/src/main/java/org/codehaus/plexus/util/cli/ShutdownHookUtils.java new file mode 100644 index 00000000..453b566e --- /dev/null +++ b/src/main/java/org/codehaus/plexus/util/cli/ShutdownHookUtils.java @@ -0,0 +1,59 @@ +package org.codehaus.plexus.util.cli; + +/* + * Copyright The Codehaus Foundation. + * + * Licensed 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. + */ + +import java.security.AccessControlException; + +/** + * A shutdown hook that does not throw any exceptions upon container startup/shutdown or security manager restrictions. + * Incorrect usage of the hook itself may still throw an exception. + * + * @author Kristian Rosenvold + */ +class ShutdownHookUtils +{ + + public static void addShutDownHook( Thread hook ) + { + try + { + Runtime.getRuntime().addShutdownHook( hook ); + } + catch ( IllegalStateException ignore ) + { + } + catch ( AccessControlException ignore ) + { + } + + } + + public static void removeShutdownHook( Thread hook ) + { + try + { + Runtime.getRuntime().removeShutdownHook( hook ); + } + catch ( IllegalStateException ignore ) + { + } + catch ( AccessControlException ignore ) + { + } + } + +} diff --git a/src/main/java/org/codehaus/plexus/util/cli/StreamConsumer.java b/src/main/java/org/codehaus/plexus/util/cli/StreamConsumer.java index ccfacc2f..e01bda2c 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/StreamConsumer.java +++ b/src/main/java/org/codehaus/plexus/util/cli/StreamConsumer.java @@ -53,19 +53,25 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ********************************************************************************/ +import java.io.IOException; + /** - * Works in concert with the StreamPumper class to - * allow implementations to gain access to the lines being - * "Pumped". + * Works in concert with the StreamPumper class to allow implementations to gain access to the lines being "Pumped". + * Please note that implementations of this interface can be expected to be called from arbitrary threads and must + * therefore be threadsafe. * * @author Florin Vancea * @author Paul Julius - * @version $Id$ + * */ public interface StreamConsumer { /** * Called when the StreamPumper pumps a line from the Stream. + * + * @param line The line to be consumed. + * @throws IOException if consuming {@code line} fails. */ - public void consumeLine( String line ); + public void consumeLine( String line ) + throws IOException; } diff --git a/src/main/java/org/codehaus/plexus/util/cli/StreamFeeder.java b/src/main/java/org/codehaus/plexus/util/cli/StreamFeeder.java index 594d2d7b..270d7d8b 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/StreamFeeder.java +++ b/src/main/java/org/codehaus/plexus/util/cli/StreamFeeder.java @@ -24,34 +24,32 @@ * Read from an InputStream and write the output to an OutputStream. * * @author Trygve Laugstøl - * @version $Id$ + * */ public class StreamFeeder - extends Thread + extends AbstractStreamHandler { + private InputStream input; private OutputStream output; - private boolean done; + private volatile Throwable exception = null; /** * Create a new StreamFeeder * - * @param input Stream to read from + * @param input Stream to read from * @param output Stream to write to */ public StreamFeeder( InputStream input, OutputStream output ) { + super(); this.input = input; - this.output = output; } - // ---------------------------------------------------------------------- - // Runnable implementation - // ---------------------------------------------------------------------- - + @Override public void run() { try @@ -60,25 +58,24 @@ public void run() } catch ( Throwable ex ) { - // Catched everything so the streams will be closed and flagged as done. + if ( exception == null ) + { + exception = ex; + } } finally { close(); - done = true; - synchronized ( this ) { + setDone(); + this.notifyAll(); } } } - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - public void close() { if ( input != null ) @@ -91,7 +88,10 @@ public void close() } catch ( IOException ex ) { - // ignore + if ( exception == null ) + { + exception = ex; + } } input = null; @@ -108,7 +108,10 @@ public void close() } catch ( IOException ex ) { - // ignore + if ( exception == null ) + { + exception = ex; + } } output = null; @@ -116,28 +119,39 @@ public void close() } } - public boolean isDone() + /** + * @since 3.1.0 + * @return the Exception + */ + public Throwable getException() { - return done; + return exception; } - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - private void feed() throws IOException { + boolean flush = false; int data = input.read(); - while ( !done && data != -1 ) + while ( !isDone() && data != -1 ) { synchronized ( output ) { - output.write( data ); + if ( !isDisabled() ) + { + output.write( data ); + flush = true; + } data = input.read(); } } + + if ( flush ) + { + output.flush(); + } } + } diff --git a/src/main/java/org/codehaus/plexus/util/cli/StreamPumper.java b/src/main/java/org/codehaus/plexus/util/cli/StreamPumper.java index 38d83bb6..12126e88 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/StreamPumper.java +++ b/src/main/java/org/codehaus/plexus/util/cli/StreamPumper.java @@ -70,93 +70,122 @@ * ==================================================================== */ -import org.codehaus.plexus.util.IOUtil; - import java.io.BufferedReader; +import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; /** - * Class to pump the error stream during Process's runtime. Copied from the Ant - * built-in task. + * Class to pump the error stream during Process's runtime. Copied from the Ant built-in task. * * @author Florin Vancea * @author Paul Julius + * * @since June 11, 2001 - * @version $Id$ */ public class StreamPumper - extends Thread + extends AbstractStreamHandler { - private BufferedReader in; + private final BufferedReader in; - private StreamConsumer consumer = null; + private final StreamConsumer consumer; - private PrintWriter out = null; + private final PrintWriter out; - private static final int SIZE = 1024; + private volatile Exception exception = null; - boolean done; + private static final int SIZE = 1024; public StreamPumper( InputStream in ) { - this.in = new BufferedReader( new InputStreamReader( in ), SIZE ); + this( in, (StreamConsumer) null ); } public StreamPumper( InputStream in, StreamConsumer consumer ) { - this( in ); - - this.consumer = consumer; + this( in, null, consumer ); } public StreamPumper( InputStream in, PrintWriter writer ) { - this( in ); - - out = writer; + this( in, writer, null ); } public StreamPumper( InputStream in, PrintWriter writer, StreamConsumer consumer ) { - this( in ); + super(); + this.in = new BufferedReader( new InputStreamReader( in ), SIZE ); this.out = writer; this.consumer = consumer; } + @Override public void run() { + boolean outError = out != null ? out.checkError() : false; + try { - String s = in.readLine(); - - while ( s != null ) + for ( String line = in.readLine(); line != null; line = in.readLine() ) { - consumeLine( s ); + try + { + if ( exception == null && consumer != null && !isDisabled() ) + { + consumer.consumeLine( line ); + } + } + catch ( Exception t ) + { + exception = t; + } - if ( out != null ) + if ( out != null && !outError ) { - out.println( s ); + out.println( line ); out.flush(); - } - s = in.readLine(); + if ( out.checkError() ) + { + outError = true; + + try + { + // Thrown to fill in stack trace elements. + throw new IOException( String.format( "Failure printing line '%s'.", line ) ); + } + catch ( final IOException e ) + { + exception = e; + } + } + } } } - catch ( Throwable e ) + catch ( IOException e ) { - // Catched everything so the streams will be closed and flagged as done. + exception = e; } finally { - IOUtil.close( in ); - - done = true; + try + { + in.close(); + } + catch ( final IOException e2 ) + { + if ( exception == null ) + { + exception = e2; + } + } synchronized ( this ) { + setDone(); + this.notifyAll(); } } @@ -167,24 +196,45 @@ public void flush() if ( out != null ) { out.flush(); + + if ( out.checkError() && exception == null ) + { + try + { + // Thrown to fill in stack trace elements. + throw new IOException( "Failure flushing output." ); + } + catch ( final IOException e ) + { + exception = e; + } + } } } public void close() { - IOUtil.close( out ); - } + if ( out != null ) + { + out.close(); - public boolean isDone() - { - return done; + if ( out.checkError() && exception == null ) + { + try + { + // Thrown to fill in stack trace elements. + throw new IOException( "Failure closing output." ); + } + catch ( final IOException e ) + { + exception = e; + } + } + } } - private void consumeLine( String line ) + public Exception getException() { - if ( consumer != null ) - { - consumer.consumeLine( line ); - } + return exception; } } diff --git a/src/main/java/org/codehaus/plexus/util/cli/WriterStreamConsumer.java b/src/main/java/org/codehaus/plexus/util/cli/WriterStreamConsumer.java index 6898cc09..ed24136e 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/WriterStreamConsumer.java +++ b/src/main/java/org/codehaus/plexus/util/cli/WriterStreamConsumer.java @@ -21,7 +21,7 @@ /** * @author Jason van Zyl - * @version $Id$ + * */ public class WriterStreamConsumer implements StreamConsumer @@ -33,6 +33,7 @@ public WriterStreamConsumer( Writer writer ) this.writer = new PrintWriter( writer ); } + @Override public void consumeLine( String line ) { writer.println( line ); diff --git a/src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java b/src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java index 18e52838..089bc6fd 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java +++ b/src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java @@ -17,35 +17,17 @@ */ import org.codehaus.plexus.util.Os; -import org.codehaus.plexus.util.StringUtils; import java.util.ArrayList; import java.util.List; /** * @author Jason van Zyl - * @version $Id$ + * */ public class BourneShell extends Shell { - private static final char[] BASH_QUOTING_TRIGGER_CHARS = { - ' ', - '$', - ';', - '&', - '|', - '<', - '>', - '*', - '?', - '(', - ')', - '[', - ']', - '{', - '}', - '`' }; public BourneShell() { @@ -54,12 +36,14 @@ public BourneShell() public BourneShell( boolean isLoginShell ) { + setUnconditionalQuoting( true ); setShellCommand( "/bin/sh" ); setArgumentQuoteDelimiter( '\'' ); - setExecutableQuoteDelimiter( '\"' ); + setExecutableQuoteDelimiter( '\'' ); setSingleQuotedArgumentEscaped( true ); setSingleQuotedExecutableEscaped( false ); setQuotedExecutableEnabled( true ); + setArgumentEscapePattern( "'\\%s'" ); if ( isLoginShell ) { @@ -68,6 +52,7 @@ public BourneShell( boolean isLoginShell ) } /** {@inheritDoc} */ + @Override public String getExecutable() { if ( Os.isFamily( Os.FAMILY_WINDOWS ) ) @@ -75,13 +60,14 @@ public String getExecutable() return super.getExecutable(); } - return unifyQuotes( super.getExecutable()); + return quoteOneItem( super.getOriginalExecutable(), true ); } - public List getShellArgsList() + @Override + public List getShellArgsList() { - List shellArgs = new ArrayList(); - List existingShellArgs = super.getShellArgsList(); + List shellArgs = new ArrayList(); + List existingShellArgs = super.getShellArgsList(); if ( ( existingShellArgs != null ) && !existingShellArgs.isEmpty() ) { @@ -93,6 +79,7 @@ public List getShellArgsList() return shellArgs; } + @Override public String[] getShellArgs() { String[] shellArgs = super.getShellArgs(); @@ -114,6 +101,7 @@ public String[] getShellArgs() return shellArgs; } + @Override protected String getExecutionPreamble() { if ( getWorkingDirectoryAsString() == null ) @@ -122,49 +110,47 @@ protected String getExecutionPreamble() } String dir = getWorkingDirectoryAsString(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append( "cd " ); - sb.append( unifyQuotes( dir ) ); + sb.append( quoteOneItem( dir, false ) ); sb.append( " && " ); return sb.toString(); } - protected char[] getQuotingTriggerChars() - { - return BASH_QUOTING_TRIGGER_CHARS; - } - /** - *

            Unify quotes in a path for the Bourne Shell.

            + *

            + * Unify quotes in a path for the Bourne Shell. + *

            * *
            -     * BourneShell.unifyQuotes(null)                       = null
            -     * BourneShell.unifyQuotes("")                         = (empty)
            -     * BourneShell.unifyQuotes("/test/quotedpath'abc")     = /test/quotedpath\'abc
            -     * BourneShell.unifyQuotes("/test/quoted path'abc")    = "/test/quoted path'abc"
            -     * BourneShell.unifyQuotes("/test/quotedpath\"abc")    = "/test/quotedpath\"abc"
            -     * BourneShell.unifyQuotes("/test/quoted path\"abc")   = "/test/quoted path\"abc"
            -     * BourneShell.unifyQuotes("/test/quotedpath\"'abc")   = "/test/quotedpath\"'abc"
            -     * BourneShell.unifyQuotes("/test/quoted path\"'abc")  = "/test/quoted path\"'abc"
            +     * BourneShell.quoteOneItem(null)                       = null
            +     * BourneShell.quoteOneItem("")                         = ''
            +     * BourneShell.quoteOneItem("/test/quotedpath'abc")     = '/test/quotedpath'"'"'abc'
            +     * BourneShell.quoteOneItem("/test/quoted path'abc")    = '/test/quoted pat'"'"'habc'
            +     * BourneShell.quoteOneItem("/test/quotedpath\"abc")    = '/test/quotedpath"abc'
            +     * BourneShell.quoteOneItem("/test/quoted path\"abc")   = '/test/quoted path"abc'
            +     * BourneShell.quoteOneItem("/test/quotedpath\"'abc")   = '/test/quotedpath"'"'"'abc'
            +     * BourneShell.quoteOneItem("/test/quoted path\"'abc")  = '/test/quoted path"'"'"'abc'
                  * 
            * * @param path not null path. * @return the path unified correctly for the Bourne shell. */ - protected static String unifyQuotes( String path ) + @Override + protected String quoteOneItem( String path, boolean isExecutable ) { if ( path == null ) { return null; } - if ( path.indexOf( " " ) == -1 && path.indexOf( "'" ) != -1 && path.indexOf( "\"" ) == -1 ) - { - return StringUtils.escape( path ); - } + StringBuilder sb = new StringBuilder(); + sb.append( "'" ); + sb.append( path.replace( "'", "'\"'\"'" ) ); + sb.append( "'" ); - return StringUtils.quoteAndEscape( path, '\"', BASH_QUOTING_TRIGGER_CHARS ); + return sb.toString(); } } diff --git a/src/main/java/org/codehaus/plexus/util/cli/shell/CmdShell.java b/src/main/java/org/codehaus/plexus/util/cli/shell/CmdShell.java index 28a2149f..aa0af43a 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/shell/CmdShell.java +++ b/src/main/java/org/codehaus/plexus/util/cli/shell/CmdShell.java @@ -26,7 +26,7 @@ * * @author Carlos Sanchez * @since 1.2 - * @version $Id$ + * */ public class CmdShell extends Shell @@ -35,7 +35,7 @@ public CmdShell() { setShellCommand( "cmd.exe" ); setQuotedExecutableEnabled( true ); - setShellArgs( new String[]{"/X", "/C"} ); + setShellArgs( new String[] { "/X", "/C" } ); } /** @@ -71,15 +71,15 @@ public CmdShell() * remove the last quote character on the command line, preserving * any text after the last quote character. * - * - *

            - * Always quoting the entire command line, regardless of these conditions - * appears to make Windows processes invoke successfully. + *

            + * Always quoting the entire command line, regardless of these conditions appears to make Windows processes invoke + * successfully. *

            */ - public List getCommandLine( String executable, String[] arguments ) + @Override + public List getCommandLine( String executable, String[] arguments ) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append( "\"" ); sb.append( super.getCommandLine( executable, arguments ).get( 0 ) ); sb.append( "\"" ); diff --git a/src/main/java/org/codehaus/plexus/util/cli/shell/CommandShell.java b/src/main/java/org/codehaus/plexus/util/cli/shell/CommandShell.java index 2a07c424..4aa4c2af 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/shell/CommandShell.java +++ b/src/main/java/org/codehaus/plexus/util/cli/shell/CommandShell.java @@ -23,7 +23,7 @@ * * @author Carlos Sanchez * @since 1.2 - * @version $Id$ + * */ public class CommandShell extends Shell @@ -31,7 +31,7 @@ public class CommandShell public CommandShell() { setShellCommand( "command.com" ); - setShellArgs( new String[]{"/C"} ); + setShellArgs( new String[] { "/C" } ); } } diff --git a/src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java b/src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java index 6e264cef..c3c911dd 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java +++ b/src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java @@ -24,18 +24,15 @@ import java.util.List; /** - *

            - * Class that abstracts the Shell functionality, - * with subclases for shells that behave particularly, like + * Class that abstracts the Shell functionality, with subclasses for shells that behave particularly, like *

              *
            • command.com
            • *
            • cmd.exe
            • *
            - *

            * * @author Carlos Sanchez * @since 1.2 - * @version $Id$ + * */ public class Shell implements Cloneable @@ -44,10 +41,12 @@ public class Shell private String shellCommand; - private List shellArgs = new ArrayList(); + private List shellArgs = new ArrayList(); private boolean quotedArgumentsEnabled = true; + private boolean unconditionallyQuote = false; + private String executable; private String workingDir; @@ -66,10 +65,22 @@ public class Shell private char exeQuoteDelimiter = '\"'; + private String argumentEscapePattern = "\\%s"; + + /** + * Toggle unconditional quoting + * + * @param unconditionallyQuote see name + */ + public void setUnconditionalQuoting( boolean unconditionallyQuote ) + { + this.unconditionallyQuote = unconditionallyQuote; + } + /** * Set the command to execute the shell (eg. COMMAND.COM, /bin/bash,...) * - * @param shellCommand + * @param shellCommand see name */ public void setShellCommand( String shellCommand ) { @@ -79,7 +90,7 @@ public void setShellCommand( String shellCommand ) /** * Get the command to execute the shell * - * @return + * @return the command */ public String getShellCommand() { @@ -87,10 +98,9 @@ public String getShellCommand() } /** - * Set the shell arguments when calling a command line (not the executable arguments) - * (eg. /X /C for CMD.EXE) + * Set the shell arguments when calling a command line (not the executable arguments) (eg. /X /C for CMD.EXE) * - * @param shellArgs + * @param shellArgs see name */ public void setShellArgs( String[] shellArgs ) { @@ -99,9 +109,7 @@ public void setShellArgs( String[] shellArgs ) } /** - * Get the shell arguments - * - * @return + * @return the shell arguments */ public String[] getShellArgs() { @@ -111,7 +119,7 @@ public String[] getShellArgs() } else { - return (String[]) shellArgs.toArray( new String[shellArgs.size()] ); + return shellArgs.toArray( new String[0] ); } } @@ -119,18 +127,26 @@ public String[] getShellArgs() * Get the command line for the provided executable and arguments in this shell * * @param executable executable that the shell has to call - * @param arguments arguments for the executable, not the shell + * @param arguments arguments for the executable, not the shell * @return List with one String object with executable and arguments quoted as needed */ - public List getCommandLine( String executable, String[] arguments ) + public List getCommandLine( String executable, String[] arguments ) { return getRawCommandLine( executable, arguments ); } - protected List getRawCommandLine( String executable, String[] arguments ) + protected String quoteOneItem( String inputString, boolean isExecutable ) { - List commandLine = new ArrayList(); - StringBuffer sb = new StringBuffer(); + char[] escapeChars = getEscapeChars( isSingleQuotedExecutableEscaped(), isDoubleQuotedExecutableEscaped() ); + return StringUtils.quoteAndEscape( inputString, + isExecutable ? getExecutableQuoteDelimiter() : getArgumentQuoteDelimiter(), + escapeChars, getQuotingTriggerChars(), '\\', unconditionallyQuote ); + } + + protected List getRawCommandLine( String executable, String[] arguments ) + { + List commandLine = new ArrayList(); + StringBuilder sb = new StringBuilder(); if ( executable != null ) { @@ -142,16 +158,14 @@ protected List getRawCommandLine( String executable, String[] arguments ) if ( isQuotedExecutableEnabled() ) { - char[] escapeChars = getEscapeChars( isSingleQuotedExecutableEscaped(), isDoubleQuotedExecutableEscaped() ); - - sb.append( StringUtils.quoteAndEscape( getExecutable(), getExecutableQuoteDelimiter(), escapeChars, getQuotingTriggerChars(), '\\', false ) ); + sb.append( quoteOneItem( getOriginalExecutable(), true ) ); } else { sb.append( getExecutable() ); } } - for ( int i = 0; i < arguments.length; i++ ) + for ( String argument : arguments ) { if ( sb.length() > 0 ) { @@ -160,13 +174,11 @@ protected List getRawCommandLine( String executable, String[] arguments ) if ( isQuotedArgumentsEnabled() ) { - char[] escapeChars = getEscapeChars( isSingleQuotedExecutableEscaped(), isDoubleQuotedExecutableEscaped() ); - - sb.append( StringUtils.quoteAndEscape( arguments[i], getArgumentQuoteDelimiter(), escapeChars, getQuotingTriggerChars(), '\\', false ) ); + sb.append( quoteOneItem( argument, false ) ); } else { - sb.append( arguments[i] ); + sb.append( argument ); } } @@ -187,7 +199,7 @@ protected String getExecutionPreamble() protected char[] getEscapeChars( boolean includeSingleQuote, boolean includeDoubleQuote ) { - StringBuffer buf = new StringBuffer( 2 ); + StringBuilder buf = new StringBuilder( 2 ); if ( includeSingleQuote ) { buf.append( '\'' ); @@ -244,18 +256,28 @@ protected char getExecutableQuoteDelimiter() return exeQuoteDelimiter; } + protected void setArgumentEscapePattern( String argumentEscapePattern ) + { + this.argumentEscapePattern = argumentEscapePattern; + } + + protected String getArgumentEscapePattern() + { + return argumentEscapePattern; + } + /** - * Get the full command line to execute, including shell command, shell arguments, - * executable and executable arguments + * Get the full command line to execute, including shell command, shell arguments, executable and executable + * arguments * - * @param arguments arguments for the executable, not the shell - * @return List of String objects, whose array version is suitable to be used as argument - * of Runtime.getRuntime().exec() + * @param arguments arguments for the executable, not the shell + * @return List of String objects, whose array version is suitable to be used as argument of + * Runtime.getRuntime().exec() */ - public List getShellCommandLine( String[] arguments ) + public List getShellCommandLine( String[] arguments ) { - List commandLine = new ArrayList(); + List commandLine = new ArrayList(); if ( getShellCommand() != null ) { @@ -267,13 +289,13 @@ public List getShellCommandLine( String[] arguments ) commandLine.addAll( getShellArgsList() ); } - commandLine.addAll( getCommandLine( getExecutable(), arguments ) ); + commandLine.addAll( getCommandLine( getOriginalExecutable(), arguments ) ); return commandLine; } - public List getShellArgsList() + public List getShellArgsList() { return shellArgs; } @@ -304,7 +326,8 @@ public boolean isQuotedExecutableEnabled() } /** - * Sets the executable to run. + * + * @param executable Sets the executable to run. */ public void setExecutable( String executable ) { @@ -321,7 +344,7 @@ public String getExecutable() } /** - * Sets execution directory. + * @param path Sets execution directory. */ public void setWorkingDirectory( String path ) { @@ -332,7 +355,7 @@ public void setWorkingDirectory( String path ) } /** - * Sets execution directory. + * @param workingDir Sets execution directory. */ public void setWorkingDirectory( File workingDir ) { @@ -357,6 +380,7 @@ public void clearArguments() shellArgs.clear(); } + @Override public Object clone() { Shell shell = new Shell(); @@ -371,7 +395,7 @@ public String getOriginalExecutable() return executable; } - public List getOriginalCommandLine( String executable, String[] arguments ) + public List getOriginalCommandLine( String executable, String[] arguments ) { return getRawCommandLine( executable, arguments ); } @@ -395,5 +419,4 @@ protected void setSingleQuotedExecutableEscaped( boolean singleQuotedExecutableE { this.singleQuotedExecutableEscaped = singleQuotedExecutableEscaped; } - } diff --git a/src/main/java/org/codehaus/plexus/util/dag/CycleDetectedException.java b/src/main/java/org/codehaus/plexus/util/dag/CycleDetectedException.java index 55287d0d..e350af9d 100644 --- a/src/main/java/org/codehaus/plexus/util/dag/CycleDetectedException.java +++ b/src/main/java/org/codehaus/plexus/util/dag/CycleDetectedException.java @@ -20,11 +20,11 @@ import java.util.List; public class CycleDetectedException - extends Exception + extends Exception { - private List cycle; + private List cycle; - public CycleDetectedException( final String message, final List cycle ) + public CycleDetectedException( final String message, final List cycle ) { super( message ); @@ -32,20 +32,16 @@ public CycleDetectedException( final String message, final List cycle ) } - - public List getCycle() + public List getCycle() { return cycle; } - /** - * @return - */ public String cycleToString() { - final StringBuffer buffer = new StringBuffer(); + final StringBuilder buffer = new StringBuilder(); - for ( Iterator iterator = cycle.iterator(); iterator.hasNext(); ) + for ( Iterator iterator = cycle.iterator(); iterator.hasNext(); ) { buffer.append( iterator.next() ); @@ -57,6 +53,7 @@ public String cycleToString() return buffer.toString(); } + @Override public String getMessage() { return super.getMessage() + " " + cycleToString(); diff --git a/src/main/java/org/codehaus/plexus/util/dag/CycleDetector.java b/src/main/java/org/codehaus/plexus/util/dag/CycleDetector.java index 4f26c61b..6f810043 100644 --- a/src/main/java/org/codehaus/plexus/util/dag/CycleDetector.java +++ b/src/main/java/org/codehaus/plexus/util/dag/CycleDetector.java @@ -18,37 +18,33 @@ import java.util.Collections; import java.util.HashMap; -import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; /** * @author Michal Maczka - * @version $Id$ + * */ public class CycleDetector { - private final static Integer NOT_VISTITED = new Integer( 0 ); - - private final static Integer VISITING = new Integer( 1 ); + private final static Integer NOT_VISITED = 0; - private final static Integer VISITED = new Integer( 2 ); + private final static Integer VISITING = 1; + private final static Integer VISITED = 2; - public static List hasCycle( final DAG graph ) + public static List hasCycle( final DAG graph ) { - final List verticies = graph.getVerticies(); + final List vertices = graph.getVertices(); - final Map vertexStateMap = new HashMap(); + final Map vertexStateMap = new HashMap<>(); - List retValue = null; + List retValue = null; - for ( final Iterator iter = verticies.iterator(); iter.hasNext(); ) + for ( Vertex vertex : vertices ) { - final Vertex vertex = ( Vertex ) iter.next(); - if ( isNotVisited( vertex, vertexStateMap ) ) { retValue = introducesCycle( vertex, vertexStateMap ); @@ -61,38 +57,35 @@ public static List hasCycle( final DAG graph ) } return retValue; - } - /** - * This method will be called when an egde leading to given vertex was added - * and we want to check if introduction of this edge has not resulted - * in apparition of cycle in the graph + * This method will be called when an edge leading to given vertex was added and we want to check if introduction of + * this edge has not resulted in apparition of cycle in the graph * - * @param vertex - * @param vertexStateMap - * @return + * @param vertex the vertex + * @param vertexStateMap the vertex Map + * @return the found cycle */ - public static List introducesCycle( final Vertex vertex, final Map vertexStateMap ) + public static List introducesCycle( final Vertex vertex, final Map vertexStateMap ) { - final LinkedList cycleStack = new LinkedList(); + final LinkedList cycleStack = new LinkedList<>(); final boolean hasCycle = dfsVisit( vertex, cycleStack, vertexStateMap ); if ( hasCycle ) { // we have a situation like: [b, a, c, d, b, f, g, h]. - // Label of Vertex which introduced the cycle is at the first position in the list - // We have to find second occurence of this label and use its position in the list - // for getting the sublist of vertex labels of cycle paricipants + // Label of Vertex which introduced the cycle is at the first position in the list + // We have to find second occurrence of this label and use its position in the list + // for getting the sublist of vertex labels of cycle participants // - // So in our case we are seraching for [b, a, c, d, b] - final String label = ( String ) cycleStack.getFirst(); + // So in our case we are searching for [b, a, c, d, b] + final String label = cycleStack.getFirst(); final int pos = cycleStack.lastIndexOf( label ); - final List cycle = cycleStack.subList( 0, pos + 1 ); + final List cycle = cycleStack.subList( 0, pos + 1 ); Collections.reverse( cycle ); @@ -102,57 +95,36 @@ public static List introducesCycle( final Vertex vertex, final Map vertexStateMa return null; } - - public static List introducesCycle( final Vertex vertex ) + public static List introducesCycle( final Vertex vertex ) { - - final Map vertexStateMap = new HashMap(); + final Map vertexStateMap = new HashMap<>(); return introducesCycle( vertex, vertexStateMap ); - } - /** - * @param vertex - * @param vertexStateMap - * @return - */ - private static boolean isNotVisited( final Vertex vertex, final Map vertexStateMap ) + private static boolean isNotVisited( final Vertex vertex, final Map vertexStateMap ) { - if ( !vertexStateMap.containsKey( vertex ) ) - { - return true; - } - - final Integer state = ( Integer ) vertexStateMap.get( vertex ); + final Integer state = vertexStateMap.get( vertex ); - return NOT_VISTITED.equals( state ); + return ( state == null ) || NOT_VISITED.equals( state ); } - /** - * @param vertex - * @param vertexStateMap - * @return - */ - private static boolean isVisiting( final Vertex vertex, final Map vertexStateMap ) + private static boolean isVisiting( final Vertex vertex, final Map vertexStateMap ) { - final Integer state = ( Integer ) vertexStateMap.get( vertex ); + final Integer state = vertexStateMap.get( vertex ); return VISITING.equals( state ); } - private static boolean dfsVisit( final Vertex vertex, final LinkedList cycle, final Map vertexStateMap ) + private static boolean dfsVisit( final Vertex vertex, final LinkedList cycle, + final Map vertexStateMap ) { cycle.addFirst( vertex.getLabel() ); vertexStateMap.put( vertex, VISITING ); - final List verticies = vertex.getChildren(); - - for ( final Iterator iter = verticies.iterator(); iter.hasNext(); ) + for ( Vertex v : vertex.getChildren() ) { - final Vertex v = ( Vertex ) iter.next(); - if ( isNotVisited( v, vertexStateMap ) ) { final boolean hasCycle = dfsVisit( v, cycle, vertexStateMap ); @@ -174,9 +146,6 @@ else if ( isVisiting( v, vertexStateMap ) ) cycle.removeFirst(); return false; - } - - -} \ No newline at end of file +} diff --git a/src/main/java/org/codehaus/plexus/util/dag/DAG.java b/src/main/java/org/codehaus/plexus/util/dag/DAG.java index 89c23b68..4d0f9a45 100644 --- a/src/main/java/org/codehaus/plexus/util/dag/DAG.java +++ b/src/main/java/org/codehaus/plexus/util/dag/DAG.java @@ -27,27 +27,27 @@ * DAG = Directed Acyclic Graph * * @author Michal Maczka - * @version $Id$ - * @todo this class should be reanmed from DAG to Dag + * + * TODO this class should be renamed from DAG to Dag */ -public class DAG implements Cloneable, Serializable +public class DAG + implements Cloneable, Serializable { - //------------------------------------------------------------ - //Fields - //------------------------------------------------------------ + // ------------------------------------------------------------ + // Fields + // ------------------------------------------------------------ /** - * Nodes will be kept in two data strucures at the same time - * for faster processing + * Nodes will be kept in two data structures at the same time for faster processing */ /** * Maps vertex's label to vertex */ - private Map vertexMap = new HashMap(); + private Map vertexMap = new HashMap<>(); /** - * Conatin list of all verticies + * Conatin list of all vertices */ - private List vertexList = new ArrayList(); + private List vertexList = new ArrayList<>(); // ------------------------------------------------------------ // Constructors @@ -66,19 +66,26 @@ public DAG() // ------------------------------------------------------------ /** - * @return + * @return the vertices */ - public List getVerticies() + public List getVertices() { return vertexList; } - - public Set getLabels() + /** + * @deprecated instead use {@link #getVertices()} + * @return the vertices + */ + @Deprecated + public List getVerticies() { - final Set retValue = vertexMap.keySet(); + return getVertices(); + } - return retValue; + public Set getLabels() + { + return vertexMap.keySet(); } // ------------------------------------------------------------ @@ -86,21 +93,20 @@ public Set getLabels() // ------------------------------------------------------------ /** - * Adds vertex to DAG. If vertex of given label alredy exist in DAG - * no vertex is added + * Adds vertex to DAG. If vertex of given label already exist in DAG no vertex is added * - * @param label The lable of the Vertex - * @return New vertex if vertext of given label was not presenst in the DAG - * or exising vertex if vertex of given labale was alredy added to DAG + * @param label The label of the Vertex + * @return New vertex if vertex of given label was not present in the DAG or existing vertex if vertex of given + * label was already added to DAG */ public Vertex addVertex( final String label ) { Vertex retValue = null; - // check if vertex is alredy in DAG + // check if vertex is already in DAG if ( vertexMap.containsKey( label ) ) { - retValue = ( Vertex ) vertexMap.get( label ); + retValue = vertexMap.get( label ); } else { @@ -114,7 +120,8 @@ public Vertex addVertex( final String label ) return retValue; } - public void addEdge( final String from, final String to ) throws CycleDetectedException + public void addEdge( final String from, final String to ) + throws CycleDetectedException { final Vertex v1 = addVertex( from ); @@ -123,14 +130,15 @@ public void addEdge( final String from, final String to ) throws CycleDetectedEx addEdge( v1, v2 ); } - public void addEdge( final Vertex from, final Vertex to ) throws CycleDetectedException + public void addEdge( final Vertex from, final Vertex to ) + throws CycleDetectedException { from.addEdgeTo( to ); to.addEdgeFrom( from ); - final List cycle = CycleDetector.introducesCycle( to ); + final List cycle = CycleDetector.introducesCycle( to ); if ( cycle != null ) { @@ -144,7 +152,6 @@ public void addEdge( final Vertex from, final Vertex to ) throws CycleDetectedEx } } - public void removeEdge( final String from, final String to ) { final Vertex v1 = addVertex( from ); @@ -161,10 +168,9 @@ public void removeEdge( final Vertex from, final Vertex to ) to.removeEdgeFrom( from ); } - public Vertex getVertex( final String label ) { - final Vertex retValue = ( Vertex ) vertexMap.get( label ); + final Vertex retValue = vertexMap.get( label ); return retValue; } @@ -182,10 +188,10 @@ public boolean hasEdge( final String label1, final String label2 ) } /** - * @param label - * @return + * @param label see name + * @return the childs */ - public List getChildLabels( final String label ) + public List getChildLabels( final String label ) { final Vertex vertex = getVertex( label ); @@ -193,21 +199,22 @@ public List getChildLabels( final String label ) } /** - * @param label - * @return + * @param label see name + * @return the parents */ - public List getParentLabels( final String label ) + public List getParentLabels( final String label ) { final Vertex vertex = getVertex( label ); return vertex.getParentLabels(); } - /** * @see java.lang.Object#clone() */ - public Object clone() throws CloneNotSupportedException + @Override + public Object clone() + throws CloneNotSupportedException { // this is what's failing.. final Object retValue = super.clone(); @@ -215,11 +222,10 @@ public Object clone() throws CloneNotSupportedException return retValue; } - /** * Indicates if there is at least one edge leading to or from vertex of given label - * - * @return true if this vertex is connected with other vertex,false otherwise + * @param label the label + * @return true if this vertex is connected with other vertex,false otherwise */ public boolean isConnected( final String label ) { @@ -231,26 +237,23 @@ public boolean isConnected( final String label ) } - /** * Return the list of labels of successor in order decided by topological sort * - * @param label The label of the vertex whose predessors are serched - * - * @return The list of labels. Returned list contains also - * the label passed as parameter to this method. This label should - * always be the last item in the list. + * @param label The label of the vertex whose predecessors are searched + * @return The list of labels. Returned list contains also the label passed as parameter to this method. This label + * should always be the last item in the list. */ - public List getSuccessorLabels( final String label ) + public List getSuccessorLabels( final String label ) { final Vertex vertex = getVertex( label ); - final List retValue; + final List retValue; - //optimization. + // optimization. if ( vertex.isLeaf() ) { - retValue = new ArrayList( 1 ); + retValue = new ArrayList<>( 1 ); retValue.add( label ); } @@ -262,5 +265,4 @@ public List getSuccessorLabels( final String label ) return retValue; } - } diff --git a/src/main/java/org/codehaus/plexus/util/dag/TopologicalSorter.java b/src/main/java/org/codehaus/plexus/util/dag/TopologicalSorter.java index 4a5f30d1..b2736255 100644 --- a/src/main/java/org/codehaus/plexus/util/dag/TopologicalSorter.java +++ b/src/main/java/org/codehaus/plexus/util/dag/TopologicalSorter.java @@ -17,60 +17,50 @@ */ import java.util.HashMap; -import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; /** * @author Michal Maczka - * @version $Id$ + * */ public class TopologicalSorter { - private final static Integer NOT_VISTITED = new Integer( 0 ); + private final static Integer NOT_VISITED = 0; - private final static Integer VISITING = new Integer( 1 ); + private final static Integer VISITING = 1; - private final static Integer VISITED = new Integer( 2 ); + private final static Integer VISITED = 2; /** - * @param graph + * @param graph the graph * @return List of String (vertex labels) */ - - public static List sort( final DAG graph ) + public static List sort( final DAG graph ) { return dfs( graph ); } - public static List sort( final Vertex vertex ) + public static List sort( final Vertex vertex ) { // we need to use addFirst method so we will use LinkedList explicitly - final LinkedList retValue = new LinkedList(); + final List retValue = new LinkedList<>(); - final Map vertexStateMap = new HashMap(); - - dfsVisit( vertex, vertexStateMap, retValue ); + dfsVisit( vertex, new HashMap(), retValue ); return retValue; } - - private static List dfs( final DAG graph ) + private static List dfs( final DAG graph ) { - final List verticies = graph.getVerticies(); - // we need to use addFirst method so we will use LinkedList explicitly - final LinkedList retValue = new LinkedList(); - - final Map vertexStateMap = new HashMap(); + final List retValue = new LinkedList<>(); + final Map vertexStateMap = new HashMap<>(); - for ( final Iterator iter = verticies.iterator(); iter.hasNext(); ) + for ( Vertex vertex : graph.getVertices() ) { - final Vertex vertex = ( Vertex ) iter.next(); - if ( isNotVisited( vertex, vertexStateMap ) ) { dfsVisit( vertex, vertexStateMap, retValue ); @@ -80,33 +70,20 @@ private static List dfs( final DAG graph ) return retValue; } - /** - * @param vertex - * @param vertexStateMap - * @return - */ - private static boolean isNotVisited( final Vertex vertex, final Map vertexStateMap ) + private static boolean isNotVisited( final Vertex vertex, final Map vertexStateMap ) { - if ( !vertexStateMap.containsKey( vertex ) ) - { - return true; - } - final Integer state = ( Integer ) vertexStateMap.get( vertex ); + final Integer state = vertexStateMap.get( vertex ); - return NOT_VISTITED.equals( state ); + return ( state == null ) || NOT_VISITED.equals( state ); } - - private static void dfsVisit( final Vertex vertex, final Map vertexStateMap, final LinkedList list ) + private static void dfsVisit( final Vertex vertex, final Map vertexStateMap, + final List list ) { vertexStateMap.put( vertex, VISITING ); - final List verticies = vertex.getChildren(); - - for ( final Iterator iter = verticies.iterator(); iter.hasNext(); ) + for ( Vertex v : vertex.getChildren() ) { - final Vertex v = ( Vertex ) iter.next(); - if ( isNotVisited( v, vertexStateMap ) ) { dfsVisit( v, vertexStateMap, list ); @@ -119,4 +96,3 @@ private static void dfsVisit( final Vertex vertex, final Map vertexStateMap, fin } } - diff --git a/src/main/java/org/codehaus/plexus/util/dag/Vertex.java b/src/main/java/org/codehaus/plexus/util/dag/Vertex.java index 873c430c..489b6185 100644 --- a/src/main/java/org/codehaus/plexus/util/dag/Vertex.java +++ b/src/main/java/org/codehaus/plexus/util/dag/Vertex.java @@ -18,32 +18,28 @@ import java.io.Serializable; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; /** * @author Michal Maczka - * @version $Id$ + * */ -public class Vertex implements Cloneable, Serializable +public class Vertex + implements Cloneable, Serializable { - //------------------------------------------------------------ - //Fields - //------------------------------------------------------------ + // ------------------------------------------------------------ + // Fields + // ------------------------------------------------------------ private String label = null; - List children = new ArrayList(); - - List parents = new ArrayList(); + List children = new ArrayList<>(); + List parents = new ArrayList<>(); // ------------------------------------------------------------ // Constructors // ------------------------------------------------------------ - /** - * - */ public Vertex( final String label ) { this.label = label; @@ -53,36 +49,21 @@ public Vertex( final String label ) // Accessors // ------------------------------------------------------------ - - /** - * @return - */ public String getLabel() { return label; } - /** - * @param vertex - */ public void addEdgeTo( final Vertex vertex ) { children.add( vertex ); } - - /** - * @param vertex - */ public void removeEdgeTo( final Vertex vertex ) { children.remove( vertex ); } - - /** - * @param vertex - */ public void addEdgeFrom( final Vertex vertex ) { parents.add( vertex ); @@ -90,101 +71,89 @@ public void addEdgeFrom( final Vertex vertex ) public void removeEdgeFrom( final Vertex vertex ) { - parents.remove( vertex ); - } - - public List getChildren() + public List getChildren() { return children; } - /** * Get the labels used by the most direct children. * * @return the labels used by the most direct children. */ - public List getChildLabels() + public List getChildLabels() { - final List retValue = new ArrayList( children.size() ); + final List retValue = new ArrayList<>( children.size() ); - for ( final Iterator iter = children.iterator(); iter.hasNext(); ) + for ( Vertex vertex : children ) { - final Vertex vertex = ( Vertex ) iter.next(); - retValue.add( vertex.getLabel() ); } return retValue; } - /** * Get the list the most direct ancestors (parents). * * @return list of parents */ - public List getParents() + public List getParents() { return parents; } - /** * Get the labels used by the most direct ancestors (parents). * * @return the labels used parents */ - public List getParentLabels() + public List getParentLabels() { - final List retValue = new ArrayList( parents.size() ); + final List retValue = new ArrayList<>( parents.size() ); - for ( final Iterator iter = parents.iterator(); iter.hasNext(); ) + for ( Vertex vertex : parents ) { - final Vertex vertex = ( Vertex ) iter.next(); - retValue.add( vertex.getLabel() ); } return retValue; } - /** * Indicates if given vertex has no child * - * @return true if this vertex has no child, false otherwise + * @return true if this vertex has no child, false otherwise */ public boolean isLeaf() { return children.size() == 0; } - /** * Indicates if given vertex has no parent * - * @return true if this vertex has no parent, false otherwise + * @return true if this vertex has no parent, false otherwise */ public boolean isRoot() { return parents.size() == 0; } - /** * Indicates if there is at least one edee leading to or from given vertex * - * @return true if this vertex is connected with other vertex,false otherwise + * @return true if this vertex is connected with other vertex,false otherwise */ public boolean isConnected() { return isRoot() || isLeaf(); } - - public Object clone() throws CloneNotSupportedException + @Override + public Object clone() + throws CloneNotSupportedException { // this is what's failing.. final Object retValue = super.clone(); @@ -192,13 +161,10 @@ public Object clone() throws CloneNotSupportedException return retValue; } + @Override public String toString() { - return "Vertex{" + - "label='" + label + "'" + - "}"; + return "Vertex{" + "label='" + label + "'" + "}"; } - } - diff --git a/src/main/java/org/codehaus/plexus/util/interpolation/Interpolator.java b/src/main/java/org/codehaus/plexus/util/interpolation/Interpolator.java deleted file mode 100644 index fe83d4c4..00000000 --- a/src/main/java/org/codehaus/plexus/util/interpolation/Interpolator.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.plexus.util.interpolation; - -/* - * Copyright The Codehaus Foundation. - * - * Licensed 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. - */ - -/** - * Interpolator interface. Based on existing RegexBasedInterpolator interface. - * - * @author cstamas - * @deprecated Use plexus-interpolation APIs instead. - * @version $Id: $ - */ -public interface Interpolator - extends org.codehaus.plexus.interpolation.Interpolator -{ -} diff --git a/src/main/java/org/codehaus/plexus/util/interpolation/InterpolatorFilterReader.java b/src/main/java/org/codehaus/plexus/util/interpolation/InterpolatorFilterReader.java deleted file mode 100644 index 9ed44b97..00000000 --- a/src/main/java/org/codehaus/plexus/util/interpolation/InterpolatorFilterReader.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.util.interpolation; - -/* - * Copyright The Codehaus Foundation. - * - * Licensed 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. - */ - -import java.io.Reader; - -/** - * A FilterReader implementation, that works with Interpolator interface instead of it's own interpolation - * implementation. This implementation is heavily based on org.codehaus.plexus.util.InterpolationFilterReader. - * - * @author cstamas - * @deprecated Use plexus-interpolation APIs instead. - * @version $Id: $ - */ -public class InterpolatorFilterReader - extends org.codehaus.plexus.interpolation.InterpolatorFilterReader -{ - public InterpolatorFilterReader( Reader in, Interpolator interpolator ) - { - super( in, interpolator ); - } -} diff --git a/src/main/java/org/codehaus/plexus/util/interpolation/ObjectBasedValueSource.java b/src/main/java/org/codehaus/plexus/util/interpolation/ObjectBasedValueSource.java deleted file mode 100644 index bbcc3892..00000000 --- a/src/main/java/org/codehaus/plexus/util/interpolation/ObjectBasedValueSource.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.codehaus.plexus.util.interpolation; - -/* - * Copyright The Codehaus Foundation. - * - * Licensed 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 $Id$ - * @deprecated Use plexus-interpolation APIs instead. - */ -public class ObjectBasedValueSource - extends org.codehaus.plexus.interpolation.ObjectBasedValueSource -{ - public ObjectBasedValueSource( Object root ) - { - super( root ); - } -} diff --git a/src/main/java/org/codehaus/plexus/util/interpolation/PropertiesBasedValueSource.java b/src/main/java/org/codehaus/plexus/util/interpolation/PropertiesBasedValueSource.java deleted file mode 100644 index 5dfb3611..00000000 --- a/src/main/java/org/codehaus/plexus/util/interpolation/PropertiesBasedValueSource.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.util.interpolation; - -/* - * Copyright The Codehaus Foundation. - * - * Licensed 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. - */ - -import java.util.Properties; - -/** - * - * @author jdcasey - * @deprecated Use plexus-interpolation APIs instead. - * @version $Id$ - */ -public class PropertiesBasedValueSource - extends org.codehaus.plexus.interpolation.PropertiesBasedValueSource -{ - public PropertiesBasedValueSource( Properties properties ) - { - super( properties ); - } -} diff --git a/src/main/java/org/codehaus/plexus/util/interpolation/RegexBasedInterpolator.java b/src/main/java/org/codehaus/plexus/util/interpolation/RegexBasedInterpolator.java deleted file mode 100644 index 6b510128..00000000 --- a/src/main/java/org/codehaus/plexus/util/interpolation/RegexBasedInterpolator.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.codehaus.plexus.util.interpolation; - -/* - * Copyright The Codehaus Foundation. - * - * Licensed 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. - */ - -import java.util.List; - -/** - * - * @version $Id$ - * @deprecated Use plexus-interpolation APIs instead. - */ -public class RegexBasedInterpolator - extends org.codehaus.plexus.interpolation.RegexBasedInterpolator - implements Interpolator -{ - public RegexBasedInterpolator() - { - super(); - } - - public RegexBasedInterpolator( List valueSources ) - { - super( valueSources ); - } - - public RegexBasedInterpolator( String startRegex, - String endRegex, - List valueSources ) - { - super( startRegex, endRegex, valueSources ); - } - - public RegexBasedInterpolator( String startRegex, - String endRegex ) - { - super( startRegex, endRegex ); - } - - public void addValueSource( ValueSource valueSource ) - { - super.addValueSource( valueSource ); - } - - public void removeValuesSource( ValueSource valueSource ) - { - super.removeValuesSource( valueSource ); - } -} diff --git a/src/main/java/org/codehaus/plexus/util/interpolation/ValueSource.java b/src/main/java/org/codehaus/plexus/util/interpolation/ValueSource.java deleted file mode 100644 index 197ca7f0..00000000 --- a/src/main/java/org/codehaus/plexus/util/interpolation/ValueSource.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.util.interpolation; - -/* - * Copyright The Codehaus Foundation. - * - * Licensed 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. - */ - -/** - * - * @author jdcasey - * @deprecated Use plexus-interpolation APIs instead. - * @version $Id$ - */ -public interface ValueSource - extends org.codehaus.plexus.interpolation.ValueSource -{ -} diff --git a/src/main/java/org/codehaus/plexus/util/introspection/ClassMap.java b/src/main/java/org/codehaus/plexus/util/introspection/ClassMap.java index a8b06765..6e0c8be2 100644 --- a/src/main/java/org/codehaus/plexus/util/introspection/ClassMap.java +++ b/src/main/java/org/codehaus/plexus/util/introspection/ClassMap.java @@ -22,15 +22,14 @@ import java.util.Map; /** - * A cache of introspection information for a specific class instance. - * Keys {@link java.lang.Method} objects by a concatenation of the - * method name and the names of classes that make up the parameters. + * A cache of introspection information for a specific class instance. Keys {@link java.lang.reflect.Method} objects by + * a concatenation of the method name and the names of classes that make up the parameters. * * @author Jason van Zyl * @author Bob McWhirter * @author Attila Szegedi * @author Geir Magnusson Jr. - * @version $Id$ + * */ public class ClassMap { @@ -39,25 +38,25 @@ private static final class CacheMiss } private static final CacheMiss CACHE_MISS = new CacheMiss(); + private static final Object OBJECT = new Object(); /** - * Class passed into the constructor used to as - * the basis for the Method map. + * Class passed into the constructor used to as the basis for the Method map. */ - private Class clazz; + private final Class clazz; /** - * Cache of Methods, or CACHE_MISS, keyed by method - * name and actual arguments used to find it. + * Cache of Methods, or CACHE_MISS, keyed by method name and actual arguments used to find it. */ - private Map methodCache = new Hashtable(); + private Map methodCache = new Hashtable<>(); - private MethodMap methodMap = new MethodMap(); + private final MethodMap methodMap = new MethodMap(); /** * Standard constructor + * @param clazz the Class */ public ClassMap( Class clazz ) { @@ -74,16 +73,16 @@ Class getCachedClass() } /** - * Find a Method using the methodKey - * provided. - *

            - * Look in the methodMap for an entry. If found, - * it'll either be a CACHE_MISS, in which case we - * simply give up, or it'll be a Method, in which - * case, we return it. - *

            - * If nothing is found, then we must actually go - * and introspect the method from the MethodMap. + *

            Find a Method using the methodKey provided.

            + * + *

            Look in the methodMap for an entry. If found, it'll either be a CACHE_MISS, in which case we simply give up, or + * it'll be a Method, in which case, we return it.

            + * + *

            If nothing is found, then we must actually go and introspect the method from the MethodMap.

            + * @param name method name + * @param params method params + * @return the find Method or null + * @throws org.codehaus.plexus.util.introspection.MethodMap.AmbiguousException if ambiguous name */ public Method findMethod( String name, Object[] params ) throws MethodMap.AmbiguousException @@ -100,30 +99,26 @@ public Method findMethod( String name, Object[] params ) { try { - cacheEntry = methodMap.find( name, - params ); + cacheEntry = methodMap.find( name, params ); } catch ( MethodMap.AmbiguousException ae ) { /* - * that's a miss :) + * that's a miss :) */ - methodCache.put( methodKey, - CACHE_MISS ); + methodCache.put( methodKey, CACHE_MISS ); throw ae; } if ( cacheEntry == null ) { - methodCache.put( methodKey, - CACHE_MISS ); + methodCache.put( methodKey, CACHE_MISS ); } else { - methodCache.put( methodKey, - cacheEntry ); + methodCache.put( methodKey, cacheEntry ); } } @@ -133,16 +128,14 @@ public Method findMethod( String name, Object[] params ) } /** - * Populate the Map of direct hits. These - * are taken from all the public methods - * that our class provides. + * Populate the Map of direct hits. These are taken from all the public methods that our class provides. */ private void populateMethodCache() { StringBuffer methodKey; /* - * get all publicly accessible methods + * get all publicly accessible methods */ Method[] methods = getAccessibleMethods( clazz ); @@ -151,23 +144,19 @@ private void populateMethodCache() * map and cache them */ - for ( int i = 0; i < methods.length; i++ ) + for ( Method method : methods ) { - Method method = methods[i]; - /* - * now get the 'public method', the method declared by a - * public interface or class. (because the actual implementing - * class may be a facade... + * now get the 'public method', the method declared by a public interface or class. (because the actual + * implementing class may be a facade... */ Method publicMethod = getPublicMethod( method ); /* - * it is entirely possible that there is no public method for - * the methods of this class (i.e. in the facade, a method - * that isn't on any of the interfaces or superclass - * in which case, ignore it. Otherwise, map and cache + * it is entirely possible that there is no public method for the methods of this class (i.e. in the facade, + * a method that isn't on any of the interfaces or superclass in which case, ignore it. Otherwise, map and + * cache */ if ( publicMethod != null ) @@ -179,46 +168,58 @@ private void populateMethodCache() } /** - * Make a methodKey for the given method using - * the concatenation of the name and the - * types of the method parameters. + * Make a methodKey for the given method using the concatenation of the name and the types of the method parameters. */ private String makeMethodKey( Method method ) { Class[] parameterTypes = method.getParameterTypes(); - StringBuffer methodKey = new StringBuffer( method.getName() ); + StringBuilder methodKey = new StringBuilder( method.getName() ); - for ( int j = 0; j < parameterTypes.length; j++ ) + for ( Class parameterType : parameterTypes ) { /* - * If the argument type is primitive then we want - * to convert our primitive type signature to the - * corresponding Object type so introspection for - * methods with primitive types will work correctly. + * If the argument type is primitive then we want to convert our primitive type signature to the + * corresponding Object type so introspection for methods with primitive types will work correctly. */ - if ( parameterTypes[j].isPrimitive() ) + if ( parameterType.isPrimitive() ) { - if ( parameterTypes[j].equals( Boolean.TYPE ) ) + if ( parameterType.equals( Boolean.TYPE ) ) + { methodKey.append( "java.lang.Boolean" ); - else if ( parameterTypes[j].equals( Byte.TYPE ) ) + } + else if ( parameterType.equals( Byte.TYPE ) ) + { methodKey.append( "java.lang.Byte" ); - else if ( parameterTypes[j].equals( Character.TYPE ) ) + } + else if ( parameterType.equals( Character.TYPE ) ) + { methodKey.append( "java.lang.Character" ); - else if ( parameterTypes[j].equals( Double.TYPE ) ) + } + else if ( parameterType.equals( Double.TYPE ) ) + { methodKey.append( "java.lang.Double" ); - else if ( parameterTypes[j].equals( Float.TYPE ) ) + } + else if ( parameterType.equals( Float.TYPE ) ) + { methodKey.append( "java.lang.Float" ); - else if ( parameterTypes[j].equals( Integer.TYPE ) ) + } + else if ( parameterType.equals( Integer.TYPE ) ) + { methodKey.append( "java.lang.Integer" ); - else if ( parameterTypes[j].equals( Long.TYPE ) ) + } + else if ( parameterType.equals( Long.TYPE ) ) + { methodKey.append( "java.lang.Long" ); - else if ( parameterTypes[j].equals( Short.TYPE ) ) + } + else if ( parameterType.equals( Short.TYPE ) ) + { methodKey.append( "java.lang.Short" ); + } } else { - methodKey.append( parameterTypes[j].getName() ); + methodKey.append( parameterType.getName() ); } } @@ -227,11 +228,11 @@ else if ( parameterTypes[j].equals( Short.TYPE ) ) private static String makeMethodKey( String method, Object[] params ) { - StringBuffer methodKey = new StringBuffer().append( method ); + StringBuilder methodKey = new StringBuilder().append( method ); - for ( int j = 0; j < params.length; j++ ) + for ( Object param : params ) { - Object arg = params[j]; + Object arg = param; if ( arg == null ) { @@ -245,18 +246,16 @@ private static String makeMethodKey( String method, Object[] params ) } /** - * Retrieves public methods for a class. In case the class is not - * public, retrieves methods with same signature as its public methods - * from public superclasses and interfaces (if they exist). Basically - * upcasts every method to the nearest acccessible method. + * Retrieves public methods for a class. In case the class is not public, retrieves methods with same signature as + * its public methods from public superclasses and interfaces (if they exist). Basically upcasts every method to the + * nearest accessible method. */ private static Method[] getAccessibleMethods( Class clazz ) { Method[] methods = clazz.getMethods(); /* - * Short circuit for the (hopefully) majority of cases where the - * clazz is public + * Short circuit for the (hopefully) majority of cases where the clazz is public */ if ( Modifier.isPublic( clazz.getModifiers() ) ) @@ -265,7 +264,7 @@ private static Method[] getAccessibleMethods( Class clazz ) } /* - * No luck - the class is not public, so we're going the longer way. + * No luck - the class is not public, so we're going the longer way. */ MethodInfo[] methodInfos = new MethodInfo[methods.length]; @@ -278,7 +277,7 @@ private static Method[] getAccessibleMethods( Class clazz ) int upcastCount = getAccessibleMethods( clazz, methodInfos, 0 ); /* - * Reallocate array in case some method had no accessible counterpart. + * Reallocate array in case some method had no accessible counterpart. */ if ( upcastCount < methods.length ) @@ -287,9 +286,8 @@ private static Method[] getAccessibleMethods( Class clazz ) } int j = 0; - for ( int i = 0; i < methodInfos.length; ++i ) + for ( MethodInfo methodInfo : methodInfos ) { - MethodInfo methodInfo = methodInfos[i]; if ( methodInfo.upcast ) { methods[j++] = methodInfo.method; @@ -299,10 +297,10 @@ private static Method[] getAccessibleMethods( Class clazz ) } /** - * Recursively finds a match for each method, starting with the class, and then - * searching the superclass and interfaces. + * Recursively finds a match for each method, starting with the class, and then searching the superclass and + * interfaces. * - * @param clazz Class to check + * @param clazz Class to check * @param methodInfos array of methods we are searching to match * @param upcastCount current number of methods we have matched * @return count of matched methods @@ -312,8 +310,7 @@ private static int getAccessibleMethods( Class clazz, MethodInfo[] methodInfos, int l = methodInfos.length; /* - * if this class is public, then check each of the currently - * 'non-upcasted' methods to see if we have a match + * if this class is public, then check each of the currently 'non-upcasted' methods to see if we have a match */ if ( Modifier.isPublic( clazz.getModifiers() ) ) @@ -333,14 +330,13 @@ private static int getAccessibleMethods( Class clazz, MethodInfo[] methodInfos, catch ( NoSuchMethodException e ) { /* - * Intentionally ignored - it means - * it wasn't found in the current class + * Intentionally ignored - it means it wasn't found in the current class */ } } /* - * Short circuit if all methods were upcast + * Short circuit if all methods were upcast */ if ( upcastCount == l ) @@ -350,7 +346,7 @@ private static int getAccessibleMethods( Class clazz, MethodInfo[] methodInfos, } /* - * Examine superclass + * Examine superclass */ Class superclazz = clazz.getSuperclass(); @@ -360,7 +356,7 @@ private static int getAccessibleMethods( Class clazz, MethodInfo[] methodInfos, upcastCount = getAccessibleMethods( superclazz, methodInfos, upcastCount ); /* - * Short circuit if all methods were upcast + * Short circuit if all methods were upcast */ if ( upcastCount == l ) @@ -370,9 +366,8 @@ private static int getAccessibleMethods( Class clazz, MethodInfo[] methodInfos, } /* - * Examine interfaces. Note we do it even if superclazz == null. - * This is redundant as currently java.lang.Object does not implement - * any interfaces, however nothing guarantees it will not in future. + * Examine interfaces. Note we do it even if superclazz == null. This is redundant as currently java.lang.Object + * does not implement any interfaces, however nothing guarantees it will not in future. */ Class[] interfaces = clazz.getInterfaces(); @@ -382,7 +377,7 @@ private static int getAccessibleMethods( Class clazz, MethodInfo[] methodInfos, upcastCount = getAccessibleMethods( interfaces[i], methodInfos, upcastCount ); /* - * Short circuit if all methods were upcast + * Short circuit if all methods were upcast */ if ( upcastCount == l ) @@ -395,23 +390,20 @@ private static int getAccessibleMethods( Class clazz, MethodInfo[] methodInfos, } /** - * For a given method, retrieves its publicly accessible counterpart. - * This method will look for a method with same name - * and signature declared in a public superclass or implemented interface of this - * method's declaring class. This counterpart method is publicly callable. + * For a given method, retrieves its publicly accessible counterpart. This method will look for a method with same + * name and signature declared in a public superclass or implemented interface of this method's declaring class. + * This counterpart method is publicly callable. * * @param method a method whose publicly callable counterpart is requested. - * @return the publicly callable counterpart method. Note that if the parameter - * method is itself declared by a public class, this method is an identity - * function. + * @return the publicly callable counterpart method. Note that if the parameter method is itself declared by a + * public class, this method is an identity function. */ public static Method getPublicMethod( Method method ) { Class clazz = method.getDeclaringClass(); /* - * Short circuit for (hopefully the majority of) cases where the declaring - * class is public. + * Short circuit for (hopefully the majority of) cases where the declaring class is public. */ if ( ( clazz.getModifiers() & Modifier.PUBLIC ) != 0 ) @@ -423,17 +415,17 @@ public static Method getPublicMethod( Method method ) } /** - * Looks up the method with specified name and signature in the first public - * superclass or implemented interface of the class. + * Looks up the method with specified name and signature in the first public superclass or implemented interface of + * the class. * - * @param class the class whose method is sought - * @param name the name of the method + * @param clazz the class whose method is sought + * @param name the name of the method * @param paramTypes the classes of method parameters */ private static Method getPublicMethod( Class clazz, String name, Class[] paramTypes ) { /* - * if this class is public, then try to get it + * if this class is public, then try to get it */ if ( ( clazz.getModifiers() & Modifier.PUBLIC ) != 0 ) @@ -445,19 +437,17 @@ private static Method getPublicMethod( Class clazz, String name, Class[] paramTy catch ( NoSuchMethodException e ) { /* - * If the class does not have the method, then neither its - * superclass nor any of its interfaces has it so quickly return - * null. + * If the class does not have the method, then neither its superclass nor any of its interfaces has it + * so quickly return null. */ return null; } } /* - * try the superclass + * try the superclass */ - Class superclazz = clazz.getSuperclass(); if ( superclazz != null ) @@ -471,14 +461,14 @@ private static Method getPublicMethod( Class clazz, String name, Class[] paramTy } /* - * and interfaces + * and interfaces */ Class[] interfaces = clazz.getInterfaces(); - for ( int i = 0; i < interfaces.length; ++i ) + for ( Class anInterface : interfaces ) { - Method interfaceMethod = getPublicMethod( interfaces[i], name, paramTypes ); + Method interfaceMethod = getPublicMethod( anInterface, name, paramTypes ); if ( interfaceMethod != null ) { @@ -495,8 +485,11 @@ private static Method getPublicMethod( Class clazz, String name, Class[] paramTy private static final class MethodInfo { Method method; + String name; + Class[] parameterTypes; + boolean upcast; MethodInfo( Method method ) diff --git a/src/main/java/org/codehaus/plexus/util/introspection/MethodMap.java b/src/main/java/org/codehaus/plexus/util/introspection/MethodMap.java index bf733097..51420cca 100644 --- a/src/main/java/org/codehaus/plexus/util/introspection/MethodMap.java +++ b/src/main/java/org/codehaus/plexus/util/introspection/MethodMap.java @@ -25,45 +25,45 @@ import java.util.Map; /** - * * @author Jason van Zyl * @author Bob McWhirter * @author Christoph Reck * @author Geir Magnusson Jr. * @author Attila Szegedi - * @version $Id$ + * */ public class MethodMap { private static final int MORE_SPECIFIC = 0; + private static final int LESS_SPECIFIC = 1; + private static final int INCOMPARABLE = 2; /** * Keep track of all methods with the same name. */ - Map methodByNameMap = new Hashtable(); + Map> methodByNameMap = new Hashtable>(); /** - * Add a method to a list of methods by name. - * For a particular class we are keeping track - * of all the methods with the same name. + * Add a method to a list of methods by name. For a particular class we are keeping track of all the methods with + * the same name. + * + * @param method The method */ - public void add(Method method) + public void add( Method method ) { String methodName = method.getName(); - List l = get( methodName ); + List l = get( methodName ); - if ( l == null) + if ( l == null ) { - l = new ArrayList(); - methodByNameMap.put(methodName, l); + l = new ArrayList(); + methodByNameMap.put( methodName, l ); } - l.add(method); - - return; + l.add( method ); } /** @@ -72,45 +72,34 @@ public void add(Method method) * @param key The name of the method. * @return List list of methods */ - public List get(String key) + public List get( String key ) { - return (List) methodByNameMap.get(key); + return methodByNameMap.get( key ); } /** - *

            - * Find a method. Attempts to find the - * most specific applicable method using the - * algorithm described in the JLS section - * 15.12.2 (with the exception that it can't - * distinguish a primitive type argument from - * an object type argument, since in reflection - * primitive type arguments are represented by - * their object counterparts, so for an argument of - * type (say) java.lang.Integer, it will not be able - * to decide between a method that takes int and a - * method that takes java.lang.Integer as a parameter. - *

            - * - *

            - * This turns out to be a relatively rare case - * where this is needed - however, functionality - * like this is needed. - *

            + *

            + * Find a method. Attempts to find the most specific applicable method using the algorithm described in the JLS + * section 15.12.2 (with the exception that it can't distinguish a primitive type argument from an object type + * argument, since in reflection primitive type arguments are represented by their object counterparts, so for an + * argument of type (say) java.lang.Integer, it will not be able to decide between a method that takes int and a + * method that takes java.lang.Integer as a parameter. + *

            + *

            + * This turns out to be a relatively rare case where this is needed - however, functionality like this is needed. + *

            * - * @param methodName name of method - * @param args the actual arguments with which the method is called - * @return the most specific applicable method, or null if no - * method is applicable. - * @throws AmbiguousException if there is more than one maximally - * specific applicable method + * @param methodName name of method + * @param args the actual arguments with which the method is called + * @return the most specific applicable method, or null if no method is applicable. + * @throws AmbiguousException if there is more than one maximally specific applicable method */ - public Method find(String methodName, Object[] args) + public Method find( String methodName, Object[] args ) throws AmbiguousException { - List methodList = get(methodName); + List methodList = get( methodName ); - if (methodList == null) + if ( methodList == null ) { return null; } @@ -118,72 +107,66 @@ public Method find(String methodName, Object[] args) int l = args.length; Class[] classes = new Class[l]; - for(int i = 0; i < l; ++i) + for ( int i = 0; i < l; ++i ) { Object arg = args[i]; /* - * if we are careful down below, a null argument goes in there - * so we can know that the null was passed to the method + * if we are careful down below, a null argument goes in there so we can know that the null was passed to + * the method */ - classes[i] = - arg == null ? null : arg.getClass(); + classes[i] = arg == null ? null : arg.getClass(); } - return getMostSpecific(methodList, classes); + return getMostSpecific( methodList, classes ); } /** - * simple distinguishable exception, used when - * we run across ambiguous overloading + * simple distinguishable exception, used when we run across ambiguous overloading */ - public static class AmbiguousException extends Exception + public static class AmbiguousException + extends Exception { } - - private static Method getMostSpecific(List methods, Class[] classes) + private static Method getMostSpecific( List methods, Class[] classes ) throws AmbiguousException { - LinkedList applicables = getApplicables(methods, classes); + LinkedList applicables = getApplicables( methods, classes ); - if(applicables.isEmpty()) + if ( applicables.isEmpty() ) { return null; } - if(applicables.size() == 1) + if ( applicables.size() == 1 ) { - return (Method)applicables.getFirst(); + return applicables.getFirst(); } /* - * This list will contain the maximally specific methods. Hopefully at - * the end of the below loop, the list will contain exactly one method, - * (the most specific method) otherwise we have ambiguity. + * This list will contain the maximally specific methods. Hopefully at the end of the below loop, the list will + * contain exactly one method, (the most specific method) otherwise we have ambiguity. */ - LinkedList maximals = new LinkedList(); + LinkedList maximals = new LinkedList(); - for (Iterator applicable = applicables.iterator(); - applicable.hasNext();) + for ( Method app : applicables ) { - Method app = (Method) applicable.next(); Class[] appArgs = app.getParameterTypes(); boolean lessSpecific = false; - for (Iterator maximal = maximals.iterator(); - !lessSpecific && maximal.hasNext();) + for ( Iterator maximal = maximals.iterator(); !lessSpecific && maximal.hasNext(); ) { - Method max = (Method) maximal.next(); + Method max = maximal.next(); - switch(moreSpecific(appArgs, max.getParameterTypes())) + switch ( moreSpecific( appArgs, max.getParameterTypes() ) ) { case MORE_SPECIFIC: { /* - * This method is more specific than the previously - * known maximally specific, so remove the old maximum. + * This method is more specific than the previously known maximally specific, so remove the old + * maximum. */ maximal.remove(); @@ -193,10 +176,8 @@ private static Method getMostSpecific(List methods, Class[] classes) case LESS_SPECIFIC: { /* - * This method is less specific than some of the - * currently known maximally specific methods, so we - * won't add it into the set of maximally specific - * methods + * This method is less specific than some of the currently known maximally specific methods, so + * we won't add it into the set of maximally specific methods */ lessSpecific = true; @@ -205,54 +186,50 @@ private static Method getMostSpecific(List methods, Class[] classes) } } - if(!lessSpecific) + if ( !lessSpecific ) { - maximals.addLast(app); + maximals.addLast( app ); } } - if(maximals.size() > 1) + if ( maximals.size() > 1 ) { // We have more than one maximally specific method throw new AmbiguousException(); } - return (Method)maximals.getFirst(); + return maximals.getFirst(); } /** - * Determines which method signature (represented by a class array) is more - * specific. This defines a partial ordering on the method signatures. + * Determines which method signature (represented by a class array) is more specific. This defines a partial + * ordering on the method signatures. + * * @param c1 first signature to compare * @param c2 second signature to compare - * @return MORE_SPECIFIC if c1 is more specific than c2, LESS_SPECIFIC if - * c1 is less specific than c2, INCOMPARABLE if they are incomparable. + * @return MORE_SPECIFIC if c1 is more specific than c2, LESS_SPECIFIC if c1 is less specific than c2, INCOMPARABLE + * if they are incomparable. */ - private static int moreSpecific(Class[] c1, Class[] c2) + private static int moreSpecific( Class[] c1, Class[] c2 ) { boolean c1MoreSpecific = false; boolean c2MoreSpecific = false; - for(int i = 0; i < c1.length; ++i) + for ( int i = 0; i < c1.length; ++i ) { - if(c1[i] != c2[i]) + if ( c1[i] != c2[i] ) { - c1MoreSpecific = - c1MoreSpecific || - isStrictMethodInvocationConvertible(c2[i], c1[i]); - c2MoreSpecific = - c2MoreSpecific || - isStrictMethodInvocationConvertible(c1[i], c2[i]); + c1MoreSpecific = c1MoreSpecific || isStrictMethodInvocationConvertible( c2[i], c1[i] ); + c2MoreSpecific = c2MoreSpecific || isStrictMethodInvocationConvertible( c1[i], c2[i] ); } } - if(c1MoreSpecific) + if ( c1MoreSpecific ) { - if(c2MoreSpecific) + if ( c2MoreSpecific ) { /* - * Incomparable due to cross-assignable arguments (i.e. - * foo(String, Object) vs. foo(Object, String)) + * Incomparable due to cross-assignable arguments (i.e. foo(String, Object) vs. foo(Object, String)) */ return INCOMPARABLE; @@ -261,14 +238,13 @@ private static int moreSpecific(Class[] c1, Class[] c2) return MORE_SPECIFIC; } - if(c2MoreSpecific) + if ( c2MoreSpecific ) { return LESS_SPECIFIC; } /* - * Incomparable due to non-related arguments (i.e. - * foo(Runnable) vs. foo(Serializable)) + * Incomparable due to non-related arguments (i.e. foo(Runnable) vs. foo(Serializable)) */ return INCOMPARABLE; @@ -276,23 +252,23 @@ private static int moreSpecific(Class[] c1, Class[] c2) /** * Returns all methods that are applicable to actual argument types. + * * @param methods list of all candidate methods * @param classes the actual types of the arguments - * @return a list that contains only applicable methods (number of - * formal and actual arguments matches, and argument types are assignable - * to formal types through a method invocation conversion). + * @return a list that contains only applicable methods (number of formal and actual arguments matches, and argument + * types are assignable to formal types through a method invocation conversion). */ - private static LinkedList getApplicables(List methods, Class[] classes) + private static LinkedList getApplicables( List methods, Class[] classes ) { - LinkedList list = new LinkedList(); + LinkedList list = new LinkedList(); - for (Iterator imethod = methods.iterator(); imethod.hasNext();) + for ( Object method1 : methods ) { - Method method = (Method) imethod.next(); + Method method = (Method) method1; - if(isApplicable(method, classes)) + if ( isApplicable( method, classes ) ) { - list.add(method); + list.add( method ); } } @@ -300,21 +276,24 @@ private static LinkedList getApplicables(List methods, Class[] classes) } /** - * Returns true if the supplied method is applicable to actual - * argument types. + * Returns true if the supplied method is applicable to actual argument types. + * + * @param method The method to check for applicability + * @param classes The arguments + * @return true if the method applies to the parameter types */ - private static boolean isApplicable(Method method, Class[] classes) + private static boolean isApplicable( Method method, Class[] classes ) { Class[] methodArgs = method.getParameterTypes(); - if(methodArgs.length != classes.length) + if ( methodArgs.length != classes.length ) { return false; } - for(int i = 0; i < classes.length; ++i) + for ( int i = 0; i < classes.length; ++i ) { - if(!isMethodInvocationConvertible(methodArgs[i], classes[i])) + if ( !isMethodInvocationConvertible( methodArgs[i], classes[i] ) ) { return false; } @@ -324,76 +303,62 @@ private static boolean isApplicable(Method method, Class[] classes) } /** - * Determines whether a type represented by a class object is - * convertible to another type represented by a class object using a - * method invocation conversion, treating object types of primitive - * types as if they were primitive types (that is, a Boolean actual - * parameter type matches boolean primitive formal type). This behavior - * is because this method is used to determine applicable methods for - * an actual parameter list, and primitive types are represented by - * their object duals in reflective method calls. + * Determines whether a type represented by a class object is convertible to another type represented by a class + * object using a method invocation conversion, treating object types of primitive types as if they were primitive + * types (that is, a Boolean actual parameter type matches boolean primitive formal type). This behavior is because + * this method is used to determine applicable methods for an actual parameter list, and primitive types are + * represented by their object duals in reflective method calls. * - * @param formal the formal parameter type to which the actual - * parameter type should be convertible + * @param formal the formal parameter type to which the actual parameter type should be convertible * @param actual the actual parameter type. - * @return true if either formal type is assignable from actual type, - * or formal is a primitive type and actual is its corresponding object - * type or an object type of a primitive type that can be converted to - * the formal type. + * @return true if either formal type is assignable from actual type, or formal is a primitive type and actual is + * its corresponding object type or an object type of a primitive type that can be converted to the formal + * type. */ - private static boolean isMethodInvocationConvertible(Class formal, - Class actual) + private static boolean isMethodInvocationConvertible( Class formal, Class actual ) { /* * if it's a null, it means the arg was null */ - if (actual == null && !formal.isPrimitive()) + if ( actual == null && !formal.isPrimitive() ) { return true; } /* - * Check for identity or widening reference conversion + * Check for identity or widening reference conversion */ - if (actual != null && formal.isAssignableFrom(actual)) + if ( actual != null && formal.isAssignableFrom( actual ) ) { return true; } /* - * Check for boxing with widening primitive conversion. Note that - * actual parameters are never primitives. + * Check for boxing with widening primitive conversion. Note that actual parameters are never primitives. */ - if (formal.isPrimitive()) + if ( formal.isPrimitive() ) { - if(formal == Boolean.TYPE && actual == Boolean.class) + if ( formal == Boolean.TYPE && actual == Boolean.class ) return true; - if(formal == Character.TYPE && actual == Character.class) + if ( formal == Character.TYPE && actual == Character.class ) return true; - if(formal == Byte.TYPE && actual == Byte.class) + if ( formal == Byte.TYPE && actual == Byte.class ) return true; - if(formal == Short.TYPE && - (actual == Short.class || actual == Byte.class)) + if ( formal == Short.TYPE && ( actual == Short.class || actual == Byte.class ) ) return true; - if(formal == Integer.TYPE && - (actual == Integer.class || actual == Short.class || - actual == Byte.class)) + if ( formal == Integer.TYPE + && ( actual == Integer.class || actual == Short.class || actual == Byte.class ) ) return true; - if(formal == Long.TYPE && - (actual == Long.class || actual == Integer.class || - actual == Short.class || actual == Byte.class)) + if ( formal == Long.TYPE && ( actual == Long.class || actual == Integer.class || actual == Short.class + || actual == Byte.class ) ) return true; - if(formal == Float.TYPE && - (actual == Float.class || actual == Long.class || - actual == Integer.class || actual == Short.class || - actual == Byte.class)) + if ( formal == Float.TYPE && ( actual == Float.class || actual == Long.class || actual == Integer.class + || actual == Short.class || actual == Byte.class ) ) return true; - if(formal == Double.TYPE && - (actual == Double.class || actual == Float.class || - actual == Long.class || actual == Integer.class || - actual == Short.class || actual == Byte.class)) + if ( formal == Double.TYPE && ( actual == Double.class || actual == Float.class || actual == Long.class + || actual == Integer.class || actual == Short.class || actual == Byte.class ) ) return true; } @@ -401,62 +366,51 @@ private static boolean isMethodInvocationConvertible(Class formal, } /** - * Determines whether a type represented by a class object is - * convertible to another type represented by a class object using a - * method invocation conversion, without matching object and primitive - * types. This method is used to determine the more specific type when - * comparing signatures of methods. + * Determines whether a type represented by a class object is convertible to another type represented by a class + * object using a method invocation conversion, without matching object and primitive types. This method is used to + * determine the more specific type when comparing signatures of methods. * - * @param formal the formal parameter type to which the actual - * parameter type should be convertible + * @param formal the formal parameter type to which the actual parameter type should be convertible * @param actual the actual parameter type. - * @return true if either formal type is assignable from actual type, - * or formal and actual are both primitive types and actual can be - * subject to widening conversion to formal. + * @return true if either formal type is assignable from actual type, or formal and actual are both primitive types + * and actual can be subject to widening conversion to formal. */ - private static boolean isStrictMethodInvocationConvertible(Class formal, - Class actual) + private static boolean isStrictMethodInvocationConvertible( Class formal, Class actual ) { /* * we shouldn't get a null into, but if so */ - if (actual == null && !formal.isPrimitive()) + if ( actual == null && !formal.isPrimitive() ) { return true; } /* - * Check for identity or widening reference conversion + * Check for identity or widening reference conversion */ - if(formal.isAssignableFrom(actual)) + if ( formal.isAssignableFrom( actual ) ) { return true; } /* - * Check for widening primitive conversion. + * Check for widening primitive conversion. */ - if(formal.isPrimitive()) + if ( formal.isPrimitive() ) { - if(formal == Short.TYPE && (actual == Byte.TYPE)) + if ( formal == Short.TYPE && ( actual == Byte.TYPE ) ) return true; - if(formal == Integer.TYPE && - (actual == Short.TYPE || actual == Byte.TYPE)) + if ( formal == Integer.TYPE && ( actual == Short.TYPE || actual == Byte.TYPE ) ) return true; - if(formal == Long.TYPE && - (actual == Integer.TYPE || actual == Short.TYPE || - actual == Byte.TYPE)) + if ( formal == Long.TYPE && ( actual == Integer.TYPE || actual == Short.TYPE || actual == Byte.TYPE ) ) return true; - if(formal == Float.TYPE && - (actual == Long.TYPE || actual == Integer.TYPE || - actual == Short.TYPE || actual == Byte.TYPE)) + if ( formal == Float.TYPE + && ( actual == Long.TYPE || actual == Integer.TYPE || actual == Short.TYPE || actual == Byte.TYPE ) ) return true; - if(formal == Double.TYPE && - (actual == Float.TYPE || actual == Long.TYPE || - actual == Integer.TYPE || actual == Short.TYPE || - actual == Byte.TYPE)) + if ( formal == Double.TYPE && ( actual == Float.TYPE || actual == Long.TYPE || actual == Integer.TYPE + || actual == Short.TYPE || actual == Byte.TYPE ) ) return true; } return false; diff --git a/src/main/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractor.java b/src/main/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractor.java index 2be103b5..656c8201 100644 --- a/src/main/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractor.java +++ b/src/main/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractor.java @@ -16,51 +16,125 @@ * limitations under the License. */ +import java.lang.ref.WeakReference; +import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.Arrays; import java.util.List; -import java.util.WeakHashMap; import java.util.Map; -import java.util.StringTokenizer; -import java.util.regex.Matcher; -import java.util.regex.Pattern; +import java.util.WeakHashMap; import org.codehaus.plexus.util.StringUtils; /** - *

            Using simple dotted expressions to extract the values from an Object instance, - * For example we might want to extract a value like: project.build.sourceDirectory

            - * - *

            The implementation supports indexed, nested and mapped properties similar to the JSP way.

            - * + *

            + * Using simple dotted expressions to extract the values from an Object instance, For example we might want to extract a + * value like: project.build.sourceDirectory + *

            + *

            + * The implementation supports indexed, nested and mapped properties similar to the JSP way. + *

            + * * @author Jason van Zyl * @author Vincent Siveton - * @version $Id$ - * @see http://struts.apache.org/1.x/struts-taglib/indexedprops.html + * + * @see http://struts.apache.org/1.x/struts-taglib/indexedprops.html */ public class ReflectionValueExtractor { - private static final Class[] CLASS_ARGS = new Class[0]; + private static final Class[] CLASS_ARGS = new Class[0]; private static final Object[] OBJECT_ARGS = new Object[0]; /** - * Use a WeakHashMap here, so the keys (Class objects) can be garbage collected. - * This approach prevents permgen space overflows due to retention of discarded - * classloaders. + * Use a WeakHashMap here, so the keys (Class objects) can be garbage collected. This approach prevents permgen + * space overflows due to retention of discarded classloaders. */ - private static final Map classMaps = new WeakHashMap(); + private static final Map, WeakReference> classMaps = + new WeakHashMap, WeakReference>(); - /** - * Indexed properties pattern, ie (\\w+)\\[(\\d+)\\] - */ - private static final Pattern INDEXED_PROPS = Pattern.compile( "(\\w+)\\[(\\d+)\\]" ); + static final int EOF = -1; - /** - * Indexed properties pattern, ie (\\w+)\\((.+)\\) - */ - private static final Pattern MAPPED_PROPS = Pattern.compile( "(\\w+)\\((.+)\\)" ); + static final char PROPERTY_START = '.'; + + static final char INDEXED_START = '['; + + static final char INDEXED_END = ']'; + + static final char MAPPED_START = '('; + + static final char MAPPED_END = ')'; + + static class Tokenizer + { + final String expression; + + int idx; + + public Tokenizer( String expression ) + { + this.expression = expression; + } + + public int peekChar() + { + return idx < expression.length() ? expression.charAt( idx ) : EOF; + } + + public int skipChar() + { + return idx < expression.length() ? expression.charAt( idx++ ) : EOF; + } + + public String nextToken( char delimiter ) + { + int start = idx; + + while ( idx < expression.length() && delimiter != expression.charAt( idx ) ) + { + idx++; + } + + // delimiter MUST be present + if ( idx <= start || idx >= expression.length() ) + { + return null; + } + + return expression.substring( start, idx++ ); + } + + public String nextPropertyName() + { + final int start = idx; + + while ( idx < expression.length() && Character.isJavaIdentifierPart( expression.charAt( idx ) ) ) + { + idx++; + } + + // property name does not require delimiter + if ( idx <= start || idx > expression.length() ) + { + return null; + } + + return expression.substring( start, idx ); + } + + public int getPosition() + { + return idx < expression.length() ? idx : EOF; + } + + // to make tokenizer look pretty in debugger + @Override + public String toString() + { + return idx < expression.length() ? expression.substring( idx ) : ""; + } + } private ReflectionValueExtractor() { @@ -68,14 +142,15 @@ private ReflectionValueExtractor() /** *

            The implementation supports indexed, nested and mapped properties.

            - * + * *
              *
            • nested properties should be defined by a dot, i.e. "user.address.street"
            • *
            • indexed properties (java.util.List or array instance) should be contains (\\w+)\\[(\\d+)\\] * pattern, i.e. "user.addresses[1].street"
            • - *
            • mapped properties should be contains (\\w+)\\((.+)\\) pattern, i.e. "user.addresses(myAddress).street"
            • - *
                - * + *
              • mapped properties should be contains (\\w+)\\((.+)\\) pattern, i.e. + * "user.addresses(myAddress).street"
              • + *
              + * * @param expression not null expression * @param root not null object * @return the object defined by the expression @@ -89,29 +164,25 @@ public static Object evaluate( String expression, Object root ) /** *

              The implementation supports indexed, nested and mapped properties.

              - * + * *
                *
              • nested properties should be defined by a dot, i.e. "user.address.street"
              • *
              • indexed properties (java.util.List or array instance) should be contains (\\w+)\\[(\\d+)\\] * pattern, i.e. "user.addresses[1].street"
              • - *
              • mapped properties should be contains (\\w+)\\((.+)\\) pattern, i.e. "user.addresses(myAddress).street"
              • - *
                  - * + *
                • mapped properties should be contains (\\w+)\\((.+)\\) pattern, i.e. + * "user.addresses(myAddress).street"
                • + *
                + * * @param expression not null expression * @param root not null object + * @param trimRootToken root start * @return the object defined by the expression * @throws Exception if any */ // TODO: don't throw Exception - public static Object evaluate( String expression, Object root, boolean trimRootToken ) + public static Object evaluate( String expression, final Object root, final boolean trimRootToken ) throws Exception { - // if the root token refers to the supplied root object parameter, remove it. - if ( trimRootToken ) - { - expression = expression.substring( expression.indexOf( '.' ) + 1 ); - } - Object value = root; // ---------------------------------------------------------------------- @@ -119,128 +190,170 @@ public static Object evaluate( String expression, Object root, boolean trimRootT // MavenProject instance. // ---------------------------------------------------------------------- - StringTokenizer parser = new StringTokenizer( expression, "." ); + if ( StringUtils.isEmpty( expression ) || !Character.isJavaIdentifierStart( expression.charAt( 0 ) ) ) + { + return null; + } + + boolean hasDots = expression.indexOf( PROPERTY_START ) >= 0; - while ( parser.hasMoreTokens() ) + final Tokenizer tokenizer; + if ( trimRootToken && hasDots ) { - // if we have nothing, stop now - if ( value == null ) + tokenizer = new Tokenizer( expression ); + tokenizer.nextPropertyName(); + if ( tokenizer.getPosition() == EOF ) { return null; } + } + else + { + tokenizer = new Tokenizer( "." + expression ); + } - String token = parser.nextToken(); + int propertyPosition = tokenizer.getPosition(); + while ( value != null && tokenizer.peekChar() != EOF ) + { + switch ( tokenizer.skipChar() ) + { + case INDEXED_START: + value = getIndexedValue( expression, propertyPosition, tokenizer.getPosition(), value, + tokenizer.nextToken( INDEXED_END ) ); + break; + case MAPPED_START: + value = getMappedValue( expression, propertyPosition, tokenizer.getPosition(), value, + tokenizer.nextToken( MAPPED_END ) ); + break; + case PROPERTY_START: + propertyPosition = tokenizer.getPosition(); + value = getPropertyValue( value, tokenizer.nextPropertyName() ); + break; + default: + // could not parse expression + return null; + } + } + + return value; + } + + private static Object getMappedValue( final String expression, final int from, final int to, final Object value, + final String key ) + throws Exception + { + if ( value == null || key == null ) + { + return null; + } + if ( value instanceof Map ) + { + Object[] localParams = new Object[] { key }; ClassMap classMap = getClassMap( value.getClass() ); + Method method = classMap.findMethod( "get", localParams ); + return method.invoke( value, localParams ); + } + + final String message = + String.format( "The token '%s' at position '%d' refers to a java.util.Map, but the value seems is an instance of '%s'", + expression.subSequence( from, to ), from, value.getClass() ); - Method method; - Object[] localParams = OBJECT_ARGS; + throw new Exception( message ); + } - // do we have an indexed property? - Matcher matcher = INDEXED_PROPS.matcher( token ); - if ( matcher.find() ) + private static Object getIndexedValue( final String expression, final int from, final int to, final Object value, + final String indexStr ) + throws Exception + { + try + { + int index = Integer.parseInt( indexStr ); + + if ( value.getClass().isArray() ) { - String methodBase = StringUtils.capitalizeFirstLetter( matcher.group( 1 ) ); - String methodName = "get" + methodBase; - method = classMap.findMethod( methodName, CLASS_ARGS ); - value = method.invoke( value, OBJECT_ARGS ); - classMap = getClassMap( value.getClass() ); - - if ( classMap.getCachedClass().isArray() ) - { - value = Arrays.asList( (Object[]) value ); - classMap = getClassMap( value.getClass() ); - } - - if ( value instanceof List ) - { - // use get method on List interface - localParams = new Object[1]; - localParams[0] = Integer.valueOf( matcher.group( 2 ) ); - method = classMap.findMethod( "get", localParams ); - } - else - { - throw new Exception( "The token '" + token - + "' refers to a java.util.List or an array, but the value seems is an instance of '" - + value.getClass() + "'." ); - } + return Array.get( value, index ); } - else + + if ( value instanceof List ) { - // do we have a mapped property? - matcher = MAPPED_PROPS.matcher( token ); - if ( matcher.find() ) - { - String methodBase = StringUtils.capitalizeFirstLetter( matcher.group( 1 ) ); - String methodName = "get" + methodBase; - method = classMap.findMethod( methodName, CLASS_ARGS ); - value = method.invoke( value, OBJECT_ARGS ); - classMap = getClassMap( value.getClass() ); - - if ( value instanceof Map ) - { - // use get method on List interface - localParams = new Object[1]; - localParams[0] = matcher.group( 2 ); - method = classMap.findMethod( "get", localParams ); - } - else - { - throw new Exception( "The token '" + token - + "' refers to a java.util.Map, but the value seems is an instance of '" - + value.getClass() + "'." ); - } - } - else - { - String methodBase = StringUtils.capitalizeFirstLetter( token ); - String methodName = "get" + methodBase; - method = classMap.findMethod( methodName, CLASS_ARGS ); - - if ( method == null ) - { - // perhaps this is a boolean property?? - methodName = "is" + methodBase; - - method = classMap.findMethod( methodName, CLASS_ARGS ); - } - } + ClassMap classMap = getClassMap( value.getClass() ); + // use get method on List interface + Object[] localParams = new Object[] { index }; + Method method = classMap.findMethod( "get", localParams ); + return method.invoke( value, localParams ); } - - if ( method == null ) + } + catch ( NumberFormatException e ) + { + return null; + } + catch ( InvocationTargetException e ) + { + // catch array index issues gracefully, otherwise release + if ( e.getCause() instanceof IndexOutOfBoundsException ) { return null; } - try - { - value = method.invoke( value, localParams ); - } - catch ( InvocationTargetException e ) - { - // catch array index issues gracefully, otherwise release - if ( e.getCause() instanceof IndexOutOfBoundsException ) - { - return null; - } + throw e; + } - throw e; - } + final String message = + String.format( "The token '%s' at position '%d' refers to a java.util.List or an array, but the value seems is an instance of '%s'", + expression.subSequence( from, to ), from, value.getClass() ); + + throw new Exception( message ); + } + + private static Object getPropertyValue( Object value, String property ) + throws Exception + { + if ( value == null || property == null ) + { + return null; } - return value; + ClassMap classMap = getClassMap( value.getClass() ); + String methodBase = StringUtils.capitalizeFirstLetter( property ); + String methodName = "get" + methodBase; + Method method = classMap.findMethod( methodName, CLASS_ARGS ); + + if ( method == null ) + { + // perhaps this is a boolean property?? + methodName = "is" + methodBase; + + method = classMap.findMethod( methodName, CLASS_ARGS ); + } + + if ( method == null ) + { + return null; + } + + try + { + return method.invoke( value, OBJECT_ARGS ); + } + catch ( InvocationTargetException e ) + { + throw e; + } } - private static ClassMap getClassMap( Class clazz ) + private static ClassMap getClassMap( Class clazz ) { - ClassMap classMap = (ClassMap) classMaps.get( clazz ); - if ( classMap == null ) + WeakReference softRef = classMaps.get( clazz ); + + ClassMap classMap; + + if ( softRef == null || ( classMap = softRef.get() ) == null ) { classMap = new ClassMap( clazz ); - classMaps.put( clazz, classMap ); + classMaps.put( clazz, new WeakReference( classMap ) ); } return classMap; diff --git a/src/main/java/org/codehaus/plexus/util/io/InputStreamFacade.java b/src/main/java/org/codehaus/plexus/util/io/InputStreamFacade.java index 3c2716c8..bfa5c471 100644 --- a/src/main/java/org/codehaus/plexus/util/io/InputStreamFacade.java +++ b/src/main/java/org/codehaus/plexus/util/io/InputStreamFacade.java @@ -20,14 +20,16 @@ import java.io.InputStream; /** - * Interface of a wrapper for input streams. This facade is used - * by methods, which are being implemented for files, URL's, or - * input streams. + * Interface of a wrapper for input streams. This facade is used by methods, which are being implemented for files, + * URL's, or input streams. */ -public interface InputStreamFacade { +public interface InputStreamFacade +{ /** - * Retrieves the actual {@link InputStream}. The caller must assume, - * that this method may be invoked only once. + * The caller must assume, that this method may be invoked only once. + * @return Retrieves the actual {@link InputStream}. + * @throws IOException if io issue */ - InputStream getInputStream() throws IOException; + InputStream getInputStream() + throws IOException; } diff --git a/src/main/java/org/codehaus/plexus/util/io/RawInputStreamFacade.java b/src/main/java/org/codehaus/plexus/util/io/RawInputStreamFacade.java index 008ce6ac..e634b95f 100644 --- a/src/main/java/org/codehaus/plexus/util/io/RawInputStreamFacade.java +++ b/src/main/java/org/codehaus/plexus/util/io/RawInputStreamFacade.java @@ -22,18 +22,21 @@ /** * Implementation of {@link InputStreamFacade} for raw input streams. */ -public class RawInputStreamFacade implements InputStreamFacade { +@SuppressWarnings( { "UnusedDeclaration" } ) +public class RawInputStreamFacade + implements InputStreamFacade +{ final InputStream stream; - /** - * Creates a new instance. - */ public RawInputStreamFacade( InputStream stream ) { this.stream = stream; } - public InputStream getInputStream() throws IOException { + @Override + public InputStream getInputStream() + throws IOException + { return stream; } } diff --git a/src/main/java/org/codehaus/plexus/util/io/URLInputStreamFacade.java b/src/main/java/org/codehaus/plexus/util/io/URLInputStreamFacade.java index bd09669b..da09b4c1 100644 --- a/src/main/java/org/codehaus/plexus/util/io/URLInputStreamFacade.java +++ b/src/main/java/org/codehaus/plexus/util/io/URLInputStreamFacade.java @@ -23,18 +23,20 @@ /** * Implementation of {@link InputStreamFacade} for URL's. */ -public class URLInputStreamFacade implements InputStreamFacade { +public class URLInputStreamFacade + implements InputStreamFacade +{ private final URL url; - /** - * Creates a new instance. - */ public URLInputStreamFacade( URL url ) { this.url = url; } - public InputStream getInputStream() throws IOException { + @Override + public InputStream getInputStream() + throws IOException + { return url.openStream(); } } diff --git a/src/main/java/org/codehaus/plexus/util/reflection/Reflector.java b/src/main/java/org/codehaus/plexus/util/reflection/Reflector.java index 1655803b..4f3a9d84 100644 --- a/src/main/java/org/codehaus/plexus/util/reflection/Reflector.java +++ b/src/main/java/org/codehaus/plexus/util/reflection/Reflector.java @@ -25,8 +25,8 @@ import java.util.Map; /** - * Utility class used to instantiate an object using reflection. This utility - * hides many of the gory details needed to do this. + * Utility class used to instantiate an object using reflection. This utility hides many of the gory details needed to + * do this. * * @author John Casey */ @@ -36,7 +36,8 @@ public final class Reflector private static final String GET_INSTANCE_METHOD_NAME = "getInstance"; - private HashMap classMaps = new HashMap(); + private Map>> classMaps = + new HashMap>>(); /** Ensure no instances of Reflector are created...this is a utility. */ public Reflector() @@ -44,19 +45,17 @@ public Reflector() } /** - * Create a new instance of a class, given the array of parameters... Uses - * constructor caching to find a constructor that matches the parameter - * types, either specifically (first choice) or abstractly... + * Create a new instance of a class, given the array of parameters... Uses constructor caching to find a constructor + * that matches the parameter types, either specifically (first choice) or abstractly... * - * @param theClass - * The class to instantiate - * @param params - * The parameters to pass to the constructor + * @param theClass The class to instantiate + * @param params The parameters to pass to the constructor + * @param the type * @return The instantiated object - * @throws ReflectorException - * In case anything goes wrong here... + * @throws ReflectorException In case anything goes wrong here... */ - public Object newInstance( Class theClass, Object[] params ) + @SuppressWarnings( { "UnusedDeclaration" } ) + public T newInstance( Class theClass, Object[] params ) throws ReflectorException { if ( params == null ) @@ -73,19 +72,19 @@ public Object newInstance( Class theClass, Object[] params ) try { - Constructor con = getConstructor( theClass, paramTypes ); + Constructor con = getConstructor( theClass, paramTypes ); if ( con == null ) { - StringBuffer buffer = new StringBuffer(); + StringBuilder buffer = new StringBuilder(); buffer.append( "Constructor not found for class: " ); buffer.append( theClass.getName() ); buffer.append( " with specified or ancestor parameter classes: " ); - for ( int i = 0; i < paramTypes.length; i++ ) + for ( Class paramType : paramTypes ) { - buffer.append( paramTypes[i].getName() ); + buffer.append( paramType.getName() ); buffer.append( ',' ); } @@ -96,34 +95,24 @@ public Object newInstance( Class theClass, Object[] params ) return con.newInstance( params ); } - catch ( InstantiationException ex ) - { - throw new ReflectorException( ex ); - } - catch ( InvocationTargetException ex ) - { - throw new ReflectorException( ex ); - } - catch ( IllegalAccessException ex ) + catch ( InstantiationException | InvocationTargetException | IllegalAccessException ex ) { throw new ReflectorException( ex ); } } /** - * Retrieve the singleton instance of a class, given the array of - * parameters... Uses constructor caching to find a constructor that matches - * the parameter types, either specifically (first choice) or abstractly... + * Retrieve the singleton instance of a class, given the array of parameters... Uses constructor caching to find a + * constructor that matches the parameter types, either specifically (first choice) or abstractly... * - * @param theClass - * The class to retrieve the singleton of - * @param initParams - * The parameters to pass to the constructor + * @param theClass The class to retrieve the singleton of + * @param initParams The parameters to pass to the constructor + * @param the type * @return The singleton object - * @throws ReflectorException - * In case anything goes wrong here... + * @throws ReflectorException In case anything goes wrong here... */ - public Object getSingleton( Class theClass, Object[] initParams ) + @SuppressWarnings( { "UnusedDeclaration" } ) + public T getSingleton( Class theClass, Object[] initParams ) throws ReflectorException { Class[] paramTypes = new Class[initParams.length]; @@ -137,32 +126,25 @@ public Object getSingleton( Class theClass, Object[] initParams ) { Method method = getMethod( theClass, GET_INSTANCE_METHOD_NAME, paramTypes ); - return method.invoke( null, initParams ); - } - catch ( InvocationTargetException ex ) - { - throw new ReflectorException( ex ); + // noinspection unchecked + return (T) method.invoke( null, initParams ); } - catch ( IllegalAccessException ex ) + catch ( InvocationTargetException | IllegalAccessException ex ) { throw new ReflectorException( ex ); } } /** - * Invoke the specified method on the specified target with the specified - * params... + * Invoke the specified method on the specified target with the specified params... * - * @param target - * The target of the invocation - * @param methodName - * The method name to invoke - * @param params - * The parameters to pass to the method invocation + * @param target The target of the invocation + * @param methodName The method name to invoke + * @param params The parameters to pass to the method invocation * @return The result of the method call - * @throws ReflectorException - * In case of an error looking up or invoking the method. + * @throws ReflectorException In case of an error looking up or invoking the method. */ + @SuppressWarnings( { "UnusedDeclaration" } ) public Object invoke( Object target, String methodName, Object[] params ) throws ReflectorException { @@ -184,14 +166,13 @@ public Object invoke( Object target, String methodName, Object[] params ) if ( method == null ) { - StringBuffer buffer = new StringBuffer(); + StringBuilder buffer = new StringBuilder(); - buffer.append( "Singleton-producing method named '" ).append( methodName ) - .append( "' not found with specified parameter classes: " ); + buffer.append( "Singleton-producing method named '" ).append( methodName ).append( "' not found with specified parameter classes: " ); - for ( int i = 0; i < paramTypes.length; i++ ) + for ( Class paramType : paramTypes ) { - buffer.append( paramTypes[i].getName() ); + buffer.append( paramType.getName() ); buffer.append( ',' ); } @@ -202,16 +183,13 @@ public Object invoke( Object target, String methodName, Object[] params ) return method.invoke( target, params ); } - catch ( InvocationTargetException ex ) - { - throw new ReflectorException( ex ); - } - catch ( IllegalAccessException ex ) + catch ( InvocationTargetException | IllegalAccessException ex ) { throw new ReflectorException( ex ); } } + @SuppressWarnings( { "UnusedDeclaration" } ) public Object getStaticField( Class targetClass, String fieldName ) throws ReflectorException { @@ -221,24 +199,13 @@ public Object getStaticField( Class targetClass, String fieldName ) return field.get( null ); } - catch ( SecurityException e ) - { - throw new ReflectorException( e ); - } - catch ( NoSuchFieldException e ) - { - throw new ReflectorException( e ); - } - catch ( IllegalArgumentException e ) - { - throw new ReflectorException( e ); - } - catch ( IllegalAccessException e ) + catch ( SecurityException | NoSuchFieldException | IllegalArgumentException | IllegalAccessException e ) { throw new ReflectorException( e ); } } + @SuppressWarnings( { "UnusedDeclaration" } ) public Object getField( Object target, String fieldName ) throws ReflectorException { @@ -293,16 +260,13 @@ public Object getField( Object target, String fieldName, boolean breakAccessibil /** * Invoke the specified static method with the specified params... * - * @param targetClass - * The target class of the invocation - * @param methodName - * The method name to invoke - * @param params - * The parameters to pass to the method invocation + * @param targetClass The target class of the invocation + * @param methodName The method name to invoke + * @param params The parameters to pass to the method invocation * @return The result of the method call - * @throws ReflectorException - * In case of an error looking up or invoking the method. + * @throws ReflectorException In case of an error looking up or invoking the method. */ + @SuppressWarnings( { "UnusedDeclaration" } ) public Object invokeStatic( Class targetClass, String methodName, Object[] params ) throws ReflectorException { @@ -324,14 +288,13 @@ public Object invokeStatic( Class targetClass, String methodName, Object[] param if ( method == null ) { - StringBuffer buffer = new StringBuffer(); + StringBuilder buffer = new StringBuilder(); - buffer.append( "Singleton-producing method named \'" + methodName - + "\' not found with specified parameter classes: " ); + buffer.append( "Singleton-producing method named \'" ).append( methodName ).append( "\' not found with specified parameter classes: " ); - for ( int i = 0; i < paramTypes.length; i++ ) + for ( Class paramType : paramTypes ) { - buffer.append( paramTypes[i].getName() ); + buffer.append( paramType.getName() ); buffer.append( ',' ); } @@ -342,41 +305,33 @@ public Object invokeStatic( Class targetClass, String methodName, Object[] param return method.invoke( null, params ); } - catch ( InvocationTargetException ex ) - { - throw new ReflectorException( ex ); - } - catch ( IllegalAccessException ex ) + catch ( InvocationTargetException | IllegalAccessException ex ) { throw new ReflectorException( ex ); } } /** - * Return the constructor, checking the cache first and storing in cache if - * not already there.. + * Return the constructor, checking the cache first and storing in cache if not already there.. * - * @param targetClass - * The class to get the constructor from - * @param params - * The classes of the parameters which the constructor should - * match. + * @param targetClass The class to get the constructor from + * @param params The classes of the parameters which the constructor should match. + * @param the type * @return the Constructor object that matches. - * @throws ReflectorException - * In case we can't retrieve the proper constructor. + * @throws ReflectorException In case we can't retrieve the proper constructor. */ - public Constructor getConstructor( Class targetClass, Class[] params ) + public Constructor getConstructor( Class targetClass, Class[] params ) throws ReflectorException { - Map constructorMap = getConstructorMap( targetClass ); + Map> constructorMap = getConstructorMap( targetClass ); - StringBuffer key = new StringBuffer( 200 ); + StringBuilder key = new StringBuilder( 200 ); key.append( "(" ); - for ( int i = 0, len = params.length; i < len; i++ ) + for ( Class param : params ) { - key.append( params[i].getName() ); + key.append( param.getName() ); key.append( "," ); } @@ -387,21 +342,22 @@ public Constructor getConstructor( Class targetClass, Class[] params ) key.append( ")" ); - Constructor constructor = null; + Constructor constructor; String paramKey = key.toString(); synchronized ( paramKey.intern() ) { - constructor = (Constructor) constructorMap.get( paramKey ); + constructor = constructorMap.get( paramKey ); if ( constructor == null ) { - Constructor[] cands = targetClass.getConstructors(); + @SuppressWarnings( { "unchecked" } ) + Constructor[] cands = (Constructor[]) targetClass.getConstructors(); - for ( int i = 0, len = cands.length; i < len; i++ ) + for ( Constructor cand : cands ) { - Class[] types = cands[i].getParameterTypes(); + Class[] types = cand.getParameterTypes(); if ( params.length != types.length ) { @@ -417,7 +373,7 @@ public Constructor getConstructor( Class targetClass, Class[] params ) } // we got it, so store it! - constructor = cands[i]; + constructor = cand; constructorMap.put( paramKey, constructor ); } } @@ -435,7 +391,7 @@ public Constructor getConstructor( Class targetClass, Class[] params ) public Object getObjectProperty( Object target, String propertyName ) throws ReflectorException { - Object returnValue = null; + Object returnValue; if ( propertyName == null || propertyName.trim().length() < 1 ) { @@ -464,13 +420,13 @@ public Object getObjectProperty( Object target, String propertyName ) } catch ( IllegalAccessException e ) { - throw new ReflectorException( "Error retrieving property \'" + propertyName + "\' from \'" - + targetClass + "\'", e ); + throw new ReflectorException( "Error retrieving property \'" + propertyName + "\' from \'" + targetClass + + "\'", e ); } catch ( InvocationTargetException e ) { - throw new ReflectorException( "Error retrieving property \'" + propertyName + "\' from \'" - + targetClass + "\'", e ); + throw new ReflectorException( "Error retrieving property \'" + propertyName + "\' from \'" + targetClass + + "\'", e ); } } @@ -482,24 +438,24 @@ public Object getObjectProperty( Object target, String propertyName ) } catch ( IllegalAccessException e ) { - throw new ReflectorException( "Error retrieving property \'" + propertyName + "\' from \'" - + targetClass + "\'", e ); + throw new ReflectorException( "Error retrieving property \'" + propertyName + "\' from \'" + targetClass + + "\'", e ); } catch ( InvocationTargetException e ) { - throw new ReflectorException( "Error retrieving property \'" + propertyName + "\' from \'" - + targetClass + "\'", e ); + throw new ReflectorException( "Error retrieving property \'" + propertyName + "\' from \'" + targetClass + + "\'", e ); } } else { returnValue = getField( target, propertyName, true ); - if ( method == null && returnValue == null ) + if ( returnValue == null ) { // TODO: Check if exception is the right action! Field exists, but contains null throw new ReflectorException( "Neither method: \'" + propertyName + "\' nor bean accessor: \'" - + beanAccessor + "\' can be found for class: \'" + targetClass - + "\', and retrieval of field: \'" + propertyName + "\' returned null as value." ); + + beanAccessor + "\' can be found for class: \'" + targetClass + "\', and retrieval of field: \'" + + propertyName + "\' returned null as value." ); } } @@ -507,16 +463,13 @@ public Object getObjectProperty( Object target, String propertyName ) } /** - * Return the method, checking the cache first and storing in cache if not - * already there.. + * Return the method, checking the cache first and storing in cache if not already there.. * - * @param targetClass - * The class to get the method from - * @param params - * The classes of the parameters which the method should match. + * @param targetClass The class to get the method from + * @param params The classes of the parameters which the method should match. + * @param methodName the method name * @return the Method object that matches. - * @throws ReflectorException - * In case we can't retrieve the proper method. + * @throws ReflectorException In case we can't retrieve the proper method. */ public Method getMethod( Class targetClass, String methodName, Class[] params ) throws ReflectorException @@ -535,42 +488,42 @@ public Method getMethod( Class targetClass, String methodName, Class[] params ) private Method _getMethod( Class targetClass, String methodName, Class[] params ) throws ReflectorException { - Map methodMap = getMethodMap( targetClass, methodName ); + Map methodMap = (Map) getMethodMap( targetClass, methodName ); - StringBuffer key = new StringBuffer( 200 ); + StringBuilder key = new StringBuilder( 200 ); key.append( "(" ); - for ( int i = 0, len = params.length; i < len; i++ ) + for ( Class param : params ) { - key.append( params[i].getName() ); + key.append( param.getName() ); key.append( "," ); } key.append( ")" ); - Method method = null; + Method method; String paramKey = key.toString(); synchronized ( paramKey.intern() ) { - method = (Method) methodMap.get( paramKey ); + method = methodMap.get( paramKey ); if ( method == null ) { Method[] cands = targetClass.getMethods(); - for ( int i = 0, len = cands.length; i < len; i++ ) + for ( Method cand : cands ) { - String name = cands[i].getName(); + String name = cand.getName(); if ( !methodName.equals( name ) ) { continue; } - Class[] types = cands[i].getParameterTypes(); + Class[] types = cand.getParameterTypes(); if ( params.length != types.length ) { @@ -586,7 +539,7 @@ private Method _getMethod( Class targetClass, String methodName, Class[] params } // we got it, so store it! - method = cands[i]; + method = cand; methodMap.put( paramKey, method ); } } @@ -598,33 +551,28 @@ private Method _getMethod( Class targetClass, String methodName, Class[] params /** * Retrieve the cache of constructors for the specified class. * - * @param theClass - * the class to lookup. + * @param theClass the class to lookup. * @return The cache of constructors. - * @throws ReflectorException - * in case of a lookup error. + * @throws ReflectorException in case of a lookup error. */ - private Map getConstructorMap( Class theClass ) + private Map> getConstructorMap( Class theClass ) throws ReflectorException { - return getMethodMap( theClass, CONSTRUCTOR_METHOD_NAME ); + return (Map>) getMethodMap( theClass, CONSTRUCTOR_METHOD_NAME ); } /** * Retrieve the cache of methods for the specified class and method name. * - * @param theClass - * the class to lookup. - * @param methodName - * The name of the method to lookup. + * @param theClass the class to lookup. + * @param methodName The name of the method to lookup. * @return The cache of constructors. - * @throws ReflectorException - * in case of a lookup error. + * @throws ReflectorException in case of a lookup error. */ - private Map getMethodMap( Class theClass, String methodName ) + private Map getMethodMap( Class theClass, String methodName ) throws ReflectorException { - Map methodMap = null; + Map methodMap; if ( theClass == null ) { @@ -635,14 +583,13 @@ private Map getMethodMap( Class theClass, String methodName ) synchronized ( className.intern() ) { - Map classMethods = (Map) classMaps.get( className ); + Map> classMethods = classMaps.get( className ); if ( classMethods == null ) { - classMethods = new HashMap(); - methodMap = new HashMap(); + classMethods = new HashMap<>(); + methodMap = new HashMap<>(); classMethods.put( methodName, methodMap ); - classMaps.put( className, classMethods ); } else @@ -651,11 +598,11 @@ private Map getMethodMap( Class theClass, String methodName ) synchronized ( key.intern() ) { - methodMap = (Map) classMethods.get( methodName ); + methodMap = classMethods.get( methodName ); if ( methodMap == null ) { - methodMap = new HashMap(); + methodMap = new HashMap<>(); classMethods.put( methodName, methodMap ); } } @@ -664,4 +611,4 @@ private Map getMethodMap( Class theClass, String methodName ) return methodMap; } -} \ No newline at end of file +} diff --git a/src/main/java/org/codehaus/plexus/util/reflection/ReflectorException.java b/src/main/java/org/codehaus/plexus/util/reflection/ReflectorException.java index de564e2f..01952f7b 100644 --- a/src/main/java/org/codehaus/plexus/util/reflection/ReflectorException.java +++ b/src/main/java/org/codehaus/plexus/util/reflection/ReflectorException.java @@ -17,18 +17,15 @@ */ /** - * Exception indicating that an error has occurred while instantiating a class - * with the Reflector class. This exception is meant to put a more user-friendly - * face on the myriad other exceptions throws during reflective object creation. + * Exception indicating that an error has occurred while instantiating a class with the Reflector class. This exception + * is meant to put a more user-friendly face on the myriad other exceptions throws during reflective object creation. * * @author John Casey */ public class ReflectorException extends Exception { - /** - * Create a new ReflectorException. - */ + @SuppressWarnings( { "UnusedDeclaration" } ) public ReflectorException() { } @@ -36,8 +33,7 @@ public ReflectorException() /** * Create a new ReflectorException with the specified message. * - * @param msg - * The message. + * @param msg The message. */ public ReflectorException( String msg ) { @@ -47,8 +43,7 @@ public ReflectorException( String msg ) /** * Create a new ReflectorException with the specified root cause. * - * @param root - * The root cause. + * @param root The root cause. */ public ReflectorException( Throwable root ) { @@ -56,13 +51,10 @@ public ReflectorException( Throwable root ) } /** - * Create a new ReflectorException with the specified message and root - * cause. + * Create a new ReflectorException with the specified message and root cause. * - * @param msg - * The message. - * @param root - * The root cause. + * @param msg The message. + * @param root The root cause. */ public ReflectorException( String msg, Throwable root ) { diff --git a/src/main/java/org/codehaus/plexus/util/xml/CompactXMLWriter.java b/src/main/java/org/codehaus/plexus/util/xml/CompactXMLWriter.java index 40dfb063..85835210 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/CompactXMLWriter.java +++ b/src/main/java/org/codehaus/plexus/util/xml/CompactXMLWriter.java @@ -1,13 +1,13 @@ package org.codehaus.plexus.util.xml; /* - * Copyright 2007 The Codehaus Foundation. + * Copyright The Codehaus Foundation. * * Licensed 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, @@ -20,7 +20,7 @@ import java.io.Writer; /** - * @version $Id$ + * */ public class CompactXMLWriter extends PrettyPrintXMLWriter @@ -36,6 +36,7 @@ public CompactXMLWriter( Writer writer ) super( writer ); } + @Override protected void endOfLine() { // override parent: don't write anything at end of line diff --git a/src/main/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.java b/src/main/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.java index 8687195b..c4387317 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.java +++ b/src/main/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.java @@ -1,13 +1,13 @@ package org.codehaus.plexus.util.xml; /* - * Copyright 2008 The Codehaus Foundation. + * Copyright The Codehaus Foundation. * * Licensed 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, @@ -27,7 +27,7 @@ /** * Implementation of XMLWriter which emits nicely formatted documents. * - * @version $Id$ + * */ public class PrettyPrintXMLWriter implements XMLWriter @@ -37,7 +37,7 @@ public class PrettyPrintXMLWriter private PrintWriter writer; - private LinkedList elementStack = new LinkedList(); + private LinkedList elementStack = new LinkedList(); private boolean tagInProgress; @@ -138,7 +138,8 @@ public PrettyPrintXMLWriter( Writer writer, String encoding, String doctype ) * @param encoding could be null or invalid. * @param doctype could be null. */ - public PrettyPrintXMLWriter( PrintWriter writer, String lineIndenter, String lineSeparator, String encoding, String doctype ) + public PrettyPrintXMLWriter( PrintWriter writer, String lineIndenter, String lineSeparator, String encoding, + String doctype ) { setWriter( writer ); @@ -157,6 +158,7 @@ public PrettyPrintXMLWriter( PrintWriter writer, String lineIndenter, String lin } /** {@inheritDoc} */ + @Override public void startElement( String name ) { tagIsEmpty = false; @@ -179,12 +181,14 @@ public void startElement( String name ) } /** {@inheritDoc} */ + @Override public void writeText( String text ) { writeText( text, true ); } /** {@inheritDoc} */ + @Override public void writeMarkup( String text ) { writeText( text, false ); @@ -206,30 +210,60 @@ private void writeText( String text, boolean escapeXml ) write( StringUtils.unifyLineSeparators( text, lineSeparator ) ); } - private static String escapeXml( String text ) - { - text = text.replaceAll( "&", "&" ); + private static final Pattern amp = Pattern.compile( "&" ); - text = text.replaceAll( "<", "<" ); + private static final Pattern lt = Pattern.compile( "<" ); - text = text.replaceAll( ">", ">" ); + private static final Pattern gt = Pattern.compile( ">" ); - text = text.replaceAll( "\"", """ ); + private static final Pattern dqoute = Pattern.compile( "\"" ); - text = text.replaceAll( "\'", "'" ); + private static final Pattern sqoute = Pattern.compile( "\'" ); + + private static String escapeXml( String text ) + { + if ( text.indexOf( '&' ) >= 0 ) + { + text = amp.matcher( text ).replaceAll( "&" ); + } + if ( text.indexOf( '<' ) >= 0 ) + { + text = lt.matcher( text ).replaceAll( "<" ); + } + if ( text.indexOf( '>' ) >= 0 ) + { + text = gt.matcher( text ).replaceAll( ">" ); + } + if ( text.indexOf( '"' ) >= 0 ) + { + text = dqoute.matcher( text ).replaceAll( """ ); + } + if ( text.indexOf( '\'' ) >= 0 ) + { + text = sqoute.matcher( text ).replaceAll( "'" ); + } return text; } + private static final String crlf_str = "\r\n"; + + private static final Pattern crlf = Pattern.compile( crlf_str ); + + private static final Pattern lowers = Pattern.compile( "([\000-\037])" ); + private static String escapeXmlAttribute( String text ) { text = escapeXml( text ); // Windows - text = text.replaceAll( "\r\n", " " ); + Matcher crlfmatcher = crlf.matcher( text ); + if ( text.contains( crlf_str ) ) + { + text = crlfmatcher.replaceAll( " " ); + } - Pattern pattern = Pattern.compile( "([\000-\037])" ); - Matcher m = pattern.matcher( text ); + Matcher m = lowers.matcher( text ); StringBuffer b = new StringBuffer(); while ( m.find() ) { @@ -241,6 +275,7 @@ private static String escapeXmlAttribute( String text ) } /** {@inheritDoc} */ + @Override public void addAttribute( String key, String value ) { write( " " ); @@ -255,6 +290,7 @@ public void addAttribute( String key, String value ) } /** {@inheritDoc} */ + @Override public void endElement() { setDepth( getDepth() - 1 ); @@ -273,7 +309,14 @@ public void endElement() { finishTag(); - write( "" ); + // see issue #51: https://github.com/codehaus-plexus/plexus-utils/issues/51 + // Rationale: replaced 1 write() with string concatenations with 3 write() + // (this avoids the string concatenation optimization bug detected in Java 7) + // TODO: change the below code to a more efficient expression when the library + // be ready to target Java 8. + write( "" ); } readyForNewLine = true; @@ -281,6 +324,7 @@ public void endElement() /** * Write a string to the underlying writer + * * @param str */ private void write( String str ) @@ -340,8 +384,7 @@ protected String getLineSeparator() /** * Set the string used as line separator * - * @param lineSeparator new line separator, could be null but the normal way is valid line separator - * ("\n" on UNIX). + * @param lineSeparator new line separator, could be null but the normal way is valid line separator ("\n" on UNIX). */ protected void setLineSeparator( String lineSeparator ) { @@ -349,8 +392,7 @@ protected void setLineSeparator( String lineSeparator ) } /** - * Write the end of line character (using specified line separator) - * and start new line with indentation + * Write the end of line character (using specified line separator) and start new line with indentation * * @see #getLineIndenter() * @see #getLineSeparator() @@ -399,7 +441,7 @@ protected void setWriter( PrintWriter writer ) { if ( writer == null ) { - throw new IllegalArgumentException( "writer could not be null"); + throw new IllegalArgumentException( "writer could not be null" ); } this.writer = writer; @@ -478,7 +520,7 @@ protected String getDocType() /** * @return the current elementStack; */ - protected LinkedList getElementStack() + protected LinkedList getElementStack() { return elementStack; } diff --git a/src/main/java/org/codehaus/plexus/util/xml/SerializerXMLWriter.java b/src/main/java/org/codehaus/plexus/util/xml/SerializerXMLWriter.java index 9918129a..488103d4 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/SerializerXMLWriter.java +++ b/src/main/java/org/codehaus/plexus/util/xml/SerializerXMLWriter.java @@ -28,7 +28,7 @@ * Write to an MXSerializer. * * @author Brett Porter - * @version $Id$ + * */ public class SerializerXMLWriter implements XMLWriter @@ -37,9 +37,9 @@ public class SerializerXMLWriter private final String namespace; - private final Stack elements = new Stack(); + private final Stack elements = new Stack(); - private List exceptions; + private List exceptions; public SerializerXMLWriter( String namespace, XmlSerializer serializer ) { @@ -47,6 +47,7 @@ public SerializerXMLWriter( String namespace, XmlSerializer serializer ) this.namespace = namespace; } + @Override public void startElement( String name ) { try @@ -60,6 +61,7 @@ public void startElement( String name ) } } + @Override public void addAttribute( String key, String value ) { try @@ -72,6 +74,7 @@ public void addAttribute( String key, String value ) } } + @Override public void writeText( String text ) { try @@ -84,6 +87,7 @@ public void writeText( String text ) } } + @Override public void writeMarkup( String text ) { try @@ -96,11 +100,12 @@ public void writeMarkup( String text ) } } + @Override public void endElement() { try { - serializer.endTag( namespace, (String) elements.pop() ); + serializer.endTag( namespace, elements.pop() ); } catch ( IOException e ) { @@ -115,14 +120,14 @@ private void storeException( IOException e ) { if ( exceptions == null ) { - exceptions = new ArrayList(); + exceptions = new ArrayList(); } exceptions.add( e ); } - public List getExceptions() + public List getExceptions() { - return exceptions == null ? Collections.EMPTY_LIST : exceptions; + return exceptions == null ? Collections.emptyList() : exceptions; } } diff --git a/src/main/java/org/codehaus/plexus/util/xml/XMLWriter.java b/src/main/java/org/codehaus/plexus/util/xml/XMLWriter.java index 1dfe7c3d..364849ba 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/XMLWriter.java +++ b/src/main/java/org/codehaus/plexus/util/xml/XMLWriter.java @@ -1,13 +1,13 @@ package org.codehaus.plexus.util.xml; /* - * Copyright 2007 The Codehaus Foundation. + * Copyright The Codehaus Foundation. * * Licensed 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, @@ -17,7 +17,7 @@ */ /** - * @version $Id$ + * */ public interface XMLWriter { diff --git a/src/main/java/org/codehaus/plexus/util/xml/XmlReader.java b/src/main/java/org/codehaus/plexus/util/xml/XmlReader.java index 7f15c96e..e7c7cc47 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/XmlReader.java +++ b/src/main/java/org/codehaus/plexus/util/xml/XmlReader.java @@ -19,7 +19,6 @@ import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -27,6 +26,7 @@ import java.io.StringReader; import java.net.URL; import java.net.URLConnection; +import java.nio.file.Files; import java.net.HttpURLConnection; import java.util.Locale; import java.util.regex.Pattern; @@ -34,29 +34,32 @@ import java.text.MessageFormat; /** - * Character stream that handles (or at least attemtps to) all the necessary Voodo to figure out the charset encoding of - * the XML document within the stream. - *

                - * IMPORTANT: This class is not related in any way to the org.xml.sax.XMLReader. This one IS a character stream. - *

                - * All this has to be done without consuming characters from the stream, if not the XML parser will not recognized the + *

                Character stream that handles (or at least attempts to) all the necessary Voodo to figure out the charset encoding of + * the XML document within the stream.

                + * + *

                IMPORTANT: This class is not related in any way to the org.xml.sax.XMLReader. This one IS a character stream.

                + * + *

                All this has to be done without consuming characters from the stream, if not the XML parser will not recognized the * document as a valid XML. This is not 100% true, but it's close enough (UTF-8 BOM is not handled by all parsers right - * now, XmlReader handles it and things work in all parsers). - *

                - * The XmlReader class handles the charset encoding of XML documents in Files, raw streams and HTTP streams by offering - * a wide set of constructors. - *

                - * By default the charset encoding detection is lenient, the constructor with the lenient flag can be used for an script - * (following HTTP MIME and XML specifications). All this is nicely explained by Mark Pilgrim in his blog, Determining the character encoding of a feed. - *

                + * now, XmlReader handles it and things work in all parsers).

                + * + *

                The XmlReader class handles the charset encoding of XML documents in Files, raw streams and HTTP streams by offering + * a wide set of constructors.

                + * + *

                By default the charset encoding detection is lenient, the constructor with the lenient flag can be used for an script + * (following HTTP MIME and XML specifications). All this is nicely explained by Mark Pilgrim in his blog, + * Determining the character encoding of a + * feed.

                * * @author Alejandro Abdelnur - * @version revision 1.17 taken on 26/06/2007 from Rome (see https://rome.dev.java.net/source/browse/rome/src/java/com/sun/syndication/io/XmlReader.java) + * @version revision 1.17 taken on 26/06/2007 from Rome (see + * https://rome.dev.java.net/source/browse/rome/src/java/com/sun/syndication/io/XmlReader.java) * @deprecated use XmlStreamReader * @since 1.4.3 */ -public class XmlReader extends Reader +@Deprecated +public class XmlReader + extends Reader { private static final int BUFFER_SIZE = 4096; @@ -81,12 +84,14 @@ public class XmlReader extends Reader private String _defaultEncoding; /** - * Sets the default encoding to use if none is set in HTTP content-type, XML prolog and the rules based on - * content-type are not adequate.

                If it is set to NULL the content-type based rules are used.

                By default - * it is NULL.

                + *

                Sets the default encoding to use if none is set in HTTP content-type, XML prolog and the rules based on + * content-type are not adequate.

                + * + *

                If it is set to NULL the content-type based rules are used.

                + * + *

                By default it is NULL.

                * - * @param encoding - * charset encoding to default to. + * @param encoding charset encoding to default to. */ public static void setDefaultEncoding( String encoding ) { @@ -94,8 +99,10 @@ public static void setDefaultEncoding( String encoding ) } /** - * Returns the default encoding to use if none is set in HTTP content-type, XML prolog and the rules based on - * content-type are not adequate.

                If it is NULL the content-type based rules are used.

                + *

                Returns the default encoding to use if none is set in HTTP content-type, XML prolog and the rules based on + * content-type are not adequate.

                + * + *

                If it is NULL the content-type based rules are used.

                * * @return the default encoding to use. */ @@ -113,15 +120,13 @@ public static String getDefaultEncoding() * It does a lenient charset encoding detection, check the constructor with the lenient parameter for details. *

                * - * @param file - * File to create a Reader from. - * @throws IOException - * thrown if there is a problem reading the file. - * + * @param file File to create a Reader from. + * @throws IOException thrown if there is a problem reading the file. */ - public XmlReader( File file ) throws IOException + public XmlReader( File file ) + throws IOException { - this( new FileInputStream( file ) ); + this( Files.newInputStream( file.toPath() ) ); } /** @@ -132,13 +137,11 @@ public XmlReader( File file ) throws IOException * It does a lenient charset encoding detection, check the constructor with the lenient parameter for details. *

                * - * @param is - * InputStream to create a Reader from. - * @throws IOException - * thrown if there is a problem reading the stream. - * + * @param is InputStream to create a Reader from. + * @throws IOException thrown if there is a problem reading the stream. */ - public XmlReader( InputStream is ) throws IOException + public XmlReader( InputStream is ) + throws IOException { this( is, true ); } @@ -162,17 +165,13 @@ public XmlReader( InputStream is ) throws IOException * If lenient detection is indicated an XmlStreamReaderException is never thrown. *

                * - * @param is - * InputStream to create a Reader from. - * @param lenient - * indicates if the charset encoding detection should be relaxed. - * @throws IOException - * thrown if there is a problem reading the stream. - * @throws XmlStreamReaderException - * thrown if the charset encoding could not be determined according to the specs. - * + * @param is InputStream to create a Reader from. + * @param lenient indicates if the charset encoding detection should be relaxed. + * @throws IOException thrown if there is a problem reading the stream. + * @throws XmlStreamReaderException thrown if the charset encoding could not be determined according to the specs. */ - public XmlReader( InputStream is, boolean lenient ) throws IOException, XmlStreamReaderException + public XmlReader( InputStream is, boolean lenient ) + throws IOException, XmlStreamReaderException { _defaultEncoding = _staticDefaultEncoding; try @@ -204,13 +203,11 @@ public XmlReader( InputStream is, boolean lenient ) throws IOException, XmlStrea * It does a lenient charset encoding detection, check the constructor with the lenient parameter for details. *

                * - * @param url - * URL to create a Reader from. - * @throws IOException - * thrown if there is a problem reading the stream of the URL. - * + * @param url URL to create a Reader from. + * @throws IOException thrown if there is a problem reading the stream of the URL. */ - public XmlReader( URL url ) throws IOException + public XmlReader( URL url ) + throws IOException { this( url.openConnection() ); } @@ -227,13 +224,11 @@ public XmlReader( URL url ) throws IOException * It does a lenient charset encoding detection, check the constructor with the lenient parameter for details. *

                * - * @param conn - * URLConnection to create a Reader from. - * @throws IOException - * thrown if there is a problem reading the stream of the URLConnection. - * + * @param conn URLConnection to create a Reader from. + * @throws IOException thrown if there is a problem reading the stream of the URLConnection. */ - public XmlReader( URLConnection conn ) throws IOException + public XmlReader( URLConnection conn ) + throws IOException { _defaultEncoding = _staticDefaultEncoding; boolean lenient = true; @@ -282,15 +277,12 @@ else if ( conn.getContentType() != null ) * It does a lenient charset encoding detection, check the constructor with the lenient parameter for details. *

                * - * @param is - * InputStream to create the reader from. - * @param httpContentType - * content-type header to use for the resolution of the charset encoding. - * @throws IOException - * thrown if there is a problem reading the file. - * + * @param is InputStream to create the reader from. + * @param httpContentType content-type header to use for the resolution of the charset encoding. + * @throws IOException thrown if there is a problem reading the file. */ - public XmlReader( InputStream is, String httpContentType ) throws IOException + public XmlReader( InputStream is, String httpContentType ) + throws IOException { this( is, httpContentType, true ); } @@ -317,17 +309,12 @@ public XmlReader( InputStream is, String httpContentType ) throws IOException * If lenient detection is indicated an XmlStreamReaderException is never thrown. *

                * - * @param is - * InputStream to create the reader from. - * @param httpContentType - * content-type header to use for the resolution of the charset encoding. - * @param lenient - * indicates if the charset encoding detection should be relaxed. - * @throws IOException - * thrown if there is a problem reading the file. - * @throws XmlStreamReaderException - * thrown if the charset encoding could not be determined according to the specs. - * + * @param is InputStream to create the reader from. + * @param httpContentType content-type header to use for the resolution of the charset encoding. + * @param lenient indicates if the charset encoding detection should be relaxed. + * @param defaultEncoding encoding to use + * @throws IOException thrown if there is a problem reading the file. + * @throws XmlStreamReaderException thrown if the charset encoding could not be determined according to the specs. */ public XmlReader( InputStream is, String httpContentType, boolean lenient, String defaultEncoding ) throws IOException, XmlStreamReaderException @@ -372,24 +359,20 @@ public XmlReader( InputStream is, String httpContentType, boolean lenient, Strin * If lenient detection is indicated an XmlStreamReaderException is never thrown. *

                * - * @param is - * InputStream to create the reader from. - * @param httpContentType - * content-type header to use for the resolution of the charset encoding. - * @param lenient - * indicates if the charset encoding detection should be relaxed. - * @throws IOException - * thrown if there is a problem reading the file. - * @throws XmlStreamReaderException - * thrown if the charset encoding could not be determined according to the specs. - * + * @param is InputStream to create the reader from. + * @param httpContentType content-type header to use for the resolution of the charset encoding. + * @param lenient indicates if the charset encoding detection should be relaxed. + * @throws IOException thrown if there is a problem reading the file. + * @throws XmlStreamReaderException thrown if the charset encoding could not be determined according to the specs. */ - public XmlReader( InputStream is, String httpContentType, boolean lenient ) throws IOException, XmlStreamReaderException + public XmlReader( InputStream is, String httpContentType, boolean lenient ) + throws IOException, XmlStreamReaderException { this( is, httpContentType, lenient, null ); } - private void doLenientDetection( String httpContentType, XmlStreamReaderException ex ) throws IOException + private void doLenientDetection( String httpContentType, XmlStreamReaderException ex ) + throws IOException { if ( httpContentType != null ) { @@ -428,14 +411,15 @@ private void doLenientDetection( String httpContentType, XmlStreamReaderExceptio *

                * * @return charset encoding. - * */ public String getEncoding() { return _encoding; } - public int read( char[] buf, int offset, int len ) throws IOException + @Override + public int read( char[] buf, int offset, int len ) + throws IOException { return _reader.read( buf, offset, len ); } @@ -444,16 +428,17 @@ public int read( char[] buf, int offset, int len ) throws IOException * Closes the XmlReader stream. *

                * - * @throws IOException - * thrown if there was a problem closing the stream. - * + * @throws IOException thrown if there was a problem closing the stream. */ - public void close() throws IOException + @Override + public void close() + throws IOException { _reader.close(); } - private void doRawStream( InputStream is, boolean lenient ) throws IOException + private void doRawStream( InputStream is, boolean lenient ) + throws IOException { BufferedInputStream pis = new BufferedInputStream( is, BUFFER_SIZE ); String bomEnc = getBOMEncoding( pis ); @@ -463,7 +448,8 @@ private void doRawStream( InputStream is, boolean lenient ) throws IOException prepareReader( pis, encoding ); } - private void doHttpStream( InputStream is, String httpContentType, boolean lenient ) throws IOException + private void doHttpStream( InputStream is, String httpContentType, boolean lenient ) + throws IOException { BufferedInputStream pis = new BufferedInputStream( is, BUFFER_SIZE ); String cTMime = getContentTypeMime( httpContentType ); @@ -475,7 +461,8 @@ private void doHttpStream( InputStream is, String httpContentType, boolean lenie prepareReader( pis, encoding ); } - private void prepareReader( InputStream is, String encoding ) throws IOException + private void prepareReader( InputStream is, String encoding ) + throws IOException { _reader = new InputStreamReader( is, encoding ); _encoding = encoding; @@ -505,13 +492,13 @@ else if ( bomEnc.equals( UTF_8 ) ) { if ( xmlGuessEnc != null && !xmlGuessEnc.equals( UTF_8 ) ) { - throw new XmlStreamReaderException( RAW_EX_1.format( new Object[] { bomEnc, xmlGuessEnc, xmlEnc } ), bomEnc, - xmlGuessEnc, xmlEnc, is ); + throw new XmlStreamReaderException( RAW_EX_1.format( new Object[] { bomEnc, xmlGuessEnc, xmlEnc } ), + bomEnc, xmlGuessEnc, xmlEnc, is ); } if ( xmlEnc != null && !xmlEnc.equals( UTF_8 ) ) { - throw new XmlStreamReaderException( RAW_EX_1.format( new Object[] { bomEnc, xmlGuessEnc, xmlEnc } ), bomEnc, - xmlGuessEnc, xmlEnc, is ); + throw new XmlStreamReaderException( RAW_EX_1.format( new Object[] { bomEnc, xmlGuessEnc, xmlEnc } ), + bomEnc, xmlGuessEnc, xmlEnc, is ); } encoding = UTF_8; } @@ -523,22 +510,23 @@ else if ( bomEnc.equals( UTF_16BE ) || bomEnc.equals( UTF_16LE ) ) } if ( xmlEnc != null && !xmlEnc.equals( UTF_16 ) && !xmlEnc.equals( bomEnc ) ) { - throw new XmlStreamReaderException( RAW_EX_1.format( new Object[] { bomEnc, xmlGuessEnc, xmlEnc } ), bomEnc, - xmlGuessEnc, xmlEnc, is ); + throw new XmlStreamReaderException( RAW_EX_1.format( new Object[] { bomEnc, xmlGuessEnc, xmlEnc } ), + bomEnc, xmlGuessEnc, xmlEnc, is ); } encoding = bomEnc; } else { throw new XmlStreamReaderException( RAW_EX_2.format( new Object[] { bomEnc, xmlGuessEnc, xmlEnc } ), bomEnc, - xmlGuessEnc, xmlEnc, is ); + xmlGuessEnc, xmlEnc, is ); } return encoding; } // InputStream is passed for XmlStreamReaderException creation only - private String calculateHttpEncoding( String cTMime, String cTEnc, String bomEnc, String xmlGuessEnc, - String xmlEnc, InputStream is, boolean lenient ) throws IOException + private String calculateHttpEncoding( String cTMime, String cTEnc, String bomEnc, String xmlGuessEnc, String xmlEnc, + InputStream is, boolean lenient ) + throws IOException { String encoding; if ( lenient & xmlEnc != null ) @@ -564,8 +552,8 @@ private String calculateHttpEncoding( String cTMime, String cTEnc, String bomEnc } else if ( bomEnc != null && ( cTEnc.equals( UTF_16BE ) || cTEnc.equals( UTF_16LE ) ) ) { - throw new XmlStreamReaderException( HTTP_EX_1.format( new Object[] { cTMime, cTEnc, bomEnc, xmlGuessEnc, - xmlEnc } ), cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc, is ); + throw new XmlStreamReaderException( HTTP_EX_1.format( new Object[] { cTMime, cTEnc, bomEnc, + xmlGuessEnc, xmlEnc } ), cTMime, cTEnc, bomEnc, xmlGuessEnc, xmlEnc, is ); } else if ( cTEnc.equals( UTF_16 ) ) { @@ -627,7 +615,8 @@ private static String getContentTypeEncoding( String httpContentType ) // returns the BOM in the stream, NULL if not present, // if there was BOM the in the stream it is consumed - private static String getBOMEncoding( BufferedInputStream is ) throws IOException + private static String getBOMEncoding( BufferedInputStream is ) + throws IOException { String encoding = null; int[] bytes = new int[3]; @@ -662,7 +651,8 @@ else if ( bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF ) } // returns the best guess for the encoding by looking the first bytes of the stream, ', NULL if none - private static String getXmlProlog( BufferedInputStream is, String guessedEnc ) throws IOException + private static String getXmlProlog( BufferedInputStream is, String guessedEnc ) + throws IOException { String encoding = null; if ( guessedEnc != null ) @@ -731,8 +722,9 @@ private static String getXmlProlog( BufferedInputStream is, String guessedEnc ) if ( bytesRead > 0 ) { is.reset(); - BufferedReader bReader = new BufferedReader( new StringReader( xmlProlog.substring( 0, firstGT + 1 ) ) ); - StringBuffer prolog = new StringBuffer(); + BufferedReader bReader = + new BufferedReader( new StringReader( xmlProlog.substring( 0, firstGT + 1 ) ) ); + StringBuilder prolog = new StringBuilder(); String line = bReader.readLine(); while ( line != null ) { @@ -753,16 +745,16 @@ private static String getXmlProlog( BufferedInputStream is, String guessedEnc ) // indicates if the MIME type belongs to the APPLICATION XML family private static boolean isAppXml( String mime ) { - return mime != null - && ( mime.equals( "application/xml" ) || mime.equals( "application/xml-dtd" ) - || mime.equals( "application/xml-external-parsed-entity" ) || ( mime.startsWith( "application/" ) && mime.endsWith( "+xml" ) ) ); + return mime != null && ( mime.equals( "application/xml" ) || mime.equals( "application/xml-dtd" ) + || mime.equals( "application/xml-external-parsed-entity" ) + || ( mime.startsWith( "application/" ) && mime.endsWith( "+xml" ) ) ); } // indicates if the MIME type belongs to the TEXT XML family private static boolean isTextXml( String mime ) { - return mime != null - && ( mime.equals( "text/xml" ) || mime.equals( "text/xml-external-parsed-entity" ) || ( mime.startsWith( "text/" ) && mime.endsWith( "+xml" ) ) ); + return mime != null && ( mime.equals( "text/xml" ) || mime.equals( "text/xml-external-parsed-entity" ) + || ( mime.startsWith( "text/" ) && mime.endsWith( "+xml" ) ) ); } private static final MessageFormat RAW_EX_1 = @@ -772,15 +764,12 @@ private static boolean isTextXml( String mime ) new MessageFormat( "Invalid encoding, BOM [{0}] XML guess [{1}] XML prolog [{2}] unknown BOM" ); private static final MessageFormat HTTP_EX_1 = - new MessageFormat( - "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], BOM must be NULL" ); + new MessageFormat( "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], BOM must be NULL" ); private static final MessageFormat HTTP_EX_2 = - new MessageFormat( - "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], encoding mismatch" ); + new MessageFormat( "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], encoding mismatch" ); private static final MessageFormat HTTP_EX_3 = - new MessageFormat( - "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], Invalid MIME" ); + new MessageFormat( "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], Invalid MIME" ); } diff --git a/src/main/java/org/codehaus/plexus/util/xml/XmlReaderException.java b/src/main/java/org/codehaus/plexus/util/xml/XmlReaderException.java index 1c5a42d6..1e015506 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/XmlReaderException.java +++ b/src/main/java/org/codehaus/plexus/util/xml/XmlReaderException.java @@ -28,9 +28,11 @@ *

                * * @author Alejandro Abdelnur - * @version revision 1.1 taken on 26/06/2007 from Rome (see https://rome.dev.java.net/source/browse/rome/src/java/com/sun/syndication/io/XmlReaderException.java) + * @version revision 1.1 taken on 26/06/2007 from Rome (see + * https://rome.dev.java.net/source/browse/rome/src/java/com/sun/syndication/io/XmlReaderException.java) */ -public class XmlReaderException extends IOException +public class XmlReaderException + extends IOException { private String _bomEncoding; @@ -50,17 +52,11 @@ public class XmlReaderException extends IOException * Instances of this exception are thrown by the XmlReader. *

                * - * @param msg - * message describing the reason for the exception. - * @param bomEnc - * BOM encoding. - * @param xmlGuessEnc - * XML guess encoding. - * @param xmlEnc - * XML prolog encoding. - * @param is - * the unconsumed InputStream. - * + * @param msg message describing the reason for the exception. + * @param bomEnc BOM encoding. + * @param xmlGuessEnc XML guess encoding. + * @param xmlEnc XML prolog encoding. + * @param is the unconsumed InputStream. */ public XmlReaderException( String msg, String bomEnc, String xmlGuessEnc, String xmlEnc, InputStream is ) { @@ -73,21 +69,13 @@ public XmlReaderException( String msg, String bomEnc, String xmlGuessEnc, String * Instances of this exception are thrown by the XmlReader. *

                * - * @param msg - * message describing the reason for the exception. - * @param ctMime - * MIME type in the content-type. - * @param ctEnc - * encoding in the content-type. - * @param bomEnc - * BOM encoding. - * @param xmlGuessEnc - * XML guess encoding. - * @param xmlEnc - * XML prolog encoding. - * @param is - * the unconsumed InputStream. - * + * @param msg message describing the reason for the exception. + * @param ctMime MIME type in the content-type. + * @param ctEnc encoding in the content-type. + * @param bomEnc BOM encoding. + * @param xmlGuessEnc XML guess encoding. + * @param xmlEnc XML prolog encoding. + * @param is the unconsumed InputStream. */ public XmlReaderException( String msg, String ctMime, String ctEnc, String bomEnc, String xmlGuessEnc, String xmlEnc, InputStream is ) @@ -106,7 +94,6 @@ public XmlReaderException( String msg, String ctMime, String ctEnc, String bomEn *

                * * @return the BOM encoding, null if none. - * */ public String getBomEncoding() { @@ -118,7 +105,6 @@ public String getBomEncoding() *

                * * @return the encoding guess, null if it couldn't be guessed. - * */ public String getXmlGuessEncoding() { @@ -130,7 +116,6 @@ public String getXmlGuessEncoding() *

                * * @return the encoding of the XML prolog, null if none. - * */ public String getXmlEncoding() { @@ -143,7 +128,6 @@ public String getXmlEncoding() * * @return the MIME type in the content-type, null if there was not content-type or the encoding detection did not * involve HTTP. - * */ public String getContentTypeMime() { @@ -156,7 +140,6 @@ public String getContentTypeMime() * * @return the encoding in the content-type, null if there was not content-type, no encoding in it or the encoding * detection did not involve HTTP. - * */ public String getContentTypeEncoding() { @@ -169,7 +152,6 @@ public String getContentTypeEncoding() *

                * * @return the unconsumed InputStream. - * */ public InputStream getInputStream() { diff --git a/src/main/java/org/codehaus/plexus/util/xml/XmlStreamReader.java b/src/main/java/org/codehaus/plexus/util/xml/XmlStreamReader.java index 415daac2..5c26aa98 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/XmlStreamReader.java +++ b/src/main/java/org/codehaus/plexus/util/xml/XmlStreamReader.java @@ -23,7 +23,7 @@ import java.net.URLConnection; /** - * Character stream that handles (or at least attemtps to) all the necessary Voodo to figure out the charset encoding of + * Character stream that handles (or at least attempts to) all the necessary Voodo to figure out the charset encoding of * the XML document within the stream. *

                * IMPORTANT: This class is not related in any way to the org.xml.sax.XMLReader. This one IS a character stream. @@ -36,16 +36,18 @@ * a wide set of constructors. *

                * By default the charset encoding detection is lenient, the constructor with the lenient flag can be used for an script - * (following HTTP MIME and XML specifications). All this is nicely explained by Mark Pilgrim in his blog, Determining the character encoding of a feed. + * (following HTTP MIME and XML specifications). All this is nicely explained by Mark Pilgrim in his blog, + * Determining the character encoding of a + * feed. *

                * * @author Alejandro Abdelnur - * @version revision 1.17 taken on 26/06/2007 from Rome (see https://rome.dev.java.net/source/browse/rome/src/java/com/sun/syndication/io/XmlReader.java) + * @version revision 1.17 taken on 26/06/2007 from Rome (see + * https://rome.dev.java.net/source/browse/rome/src/java/com/sun/syndication/io/XmlReader.java) * @since 1.4.4 */ public class XmlStreamReader -extends XmlReader + extends XmlReader { /** * Creates a Reader for a File. @@ -56,13 +58,11 @@ public class XmlStreamReader * It does a lenient charset encoding detection, check the constructor with the lenient parameter for details. *

                * - * @param file - * File to create a Reader from. - * @throws IOException - * thrown if there is a problem reading the file. - * + * @param file File to create a Reader from. + * @throws IOException thrown if there is a problem reading the file. */ - public XmlStreamReader( File file ) throws IOException + public XmlStreamReader( File file ) + throws IOException { super( file ); } @@ -75,13 +75,11 @@ public XmlStreamReader( File file ) throws IOException * It does a lenient charset encoding detection, check the constructor with the lenient parameter for details. *

                * - * @param is - * InputStream to create a Reader from. - * @throws IOException - * thrown if there is a problem reading the stream. - * + * @param is InputStream to create a Reader from. + * @throws IOException thrown if there is a problem reading the stream. */ - public XmlStreamReader( InputStream is ) throws IOException + public XmlStreamReader( InputStream is ) + throws IOException { super( is ); } @@ -105,17 +103,13 @@ public XmlStreamReader( InputStream is ) throws IOException * If lenient detection is indicated an XmlStreamReaderException is never thrown. *

                * - * @param is - * InputStream to create a Reader from. - * @param lenient - * indicates if the charset encoding detection should be relaxed. - * @throws IOException - * thrown if there is a problem reading the stream. - * @throws XmlStreamReaderException - * thrown if the charset encoding could not be determined according to the specs. - * + * @param is InputStream to create a Reader from. + * @param lenient indicates if the charset encoding detection should be relaxed. + * @throws IOException thrown if there is a problem reading the stream. + * @throws XmlStreamReaderException thrown if the charset encoding could not be determined according to the specs. */ - public XmlStreamReader( InputStream is, boolean lenient ) throws IOException, XmlStreamReaderException + public XmlStreamReader( InputStream is, boolean lenient ) + throws IOException, XmlStreamReaderException { super( is, lenient ); } @@ -132,13 +126,11 @@ public XmlStreamReader( InputStream is, boolean lenient ) throws IOException, Xm * It does a lenient charset encoding detection, check the constructor with the lenient parameter for details. *

                * - * @param url - * URL to create a Reader from. - * @throws IOException - * thrown if there is a problem reading the stream of the URL. - * + * @param url URL to create a Reader from. + * @throws IOException thrown if there is a problem reading the stream of the URL. */ - public XmlStreamReader( URL url ) throws IOException + public XmlStreamReader( URL url ) + throws IOException { super( url ); } @@ -155,13 +147,11 @@ public XmlStreamReader( URL url ) throws IOException * It does a lenient charset encoding detection, check the constructor with the lenient parameter for details. *

                * - * @param conn - * URLConnection to create a Reader from. - * @throws IOException - * thrown if there is a problem reading the stream of the URLConnection. - * + * @param conn URLConnection to create a Reader from. + * @throws IOException thrown if there is a problem reading the stream of the URLConnection. */ - public XmlStreamReader( URLConnection conn ) throws IOException + public XmlStreamReader( URLConnection conn ) + throws IOException { super( conn ); } @@ -176,15 +166,12 @@ public XmlStreamReader( URLConnection conn ) throws IOException * It does a lenient charset encoding detection, check the constructor with the lenient parameter for details. *

                * - * @param is - * InputStream to create the reader from. - * @param httpContentType - * content-type header to use for the resolution of the charset encoding. - * @throws IOException - * thrown if there is a problem reading the file. - * + * @param is InputStream to create the reader from. + * @param httpContentType content-type header to use for the resolution of the charset encoding. + * @throws IOException thrown if there is a problem reading the file. */ - public XmlStreamReader( InputStream is, String httpContentType ) throws IOException + public XmlStreamReader( InputStream is, String httpContentType ) + throws IOException { super( is, httpContentType ); } @@ -211,17 +198,12 @@ public XmlStreamReader( InputStream is, String httpContentType ) throws IOExcept * If lenient detection is indicated an XmlStreamReaderException is never thrown. *

                * - * @param is - * InputStream to create the reader from. - * @param httpContentType - * content-type header to use for the resolution of the charset encoding. - * @param lenient - * indicates if the charset encoding detection should be relaxed. - * @throws IOException - * thrown if there is a problem reading the file. - * @throws XmlStreamReaderException - * thrown if the charset encoding could not be determined according to the specs. - * + * @param is InputStream to create the reader from. + * @param httpContentType content-type header to use for the resolution of the charset encoding. + * @param lenient indicates if the charset encoding detection should be relaxed. + * @param defaultEncoding encoding to use + * @throws IOException thrown if there is a problem reading the file. + * @throws XmlStreamReaderException thrown if the charset encoding could not be determined according to the specs. */ public XmlStreamReader( InputStream is, String httpContentType, boolean lenient, String defaultEncoding ) throws IOException, XmlStreamReaderException @@ -251,19 +233,14 @@ public XmlStreamReader( InputStream is, String httpContentType, boolean lenient, * If lenient detection is indicated an XmlStreamReaderException is never thrown. *

                * - * @param is - * InputStream to create the reader from. - * @param httpContentType - * content-type header to use for the resolution of the charset encoding. - * @param lenient - * indicates if the charset encoding detection should be relaxed. - * @throws IOException - * thrown if there is a problem reading the file. - * @throws XmlStreamReaderException - * thrown if the charset encoding could not be determined according to the specs. - * + * @param is InputStream to create the reader from. + * @param httpContentType content-type header to use for the resolution of the charset encoding. + * @param lenient indicates if the charset encoding detection should be relaxed. + * @throws IOException thrown if there is a problem reading the file. + * @throws XmlStreamReaderException thrown if the charset encoding could not be determined according to the specs. */ - public XmlStreamReader( InputStream is, String httpContentType, boolean lenient ) throws IOException, XmlStreamReaderException + public XmlStreamReader( InputStream is, String httpContentType, boolean lenient ) + throws IOException, XmlStreamReaderException { super( is, httpContentType, lenient ); } diff --git a/src/main/java/org/codehaus/plexus/util/xml/XmlStreamReaderException.java b/src/main/java/org/codehaus/plexus/util/xml/XmlStreamReaderException.java index 1b69d67a..dc919981 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/XmlStreamReaderException.java +++ b/src/main/java/org/codehaus/plexus/util/xml/XmlStreamReaderException.java @@ -19,17 +19,20 @@ import java.io.InputStream; /** - * The XmlStreamReaderException is thrown by the XmlStreamReader constructors if the charset encoding can not be determined - * according to the XML 1.0 specification and RFC 3023. + * The XmlStreamReaderException is thrown by the XmlStreamReader constructors if the charset encoding can not be + * determined according to the XML 1.0 specification and RFC 3023. *

                * The exception returns the unconsumed InputStream to allow the application to do an alternate processing with the - * stream. Note that the original InputStream given to the XmlStreamReader cannot be used as that one has been already read. + * stream. Note that the original InputStream given to the XmlStreamReader cannot be used as that one has been already + * read. *

                * * @author Alejandro Abdelnur - * @version revision 1.1 taken on 26/06/2007 from Rome (see https://rome.dev.java.net/source/browse/rome/src/java/com/sun/syndication/io/XmlReaderException.java) + * @version revision 1.1 taken on 26/06/2007 from Rome (see + * https://rome.dev.java.net/source/browse/rome/src/java/com/sun/syndication/io/XmlReaderException.java) */ -public class XmlStreamReaderException extends XmlReaderException +public class XmlStreamReaderException + extends XmlReaderException { /** * Creates an exception instance if the charset encoding could not be determined. @@ -37,17 +40,11 @@ public class XmlStreamReaderException extends XmlReaderException * Instances of this exception are thrown by the XmlReader. *

                * - * @param msg - * message describing the reason for the exception. - * @param bomEnc - * BOM encoding. - * @param xmlGuessEnc - * XML guess encoding. - * @param xmlEnc - * XML prolog encoding. - * @param is - * the unconsumed InputStream. - * + * @param msg message describing the reason for the exception. + * @param bomEnc BOM encoding. + * @param xmlGuessEnc XML guess encoding. + * @param xmlEnc XML prolog encoding. + * @param is the unconsumed InputStream. */ public XmlStreamReaderException( String msg, String bomEnc, String xmlGuessEnc, String xmlEnc, InputStream is ) { @@ -60,24 +57,16 @@ public XmlStreamReaderException( String msg, String bomEnc, String xmlGuessEnc, * Instances of this exception are thrown by the XmlReader. *

                * - * @param msg - * message describing the reason for the exception. - * @param ctMime - * MIME type in the content-type. - * @param ctEnc - * encoding in the content-type. - * @param bomEnc - * BOM encoding. - * @param xmlGuessEnc - * XML guess encoding. - * @param xmlEnc - * XML prolog encoding. - * @param is - * the unconsumed InputStream. - * + * @param msg message describing the reason for the exception. + * @param ctMime MIME type in the content-type. + * @param ctEnc encoding in the content-type. + * @param bomEnc BOM encoding. + * @param xmlGuessEnc XML guess encoding. + * @param xmlEnc XML prolog encoding. + * @param is the unconsumed InputStream. */ public XmlStreamReaderException( String msg, String ctMime, String ctEnc, String bomEnc, String xmlGuessEnc, - String xmlEnc, InputStream is ) + String xmlEnc, InputStream is ) { super( msg, ctMime, ctEnc, bomEnc, xmlGuessEnc, xmlEnc, is ); } diff --git a/src/main/java/org/codehaus/plexus/util/xml/XmlStreamWriter.java b/src/main/java/org/codehaus/plexus/util/xml/XmlStreamWriter.java index 22da5369..9b5f0a92 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/XmlStreamWriter.java +++ b/src/main/java/org/codehaus/plexus/util/xml/XmlStreamWriter.java @@ -17,26 +17,26 @@ */ import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.StringWriter; import java.io.Writer; +import java.nio.file.Files; import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; /** - * Character stream that handles (or at least attemtps to) all the necessary Voodo to figure out the charset encoding of + * Character stream that handles (or at least attempts to) all the necessary Voodo to figure out the charset encoding of * the XML document written to the stream. + * * @author Herve Boutemy - * @version $Id$ + * * @since 1.4.4 */ public class XmlStreamWriter -extends Writer + extends Writer { private static final int BUFFER_SIZE = 4096; @@ -54,9 +54,9 @@ public XmlStreamWriter( OutputStream out ) } public XmlStreamWriter( File file ) - throws FileNotFoundException + throws IOException { - this( new FileOutputStream( file ) ); + this( Files.newOutputStream( file.toPath() ) ); } public String getEncoding() @@ -64,8 +64,9 @@ public String getEncoding() return encoding; } + @Override public void close() - throws IOException + throws IOException { if ( writer == null ) { @@ -76,8 +77,9 @@ public void close() writer.close(); } + @Override public void flush() - throws IOException + throws IOException { if ( writer != null ) { @@ -86,7 +88,7 @@ public void flush() } private void detectEncoding( char[] cbuf, int off, int len ) - throws IOException + throws IOException { int size = len; StringBuffer xmlProlog = xmlPrologWriter.getBuffer(); @@ -146,8 +148,9 @@ private void detectEncoding( char[] cbuf, int off, int len ) } } + @Override public void write( char[] cbuf, int off, int len ) - throws IOException + throws IOException { if ( xmlPrologWriter != null ) { diff --git a/src/main/java/org/codehaus/plexus/util/xml/XmlUtil.java b/src/main/java/org/codehaus/plexus/util/xml/XmlUtil.java index 1973e340..73464b8e 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/XmlUtil.java +++ b/src/main/java/org/codehaus/plexus/util/xml/XmlUtil.java @@ -24,7 +24,6 @@ import java.io.Reader; import java.io.Writer; -import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.WriterFactory; @@ -36,7 +35,7 @@ * Common XML utilities methods. * * @author Vincent Siveton - * @version $Id$ + * * @since 1.5.7 */ public class XmlUtil @@ -65,32 +64,28 @@ public static boolean isXml( File f ) throw new IllegalArgumentException( "The file '" + f.getAbsolutePath() + "' is not a file." ); } - Reader reader = null; - try + try ( Reader reader = ReaderFactory.newXmlReader( f ) ) { - reader = ReaderFactory.newXmlReader( f ); XmlPullParser parser = new MXParser(); parser.setInput( reader ); parser.nextToken(); - return true; } catch ( Exception e ) { return false; } - finally - { - IOUtil.close( reader ); - } } /** * Pretty format the input reader. For instance, the following input: + * *

                      * <div><b>content</b></div>
                      * 
                + * * becomes + * *
                      * <div>
                      *   <b>content</b>
                @@ -112,10 +107,13 @@ public static void prettyFormat( Reader reader, Writer writer )
                 
                     /**
                      * Pretty format the input reader. For instance, the following input:
                +     * 
                      * 
                      * <div><b>content</b></div>
                      * 
                + * * becomes + * *
                      * <div>
                      *   <b>content</b>
                @@ -165,10 +163,13 @@ public static void prettyFormat( Reader reader, Writer writer, int indentSize, S
                 
                     /**
                      * Pretty format the input stream. For instance, the following input:
                +     * 
                      * 
                      * <div><b>content</b></div>
                      * 
                + * * becomes + * *
                      * <div>
                      *   <b>content</b>
                @@ -188,10 +189,13 @@ public static void prettyFormat( InputStream is, OutputStream os )
                 
                     /**
                      * Pretty format the input stream. For instance, the following input:
                +     * 
                      * 
                      * <div><b>content</b></div>
                      * 
                + * * becomes + * *
                      * <div>
                      *   <b>content</b>
                @@ -220,18 +224,14 @@ public static void prettyFormat( InputStream is, OutputStream os, int indentSize
                             indentSize = 0;
                         }
                 
                -        Reader reader = null;
                -
                -        Writer out = new OutputStreamWriter( os );
                -        PrettyPrintXMLWriter xmlWriter = new PrettyPrintXMLWriter( out );
                -        xmlWriter.setLineIndenter( StringUtils.repeat( " ", indentSize ) );
                -        xmlWriter.setLineSeparator( lineSeparator );
                -
                -        XmlPullParser parser = new MXParser();
                -        try
                +        try ( Reader reader = ReaderFactory.newXmlReader( is );
                +              Writer writer = new OutputStreamWriter( os ) )
                         {
                -            reader = ReaderFactory.newXmlReader( is );
                +            final PrettyPrintXMLWriter xmlWriter = new PrettyPrintXMLWriter( writer );
                +            xmlWriter.setLineIndenter( StringUtils.repeat( " ", indentSize ) );
                +            xmlWriter.setLineSeparator( lineSeparator );
                 
                +            final XmlPullParser parser = new MXParser();
                             parser.setInput( reader );
                 
                             prettyFormatInternal( parser, xmlWriter );
                @@ -240,11 +240,6 @@ public static void prettyFormat( InputStream is, OutputStream os, int indentSize
                         {
                             throw new IOException( "Unable to parse the XML: " + e.getMessage() );
                         }
                -        finally
                -        {
                -            IOUtil.close( reader );
                -            IOUtil.close( out );
                -        }
                     }
                 
                     /**
                diff --git a/src/main/java/org/codehaus/plexus/util/xml/XmlWriterUtil.java b/src/main/java/org/codehaus/plexus/util/xml/XmlWriterUtil.java
                index 88e89885..22527a1b 100644
                --- a/src/main/java/org/codehaus/plexus/util/xml/XmlWriterUtil.java
                +++ b/src/main/java/org/codehaus/plexus/util/xml/XmlWriterUtil.java
                @@ -1,13 +1,13 @@
                 package org.codehaus.plexus.util.xml;
                 
                 /*
                - * Copyright 2008 The Codehaus Foundation.
                + * Copyright The Codehaus Foundation.
                  *
                  * Licensed 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,
                @@ -22,7 +22,7 @@
                  * Utility class for the XmlWriter class.
                  *
                  * @author Vincent Siveton
                - * @version $Id$
                + *
                  */
                 public class XmlWriterUtil
                 {
                @@ -63,7 +63,7 @@ public static void writeLineBreak( XMLWriter writer, int repeat )
                      * Convenience method to repeat CRLF and to indent the writer by 2.
                      *
                      * @param writer not null
                -     * @param repeat
                +     * @param repeat space repeat
                      * @param indent positive number
                      * @see #DEFAULT_INDENTATION_SIZE
                      * @see #writeLineBreak(XMLWriter, int, int, int)
                @@ -77,7 +77,7 @@ public static void writeLineBreak( XMLWriter writer, int repeat, int indent )
                      * Convenience method to repeat CRLF and to indent the writer by indentSize.
                      *
                      * @param writer not null
                -     * @param repeat
                +     * @param repeat repeat time
                      * @param indent positive number
                      * @param indentSize positive number
                      */
                @@ -127,10 +127,11 @@ public static void writeCommentLineBreak( XMLWriter writer, int columnSize )
                     }
                 
                     /**
                -     * Convenience method to write XML comment line. The comment is splitted to have a size of 80.
                +     * Convenience method to write XML comment line. The comment is splitted to have a size of
                +     * 80.
                      *
                      * @param writer not null
                -     * @param comment
                +     * @param comment the comment
                      * @see #DEFAULT_INDENTATION_SIZE
                      * @see #writeComment(XMLWriter, String, int, int)
                      */
                @@ -140,11 +141,11 @@ public static void writeComment( XMLWriter writer, String comment )
                     }
                 
                     /**
                -     * Convenience method to write XML comment line. The comment is splitted to have a size of 80
                -     * and is indented by indent using 2 as indentation size.
                +     * Convenience method to write XML comment line. The comment is splitted to have a size of
                +     * 80 and is indented by indent using 2 as indentation size.
                      *
                      * @param writer not null
                -     * @param comment
                +     * @param comment the comment
                      * @param indent positive number
                      * @see #DEFAULT_INDENTATION_SIZE
                      * @see #writeComment(XMLWriter, String, int, int)
                @@ -155,11 +156,11 @@ public static void writeComment( XMLWriter writer, String comment, int indent )
                     }
                 
                     /**
                -     * Convenience method to write XML comment line. The comment is splitted to have a size of 80
                -     * and is indented by indent using indentSize.
                +     * Convenience method to write XML comment line. The comment is splitted to have a size of
                +     * 80 and is indented by indent using indentSize.
                      *
                      * @param writer not null
                -     * @param comment
                +     * @param comment the comment
                      * @param indent positive number
                      * @param indentSize positive number
                      * @see #DEFAULT_COLUMN_LINE
                @@ -169,23 +170,34 @@ public static void writeComment( XMLWriter writer, String comment, int indent, i
                     {
                         writeComment( writer, comment, indent, indentSize, DEFAULT_COLUMN_LINE );
                     }
                +
                     /**
                -     * Convenience method to write XML comment line. The comment is splitted to have a size of columnSize
                -     * and is indented by indent using indentSize.
                +     * Convenience method to write XML comment line. The comment is splitted to have a size of
                +     * columnSize and is indented by indent using indentSize.
                      *
                      * @param writer not null
                -     * @param comment
                +     * @param comment the comment
                      * @param indent positive number
                      * @param indentSize positive number
                      * @param columnSize positive number
                      */
                -    public static void writeComment( XMLWriter writer, String comment, int indent, int indentSize, int columnSize  )
                +    public static void writeComment( XMLWriter writer, String comment, int indent, int indentSize, int columnSize )
                     {
                         if ( comment == null )
                         {
                             comment = "null";
                         }
                 
                +        while ( comment.contains( "" ) )
                +        {
                +            comment = comment.replace( "-->", "" );
                +        }
                +
                         if ( indent < 0 )
                         {
                             indent = 0;
                @@ -206,17 +218,16 @@ public static void writeComment( XMLWriter writer, String comment, int indent, i
                         String[] sentences = StringUtils.split( comment, LS );
                 
                         StringBuffer line = new StringBuffer( indentation + " by Java leng spec they MUST be already interned
                -    protected final static String XML_URI = "http://www.w3.org/XML/1998/namespace";
                -    protected final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
                -    protected final static String FEATURE_XML_ROUNDTRIP=
                -        //"http://xmlpull.org/v1/doc/features.html#xml-roundtrip";
                +    // NOTE: no interning of those strings --> by Java leng spec they MUST be already interned
                +    private final static String XML_URI = "http://www.w3.org/XML/1998/namespace";
                +
                +    private final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
                +
                +    private final static String FEATURE_XML_ROUNDTRIP =
                +        // "http://xmlpull.org/v1/doc/features.html#xml-roundtrip";
                         "http://xmlpull.org/v1/doc/features.html#xml-roundtrip";
                -    protected final static String FEATURE_NAMES_INTERNED =
                -        "http://xmlpull.org/v1/doc/features.html#names-interned";
                -    protected final static String PROPERTY_XMLDECL_VERSION =
                +
                +    private final static String FEATURE_NAMES_INTERNED = "http://xmlpull.org/v1/doc/features.html#names-interned";
                +
                +    private final static String PROPERTY_XMLDECL_VERSION =
                         "http://xmlpull.org/v1/doc/properties.html#xmldecl-version";
                -    protected final static String PROPERTY_XMLDECL_STANDALONE =
                +
                +    private final static String PROPERTY_XMLDECL_STANDALONE =
                         "http://xmlpull.org/v1/doc/properties.html#xmldecl-standalone";
                -    protected final static String PROPERTY_XMLDECL_CONTENT =
                +
                +    private final static String PROPERTY_XMLDECL_CONTENT =
                         "http://xmlpull.org/v1/doc/properties.html#xmldecl-content";
                -    protected final static String PROPERTY_LOCATION =
                -        "http://xmlpull.org/v1/doc/properties.html#location";
                +
                +    private final static String PROPERTY_LOCATION = "http://xmlpull.org/v1/doc/properties.html#location";
                 
                     /**
                -     * Implementation notice:
                -     * the is instance variable that controls if newString() is interning.
                -     * 

                NOTE: newStringIntern always returns interned strings - * and newString MAY return interned String depending on this variable. - *

                NOTE: by default in this minimal implementation it is false! + * Implementation notice: the is instance variable that controls if newString() is interning. + *

                + * NOTE: newStringIntern always returns interned strings and newString MAY return interned String + * depending on this variable. + *

                + * NOTE: by default in this minimal implementation it is false! */ - protected boolean allStringsInterned; + private boolean allStringsInterned; - protected void resetStringCache() { - //System.out.println("resetStringCache() minimum called"); + private void resetStringCache() + { + // System.out.println("resetStringCache() minimum called"); } - protected String newString(char[] cbuf, int off, int len) { - return new String(cbuf, off, len); + private String newString( char[] cbuf, int off, int len ) + { + return new String( cbuf, off, len ); } - protected String newStringIntern(char[] cbuf, int off, int len) { - return (new String(cbuf, off, len)).intern(); + private String newStringIntern( char[] cbuf, int off, int len ) + { + return ( new String( cbuf, off, len ) ).intern(); } private static final boolean TRACE_SIZING = false; // NOTE: features are not resetable and typically defaults to false ... - protected boolean processNamespaces; - protected boolean roundtripSupported; + private boolean processNamespaces; + + private boolean roundtripSupported; // global parser state - protected String location; - protected int lineNumber; - protected int columnNumber; - protected boolean seenRoot; - protected boolean reachedEnd; - protected int eventType; - protected boolean emptyElementTag; + private String location; + + private int lineNumber; + + private int columnNumber; + + private boolean seenRoot; + + private boolean reachedEnd; + + private int eventType; + + private boolean emptyElementTag; + // element stack - protected int depth; - protected char[] elRawName[]; - protected int elRawNameEnd[]; - protected int elRawNameLine[]; + private int depth; + + private char[] elRawName[]; + + private int elRawNameEnd[]; - protected String elName[]; - protected String elPrefix[]; - protected String elUri[]; - //protected String elValue[]; - protected int elNamespaceCount[]; + private int elRawNameLine[]; + private String elName[]; + private String elPrefix[]; + + private String elUri[]; + + // private String elValue[]; + private int elNamespaceCount[]; + + private String fileEncoding = "UTF8"; /** - * Make sure that we have enough space to keep element stack if passed size. - * It will always create one additional slot then current depth + * Make sure that we have enough space to keep element stack if passed size. It will always create one additional + * slot then current depth */ - protected void ensureElementsCapacity() { + private void ensureElementsCapacity() + { final int elStackSize = elName != null ? elName.length : 0; - if( (depth + 1) >= elStackSize) { + if ( ( depth + 1 ) >= elStackSize ) + { // we add at least one extra slot ... - final int newSize = (depth >= 7 ? 2 * depth : 8) + 2; // = lucky 7 + 1 //25 - if(TRACE_SIZING) { - System.err.println("TRACE_SIZING elStackSize "+elStackSize+" ==> "+newSize); + final int newSize = ( depth >= 7 ? 2 * depth : 8 ) + 2; // = lucky 7 + 1 //25 + if ( TRACE_SIZING ) + { + System.err.println( "TRACE_SIZING elStackSize " + elStackSize + " ==> " + newSize ); } final boolean needsCopying = elStackSize > 0; String[] arr = null; // resue arr local variable slot arr = new String[newSize]; - if(needsCopying) System.arraycopy(elName, 0, arr, 0, elStackSize); + if ( needsCopying ) + System.arraycopy( elName, 0, arr, 0, elStackSize ); elName = arr; arr = new String[newSize]; - if(needsCopying) System.arraycopy(elPrefix, 0, arr, 0, elStackSize); + if ( needsCopying ) + System.arraycopy( elPrefix, 0, arr, 0, elStackSize ); elPrefix = arr; arr = new String[newSize]; - if(needsCopying) System.arraycopy(elUri, 0, arr, 0, elStackSize); + if ( needsCopying ) + System.arraycopy( elUri, 0, arr, 0, elStackSize ); elUri = arr; int[] iarr = new int[newSize]; - if(needsCopying) { - System.arraycopy(elNamespaceCount, 0, iarr, 0, elStackSize); - } else { + if ( needsCopying ) + { + System.arraycopy( elNamespaceCount, 0, iarr, 0, elStackSize ); + } + else + { // special initialization iarr[0] = 0; } elNamespaceCount = iarr; - //TODO: avoid using element raw name ... + // TODO: avoid using element raw name ... iarr = new int[newSize]; - if(needsCopying) { - System.arraycopy(elRawNameEnd, 0, iarr, 0, elStackSize); + if ( needsCopying ) + { + System.arraycopy( elRawNameEnd, 0, iarr, 0, elStackSize ); } elRawNameEnd = iarr; iarr = new int[newSize]; - if(needsCopying) { - System.arraycopy(elRawNameLine, 0, iarr, 0, elStackSize); + if ( needsCopying ) + { + System.arraycopy( elRawNameLine, 0, iarr, 0, elStackSize ); } elRawNameLine = iarr; final char[][] carr = new char[newSize][]; - if(needsCopying) { - System.arraycopy(elRawName, 0, carr, 0, elStackSize); + if ( needsCopying ) + { + System.arraycopy( elRawName, 0, carr, 0, elStackSize ); } elRawName = carr; - // arr = new String[newSize]; - // if(needsCopying) System.arraycopy(elLocalName, 0, arr, 0, elStackSize); - // elLocalName = arr; - // arr = new String[newSize]; - // if(needsCopying) System.arraycopy(elDefaultNs, 0, arr, 0, elStackSize); - // elDefaultNs = arr; - // int[] iarr = new int[newSize]; - // if(needsCopying) System.arraycopy(elNsStackPos, 0, iarr, 0, elStackSize); - // for (int i = elStackSize; i < iarr.length; i++) - // { - // iarr[i] = (i > 0) ? -1 : 0; - // } - // elNsStackPos = iarr; - //assert depth < elName.length; + // arr = new String[newSize]; + // if(needsCopying) System.arraycopy(elLocalName, 0, arr, 0, elStackSize); + // elLocalName = arr; + // arr = new String[newSize]; + // if(needsCopying) System.arraycopy(elDefaultNs, 0, arr, 0, elStackSize); + // elDefaultNs = arr; + // int[] iarr = new int[newSize]; + // if(needsCopying) System.arraycopy(elNsStackPos, 0, iarr, 0, elStackSize); + // for (int i = elStackSize; i < iarr.length; i++) + // { + // iarr[i] = (i > 0) ? -1 : 0; + // } + // elNsStackPos = iarr; + // assert depth < elName.length; } } + // attribute stack + private int attributeCount; + private String attributeName[]; - // attribute stack - protected int attributeCount; - protected String attributeName[]; - protected int attributeNameHash[]; - //protected int attributeNameStart[]; - //protected int attributeNameEnd[]; - protected String attributePrefix[]; - protected String attributeUri[]; - protected String attributeValue[]; - //protected int attributeValueStart[]; - //protected int attributeValueEnd[]; + private int attributeNameHash[]; + // private int attributeNameStart[]; + // private int attributeNameEnd[]; + private String attributePrefix[]; - /** - * Make sure that in attributes temporary array is enough space. - */ - protected void ensureAttributesCapacity(int size) { + private String attributeUri[]; + + private String attributeValue[]; + // private int attributeValueStart[]; + // private int attributeValueEnd[]; + + // Make sure that in attributes temporary array is enough space. + private void ensureAttributesCapacity( int size ) + { final int attrPosSize = attributeName != null ? attributeName.length : 0; - if(size >= attrPosSize) { + if ( size >= attrPosSize ) + { final int newSize = size > 7 ? 2 * size : 8; // = lucky 7 + 1 //25 - if(TRACE_SIZING) { - System.err.println("TRACE_SIZING attrPosSize "+attrPosSize+" ==> "+newSize); + if ( TRACE_SIZING ) + { + System.err.println( "TRACE_SIZING attrPosSize " + attrPosSize + " ==> " + newSize ); } final boolean needsCopying = attrPosSize > 0; String[] arr = null; arr = new String[newSize]; - if(needsCopying) System.arraycopy(attributeName, 0, arr, 0, attrPosSize); + if ( needsCopying ) + System.arraycopy( attributeName, 0, arr, 0, attrPosSize ); attributeName = arr; arr = new String[newSize]; - if(needsCopying) System.arraycopy(attributePrefix, 0, arr, 0, attrPosSize); + if ( needsCopying ) + System.arraycopy( attributePrefix, 0, arr, 0, attrPosSize ); attributePrefix = arr; arr = new String[newSize]; - if(needsCopying) System.arraycopy(attributeUri, 0, arr, 0, attrPosSize); + if ( needsCopying ) + System.arraycopy( attributeUri, 0, arr, 0, attrPosSize ); attributeUri = arr; arr = new String[newSize]; - if(needsCopying) System.arraycopy(attributeValue, 0, arr, 0, attrPosSize); + if ( needsCopying ) + System.arraycopy( attributeValue, 0, arr, 0, attrPosSize ); attributeValue = arr; - if( ! allStringsInterned ) { + if ( !allStringsInterned ) + { final int[] iarr = new int[newSize]; - if(needsCopying) System.arraycopy(attributeNameHash, 0, iarr, 0, attrPosSize); + if ( needsCopying ) + System.arraycopy( attributeNameHash, 0, iarr, 0, attrPosSize ); attributeNameHash = iarr; } @@ -226,102 +272,121 @@ protected void ensureAttributesCapacity(int size) { } // namespace stack - protected int namespaceEnd; - protected String namespacePrefix[]; - protected int namespacePrefixHash[]; - protected String namespaceUri[]; + private int namespaceEnd; + + private String namespacePrefix[]; + + private int namespacePrefixHash[]; - protected void ensureNamespacesCapacity(int size) { + private String namespaceUri[]; + + private void ensureNamespacesCapacity( int size ) + { final int namespaceSize = namespacePrefix != null ? namespacePrefix.length : 0; - if(size >= namespaceSize) { + if ( size >= namespaceSize ) + { final int newSize = size > 7 ? 2 * size : 8; // = lucky 7 + 1 //25 - if(TRACE_SIZING) { - System.err.println("TRACE_SIZING namespaceSize "+namespaceSize+" ==> "+newSize); + if ( TRACE_SIZING ) + { + System.err.println( "TRACE_SIZING namespaceSize " + namespaceSize + " ==> " + newSize ); } final String[] newNamespacePrefix = new String[newSize]; final String[] newNamespaceUri = new String[newSize]; - if(namespacePrefix != null) { - System.arraycopy( - namespacePrefix, 0, newNamespacePrefix, 0, namespaceEnd); - System.arraycopy( - namespaceUri, 0, newNamespaceUri, 0, namespaceEnd); + if ( namespacePrefix != null ) + { + System.arraycopy( namespacePrefix, 0, newNamespacePrefix, 0, namespaceEnd ); + System.arraycopy( namespaceUri, 0, newNamespaceUri, 0, namespaceEnd ); } namespacePrefix = newNamespacePrefix; namespaceUri = newNamespaceUri; - - if( ! allStringsInterned ) { + if ( !allStringsInterned ) + { final int[] newNamespacePrefixHash = new int[newSize]; - if(namespacePrefixHash != null) { - System.arraycopy( - namespacePrefixHash, 0, newNamespacePrefixHash, 0, namespaceEnd); + if ( namespacePrefixHash != null ) + { + System.arraycopy( namespacePrefixHash, 0, newNamespacePrefixHash, 0, namespaceEnd ); } namespacePrefixHash = newNamespacePrefixHash; } - //prefixesSize = newSize; + // prefixesSize = newSize; // //assert nsPrefixes.length > size && nsPrefixes.length == newSize } } - /** - * simplistic implementation of hash function that has constant - * time to compute - so it also means diminishing hash quality for long strings - * but for XML parsing it should be good enough ... - */ - protected static final int fastHash( char ch[], int off, int len ) { - if(len == 0) return 0; - //assert len >0 + + // simplistic implementation of hash function that has constant time to compute - so it also means + // diminishing hash quality for long strings but for XML parsing it should be good enough ... + + private static final int fastHash( char ch[], int off, int len ) + { + if ( len == 0 ) + return 0; + // assert len >0 int hash = ch[off]; // hash at beginning - //try { - hash = (hash << 7) + ch[ off + len - 1 ]; // hash at the end - //} catch(ArrayIndexOutOfBoundsException aie) { - // aie.printStackTrace(); //should never happen ... - // throw new RuntimeException("this is violation of pre-condition"); - //} - if(len > 16) hash = (hash << 7) + ch[ off + (len / 4)]; // 1/4 from beginning - if(len > 8) hash = (hash << 7) + ch[ off + (len / 2)]; // 1/2 of string size ... + // try { + hash = ( hash << 7 ) + ch[off + len - 1]; // hash at the end + // } catch(ArrayIndexOutOfBoundsException aie) { + // aie.printStackTrace(); //should never happen ... + // throw new RuntimeException("this is violation of pre-condition"); + // } + if ( len > 16 ) + hash = ( hash << 7 ) + ch[off + ( len / 4 )]; // 1/4 from beginning + if ( len > 8 ) + hash = ( hash << 7 ) + ch[off + ( len / 2 )]; // 1/2 of string size ... // notice that hash is at most done 3 times <<7 so shifted by 21 bits 8 bit value // so max result == 29 bits so it is quite just below 31 bits for long (2^32) ... - //assert hash >= 0; - return hash; + // assert hash >= 0; + return hash; } // entity replacement stack - protected int entityEnd; + private int entityEnd; + + private String entityName[]; + + private char[] entityNameBuf[]; - protected String entityName[]; - protected char[] entityNameBuf[]; - protected String entityReplacement[]; - protected char[] entityReplacementBuf[]; + private String entityReplacement[]; - protected int entityNameHash[]; + private char[] entityReplacementBuf[]; - protected void ensureEntityCapacity() { + private int entityNameHash[]; + + private final EntityReplacementMap replacementMapTemplate; + + private void ensureEntityCapacity() + { final int entitySize = entityReplacementBuf != null ? entityReplacementBuf.length : 0; - if(entityEnd >= entitySize) { + if ( entityEnd >= entitySize ) + { final int newSize = entityEnd > 7 ? 2 * entityEnd : 8; // = lucky 7 + 1 //25 - if(TRACE_SIZING) { - System.err.println("TRACE_SIZING entitySize "+entitySize+" ==> "+newSize); + if ( TRACE_SIZING ) + { + System.err.println( "TRACE_SIZING entitySize " + entitySize + " ==> " + newSize ); } final String[] newEntityName = new String[newSize]; final char[] newEntityNameBuf[] = new char[newSize][]; final String[] newEntityReplacement = new String[newSize]; final char[] newEntityReplacementBuf[] = new char[newSize][]; - if(entityName != null) { - System.arraycopy(entityName, 0, newEntityName, 0, entityEnd); - System.arraycopy(entityNameBuf, 0, newEntityNameBuf, 0, entityEnd); - System.arraycopy(entityReplacement, 0, newEntityReplacement, 0, entityEnd); - System.arraycopy(entityReplacementBuf, 0, newEntityReplacementBuf, 0, entityEnd); + if ( entityName != null ) + { + System.arraycopy( entityName, 0, newEntityName, 0, entityEnd ); + System.arraycopy( entityNameBuf, 0, newEntityNameBuf, 0, entityEnd ); + System.arraycopy( entityReplacement, 0, newEntityReplacement, 0, entityEnd ); + System.arraycopy( entityReplacementBuf, 0, newEntityReplacementBuf, 0, entityEnd ); } entityName = newEntityName; entityNameBuf = newEntityNameBuf; entityReplacement = newEntityReplacement; entityReplacementBuf = newEntityReplacementBuf; - if( ! allStringsInterned ) { + if ( !allStringsInterned ) + { final int[] newEntityNameHash = new int[newSize]; - if(entityNameHash != null) { - System.arraycopy(entityNameHash, 0, newEntityNameHash, 0, entityEnd); + if ( entityNameHash != null ) + { + System.arraycopy( entityNameHash, 0, newEntityNameHash, 0, entityEnd ); } entityNameHash = newEntityNameHash; } @@ -329,56 +394,74 @@ protected void ensureEntityCapacity() { } // input buffer management - protected static final int READ_CHUNK_SIZE = 8*1024; //max data chars in one read() call - protected Reader reader; - protected String inputEncoding; + private static final int READ_CHUNK_SIZE = 8 * 1024; // max data chars in one read() call + + private Reader reader; + + private String inputEncoding; + + private int bufLoadFactor = 95; // 99% + // private int bufHardLimit; // only matters when expanding + + private float bufferLoadFactor = bufLoadFactor / 100f; + private char buf[] = new char[Runtime.getRuntime().freeMemory() > 1000000L ? READ_CHUNK_SIZE : 256]; - protected int bufLoadFactor = 95; // 99% - //protected int bufHardLimit; // only matters when expanding + private int bufSoftLimit = (int) ( bufferLoadFactor * buf.length ); // desirable size of buffer - protected char buf[] = new char[ - Runtime.getRuntime().freeMemory() > 1000000L ? READ_CHUNK_SIZE : 256 ]; - protected int bufSoftLimit = ( bufLoadFactor * buf.length ) /100; // desirable size of buffer - protected boolean preventBufferCompaction; + private boolean preventBufferCompaction; - protected int bufAbsoluteStart; // this is buf - protected int bufStart; - protected int bufEnd; - protected int pos; - protected int posStart; - protected int posEnd; + private int bufAbsoluteStart; // this is buf - protected char pc[] = new char[ - Runtime.getRuntime().freeMemory() > 1000000L ? READ_CHUNK_SIZE : 64 ]; - protected int pcStart; - protected int pcEnd; + private int bufStart; + private int bufEnd; + + private int pos; + + private int posStart; + + private int posEnd; + + private char pc[] = new char[Runtime.getRuntime().freeMemory() > 1000000L ? READ_CHUNK_SIZE : 64]; + + private int pcStart; + + private int pcEnd; // parsing state - //protected boolean needsMore; - //protected boolean seenMarkup; - protected boolean usePC; + // private boolean needsMore; + // private boolean seenMarkup; + private boolean usePC; + + private boolean seenStartTag; + + private boolean seenEndTag; + private boolean pastEndTag; - protected boolean seenStartTag; - protected boolean seenEndTag; - protected boolean pastEndTag; - protected boolean seenAmpersand; - protected boolean seenMarkup; - protected boolean seenDocdecl; + private boolean seenAmpersand; + + private boolean seenMarkup; + + private boolean seenDocdecl; // transient variable set during each call to next/Token() - protected boolean tokenize; - protected String text; - protected String entityRefName; + private boolean tokenize; + + private String text; + + private String entityRefName; - protected String xmlDeclVersion; - protected Boolean xmlDeclStandalone; - protected String xmlDeclContent; + private String xmlDeclVersion; - protected void reset() { - //System.out.println("reset() called"); + private Boolean xmlDeclStandalone; + + private String xmlDeclContent; + + private void reset() + { + // System.out.println("reset() called"); location = null; lineNumber = 1; columnNumber = 0; @@ -394,6 +477,7 @@ protected void reset() { namespaceEnd = 0; entityEnd = 0; + setupFromTemplate(); reader = null; inputEncoding = null; @@ -421,223 +505,337 @@ protected void reset() { resetStringCache(); } - public MXParser() { + public MXParser() + { + replacementMapTemplate = null; + } + + public MXParser( EntityReplacementMap entityReplacementMap ) + { + this.replacementMapTemplate = entityReplacementMap; } + public void setupFromTemplate() + { + if ( replacementMapTemplate != null ) + { + int length = replacementMapTemplate.entityEnd; + + // This is a bit cheeky, since the EntityReplacementMap contains exact-sized arrays, + // and elements are always added to the array, we can use the array from the template. + // Kids; dont do this at home. + entityName = replacementMapTemplate.entityName; + entityNameBuf = replacementMapTemplate.entityNameBuf; + entityReplacement = replacementMapTemplate.entityReplacement; + entityReplacementBuf = replacementMapTemplate.entityReplacementBuf; + entityNameHash = replacementMapTemplate.entityNameHash; + entityEnd = length; + } + } /** * Method setFeature * - * @param name a String - * @param state a boolean - * - * @throws XmlPullParserException - * + * @param name a String + * @param state a boolean + * @throws XmlPullParserException issue */ - public void setFeature(String name, - boolean state) throws XmlPullParserException + @Override + public void setFeature( String name, boolean state ) + throws XmlPullParserException { - if(name == null) throw new IllegalArgumentException("feature name should not be null"); - if(FEATURE_PROCESS_NAMESPACES.equals(name)) { - if(eventType != START_DOCUMENT) throw new XmlPullParserException( - "namespace processing feature can only be changed before parsing", this, null); + if ( name == null ) + throw new IllegalArgumentException( "feature name should not be null" ); + if ( FEATURE_PROCESS_NAMESPACES.equals( name ) ) + { + if ( eventType != START_DOCUMENT ) + throw new XmlPullParserException( "namespace processing feature can only be changed before parsing", + this, null ); processNamespaces = state; - // } else if(FEATURE_REPORT_NAMESPACE_ATTRIBUTES.equals(name)) { - // if(type != START_DOCUMENT) throw new XmlPullParserException( - // "namespace reporting feature can only be changed before parsing", this, null); - // reportNsAttribs = state; - } else if(FEATURE_NAMES_INTERNED.equals(name)) { - if(state != false) { - throw new XmlPullParserException( - "interning names in this implementation is not supported"); - } - } else if(FEATURE_PROCESS_DOCDECL.equals(name)) { - if(state != false) { - throw new XmlPullParserException( - "processing DOCDECL is not supported"); - } - //} else if(REPORT_DOCDECL.equals(name)) { - // paramNotifyDoctype = state; - } else if(FEATURE_XML_ROUNDTRIP.equals(name)) { - //if(state == false) { - // throw new XmlPullParserException( - // "roundtrip feature can not be switched off"); - //} + // } else if(FEATURE_REPORT_NAMESPACE_ATTRIBUTES.equals(name)) { + // if(type != START_DOCUMENT) throw new XmlPullParserException( + // "namespace reporting feature can only be changed before parsing", this, null); + // reportNsAttribs = state; + } + else if ( FEATURE_NAMES_INTERNED.equals( name ) ) + { + if ( state != false ) + { + throw new XmlPullParserException( "interning names in this implementation is not supported" ); + } + } + else if ( FEATURE_PROCESS_DOCDECL.equals( name ) ) + { + if ( state != false ) + { + throw new XmlPullParserException( "processing DOCDECL is not supported" ); + } + // } else if(REPORT_DOCDECL.equals(name)) { + // paramNotifyDoctype = state; + } + else if ( FEATURE_XML_ROUNDTRIP.equals( name ) ) + { + // if(state == false) { + // throw new XmlPullParserException( + // "roundtrip feature can not be switched off"); + // } roundtripSupported = state; - } else { - throw new XmlPullParserException("unsupporte feature "+name); + } + else + { + throw new XmlPullParserException( "unsupported feature " + name ); } } - /** Unknown properties are always returned as false */ - public boolean getFeature(String name) + /** + * Unknown properties are always returned as false + */ + @Override + public boolean getFeature( String name ) { - if(name == null) throw new IllegalArgumentException("feature name should not be nulll"); - if(FEATURE_PROCESS_NAMESPACES.equals(name)) { + if ( name == null ) + throw new IllegalArgumentException( "feature name should not be null" ); + if ( FEATURE_PROCESS_NAMESPACES.equals( name ) ) + { return processNamespaces; - // } else if(FEATURE_REPORT_NAMESPACE_ATTRIBUTES.equals(name)) { - // return reportNsAttribs; - } else if(FEATURE_NAMES_INTERNED.equals(name)) { + // } else if(FEATURE_REPORT_NAMESPACE_ATTRIBUTES.equals(name)) { + // return reportNsAttribs; + } + else if ( FEATURE_NAMES_INTERNED.equals( name ) ) + { return false; - } else if(FEATURE_PROCESS_DOCDECL.equals(name)) { + } + else if ( FEATURE_PROCESS_DOCDECL.equals( name ) ) + { return false; - //} else if(REPORT_DOCDECL.equals(name)) { - // return paramNotifyDoctype; - } else if(FEATURE_XML_ROUNDTRIP.equals(name)) { - //return true; + // } else if(REPORT_DOCDECL.equals(name)) { + // return paramNotifyDoctype; + } + else if ( FEATURE_XML_ROUNDTRIP.equals( name ) ) + { + // return true; return roundtripSupported; } return false; } - public void setProperty(String name, - Object value) + @Override + public void setProperty( String name, Object value ) throws XmlPullParserException { - if(PROPERTY_LOCATION.equals(name)) { + if ( PROPERTY_LOCATION.equals( name ) ) + { location = (String) value; - } else { - throw new XmlPullParserException("unsupported property: '"+name+"'"); + } + else + { + throw new XmlPullParserException( "unsupported property: '" + name + "'" ); } } - - public Object getProperty(String name) + @Override + public Object getProperty( String name ) { - if(name == null) throw new IllegalArgumentException("property name should not be nulll"); - if(PROPERTY_XMLDECL_VERSION.equals(name)) { + if ( name == null ) + throw new IllegalArgumentException( "property name should not be null" ); + if ( PROPERTY_XMLDECL_VERSION.equals( name ) ) + { return xmlDeclVersion; - } else if(PROPERTY_XMLDECL_STANDALONE.equals(name)) { + } + else if ( PROPERTY_XMLDECL_STANDALONE.equals( name ) ) + { return xmlDeclStandalone; - } else if(PROPERTY_XMLDECL_CONTENT.equals(name)) { + } + else if ( PROPERTY_XMLDECL_CONTENT.equals( name ) ) + { return xmlDeclContent; - } else if(PROPERTY_LOCATION.equals(name)) { + } + else if ( PROPERTY_LOCATION.equals( name ) ) + { return location; } return null; } - - public void setInput(Reader in) throws XmlPullParserException + @Override + public void setInput( Reader in ) + throws XmlPullParserException { reset(); reader = in; - } + if ( reader instanceof XmlReader ) { + // encoding already detected + XmlReader xsr = (XmlReader) reader; + fileEncoding = xsr.getEncoding(); + } + else if ( reader instanceof InputStreamReader ) + { + InputStreamReader isr = (InputStreamReader) reader; + if ( isr.getEncoding() != null ) + { + fileEncoding = isr.getEncoding().toUpperCase(); + } + } + } - public void setInput(java.io.InputStream inputStream, String inputEncoding) + @Override + public void setInput( java.io.InputStream inputStream, String inputEncoding ) throws XmlPullParserException { - if(inputStream == null) { - throw new IllegalArgumentException("input stream can not be null"); + if ( inputStream == null ) + { + throw new IllegalArgumentException( "input stream can not be null" ); } Reader reader; - try { - if(inputEncoding != null) { - reader = ReaderFactory.newReader(inputStream, inputEncoding); - } else { - reader = ReaderFactory.newXmlReader(inputStream); + try + { + if ( inputEncoding != null ) + { + reader = ReaderFactory.newReader( inputStream, inputEncoding ); + } + else + { + reader = ReaderFactory.newXmlReader( inputStream ); } - } catch (UnsupportedEncodingException une) { - throw new XmlPullParserException( - "could not create reader for encoding "+inputEncoding+" : "+une, this, une); + } + catch ( UnsupportedEncodingException une ) + { + throw new XmlPullParserException( "could not create reader for encoding " + inputEncoding + " : " + une, + this, une ); } catch ( IOException e ) { - throw new XmlPullParserException( - "could not create reader : "+e, this, e); + throw new XmlPullParserException( "could not create reader : " + e, this, e ); } - setInput(reader); - //must be here as reset() was called in setInput() and has set this.inputEncoding to null ... + setInput( reader ); + // must be here as reset() was called in setInput() and has set this.inputEncoding to null ... this.inputEncoding = inputEncoding; } - public String getInputEncoding() { + @Override + public String getInputEncoding() + { return inputEncoding; } - public void defineEntityReplacementText(String entityName, - String replacementText) + @Override + public void defineEntityReplacementText( String entityName, String replacementText ) throws XmlPullParserException { - // throw new XmlPullParserException("not allowed"); + // throw new XmlPullParserException("not allowed"); + + if ( !replacementText.startsWith( "&#" ) && this.entityName != null && replacementText.length() > 1 ) + { + String tmp = replacementText.substring( 1, replacementText.length() - 1 ); + for ( int i = 0; i < this.entityName.length; i++ ) + { + if ( this.entityName[i] != null && this.entityName[i].equals( tmp ) ) + { + replacementText = this.entityReplacement[i]; + } + } + } - //protected char[] entityReplacement[]; + // private char[] entityReplacement[]; ensureEntityCapacity(); // this is to make sure that if interning works we will take advantage of it ... - this.entityName[entityEnd] = newString(entityName.toCharArray(), 0, entityName.length()); - entityNameBuf[entityEnd] = entityName.toCharArray(); + char[] entityNameCharData = entityName.toCharArray(); + this.entityName[entityEnd] = newString( entityNameCharData, 0, entityName.length() ); + entityNameBuf[entityEnd] = entityNameCharData; entityReplacement[entityEnd] = replacementText; entityReplacementBuf[entityEnd] = replacementText.toCharArray(); - if(!allStringsInterned) { - entityNameHash[ entityEnd ] = - fastHash(entityNameBuf[entityEnd], 0, entityNameBuf[entityEnd].length); + if ( !allStringsInterned ) + { + entityNameHash[entityEnd] = fastHash( entityNameBuf[entityEnd], 0, entityNameBuf[entityEnd].length ); } ++entityEnd; - //TODO disallow < or & in entity replacement text (or ]]>???) + // TODO disallow < or & in entity replacement text (or ]]>???) // TOOD keepEntityNormalizedForAttributeValue cached as well ... } - public int getNamespaceCount(int depth) + @Override + public int getNamespaceCount( int depth ) throws XmlPullParserException { - if(processNamespaces == false || depth == 0) { + if ( !processNamespaces || depth == 0 ) + { return 0; } - //int maxDepth = eventType == END_TAG ? this.depth + 1 : this.depth; - //if(depth < 0 || depth > maxDepth) throw new IllegalArgumentException( - if(depth < 0 || depth > this.depth) throw new IllegalArgumentException( - "napespace count mayt be for depth 0.."+this.depth+" not "+depth); - return elNamespaceCount[ depth ]; + // int maxDepth = eventType == END_TAG ? this.depth + 1 : this.depth; + // if(depth < 0 || depth > maxDepth) throw new IllegalArgumentException( + if ( depth < 0 || depth > this.depth ) + throw new IllegalArgumentException( "namespace count may be for depth 0.." + this.depth + " not " + depth ); + return elNamespaceCount[depth]; } - public String getNamespacePrefix(int pos) + @Override + public String getNamespacePrefix( int pos ) throws XmlPullParserException { - //int end = eventType == END_TAG ? elNamespaceCount[ depth + 1 ] : namespaceEnd; - //if(pos < end) { - if(pos < namespaceEnd) { - return namespacePrefix[ pos ]; - } else { - throw new XmlPullParserException( - "position "+pos+" exceeded number of available namespaces "+namespaceEnd); + // int end = eventType == END_TAG ? elNamespaceCount[ depth + 1 ] : namespaceEnd; + // if(pos < end) { + if ( pos < namespaceEnd ) + { + return namespacePrefix[pos]; + } + else + { + throw new XmlPullParserException( "position " + pos + " exceeded number of available namespaces " + + namespaceEnd ); } } - public String getNamespaceUri(int pos) throws XmlPullParserException + @Override + public String getNamespaceUri( int pos ) + throws XmlPullParserException { - //int end = eventType == END_TAG ? elNamespaceCount[ depth + 1 ] : namespaceEnd; - //if(pos < end) { - if(pos < namespaceEnd) { - return namespaceUri[ pos ]; - } else { - throw new XmlPullParserException( - "position "+pos+" exceedded number of available namespaces "+namespaceEnd); + // int end = eventType == END_TAG ? elNamespaceCount[ depth + 1 ] : namespaceEnd; + // if(pos < end) { + if ( pos < namespaceEnd ) + { + return namespaceUri[pos]; + } + else + { + throw new XmlPullParserException( "position " + pos + " exceeded number of available namespaces " + + namespaceEnd ); } } + @Override public String getNamespace( String prefix ) - //throws XmlPullParserException + // throws XmlPullParserException { - //int count = namespaceCount[ depth ]; - if(prefix != null) { - for( int i = namespaceEnd -1; i >= 0; i--) { - if( prefix.equals( namespacePrefix[ i ] ) ) { - return namespaceUri[ i ]; + // int count = namespaceCount[ depth ]; + if ( prefix != null ) + { + for ( int i = namespaceEnd - 1; i >= 0; i-- ) + { + if ( prefix.equals( namespacePrefix[i] ) ) + { + return namespaceUri[i]; } } - if("xml".equals( prefix )) { + if ( "xml".equals( prefix ) ) + { return XML_URI; - } else if("xmlns".equals( prefix )) { + } + else if ( "xmlns".equals( prefix ) ) + { return XMLNS_URI; } - } else { - for( int i = namespaceEnd -1; i >= 0; i--) { - if( namespacePrefix[ i ] == null) { //"") { //null ) { //TODO check FIXME Alek - return namespaceUri[ i ]; + } + else + { + for ( int i = namespaceEnd - 1; i >= 0; i-- ) + { + if ( namespacePrefix[i] == null ) + { // "") { //null ) { //TODO check FIXME Alek + return namespaceUri[i]; } } @@ -645,314 +843,387 @@ public String getNamespace( String prefix ) return null; } - + @Override public int getDepth() { return depth; } - - private static int findFragment(int bufMinPos, char[] b, int start, int end) { - //System.err.println("bufStart="+bufStart+" b="+printable(new String(b, start, end - start))+" start="+start+" end="+end); - if(start < bufMinPos) { + private static int findFragment( int bufMinPos, char[] b, int start, int end ) + { + // System.err.println("bufStart="+bufStart+" b="+printable(new String(b, start, end - start))+" start="+start+" + // end="+end); + if ( start < bufMinPos ) + { start = bufMinPos; - if(start > end) start = end; + if ( start > end ) + start = end; return start; } - if(end - start > 65) { + if ( end - start > 65 ) + { start = end - 10; // try to find good location } int i = start + 1; - while(--i > bufMinPos) { - if((end - i) > 65) break; + while ( --i > bufMinPos ) + { + if ( ( end - i ) > 65 ) + break; final char c = b[i]; - if(c == '<' && (start - i) > 10) break; + if ( c == '<' && ( start - i ) > 10 ) + break; } return i; } - /** - * Return string describing current position of parsers as - * text 'STATE [seen %s...] @line:column'. + * Return string describing current position of parsers as text 'STATE [seen %s...] @line:column'. */ - public String getPositionDescription () + @Override + public String getPositionDescription() { String fragment = null; - if(posStart <= pos) { - final int start = findFragment(0, buf, posStart, pos); - //System.err.println("start="+start); - if(start < pos) { - fragment = new String(buf, start, pos - start); + if ( posStart <= pos ) + { + final int start = findFragment( 0, buf, posStart, pos ); + // System.err.println("start="+start); + if ( start < pos ) + { + fragment = new String( buf, start, pos - start ); } - if(bufAbsoluteStart > 0 || start > 0) fragment = "..." + fragment; + if ( bufAbsoluteStart > 0 || start > 0 ) + fragment = "..." + fragment; } - // return " at line "+tokenizerPosRow - // +" and column "+(tokenizerPosCol-1) - // +(fragment != null ? " seen "+printable(fragment)+"..." : ""); - return " "+TYPES[ eventType ] + - (fragment != null ? " seen "+printable(fragment)+"..." : "") - +" "+(location != null ? location : "") - +"@"+getLineNumber()+":"+getColumnNumber(); + // return " at line "+tokenizerPosRow + // +" and column "+(tokenizerPosCol-1) + // +(fragment != null ? " seen "+printable(fragment)+"..." : ""); + return " " + TYPES[eventType] + ( fragment != null ? " seen " + printable( fragment ) + "..." : "" ) + " " + + ( location != null ? location : "" ) + "@" + getLineNumber() + ":" + getColumnNumber(); } + @Override public int getLineNumber() { return lineNumber; } + @Override public int getColumnNumber() { return columnNumber; } - - public boolean isWhitespace() throws XmlPullParserException + @Override + public boolean isWhitespace() + throws XmlPullParserException { - if(eventType == TEXT || eventType == CDSECT) { - if(usePC) { - for (int i = pcStart; i = 0; i--) { - // if( prefix.equals( namespacePrefix[ i ] ) ) { - // return namespaceUri[ i ]; - // } - // } - // } else { - // for( int i = namespaceEnd -1; i >= 0; i--) { - // if( namespacePrefix[ i ] == null ) { - // return namespaceUri[ i ]; - // } - // } + // String prefix = elPrefix[ maxDepth ]; + // if(prefix != null) { + // for( int i = namespaceEnd -1; i >= 0; i--) { + // if( prefix.equals( namespacePrefix[ i ] ) ) { + // return namespaceUri[ i ]; + // } + // } + // } else { + // for( int i = namespaceEnd -1; i >= 0; i--) { + // if( namespacePrefix[ i ] == null ) { + // return namespaceUri[ i ]; + // } + // } // - // } - // return ""; + // } + // return ""; } + @Override public String getName() { - if(eventType == START_TAG) { - //return elName[ depth - 1 ] ; - return elName[ depth ] ; - } else if(eventType == END_TAG) { - return elName[ depth ] ; - } else if(eventType == ENTITY_REF) { - if(entityRefName == null) { - entityRefName = newString(buf, posStart, posEnd - posStart); + if ( eventType == START_TAG ) + { + // return elName[ depth - 1 ] ; + return elName[depth]; + } + else if ( eventType == END_TAG ) + { + return elName[depth]; + } + else if ( eventType == ENTITY_REF ) + { + if ( entityRefName == null ) + { + entityRefName = newString( buf, posStart, posEnd - posStart ); } return entityRefName; - } else { + } + else + { return null; } } + @Override public String getPrefix() { - if(eventType == START_TAG) { - //return elPrefix[ depth - 1 ] ; - return elPrefix[ depth ] ; - } else if(eventType == END_TAG) { - return elPrefix[ depth ] ; + if ( eventType == START_TAG ) + { + // return elPrefix[ depth - 1 ] ; + return elPrefix[depth]; + } + else if ( eventType == END_TAG ) + { + return elPrefix[depth]; } return null; - // if(eventType != START_TAG && eventType != END_TAG) return null; - // int maxDepth = eventType == END_TAG ? depth : depth - 1; - // return elPrefix[ maxDepth ]; + // if(eventType != START_TAG && eventType != END_TAG) return null; + // int maxDepth = eventType == END_TAG ? depth : depth - 1; + // return elPrefix[ maxDepth ]; } - - public boolean isEmptyElementTag() throws XmlPullParserException + @Override + public boolean isEmptyElementTag() + throws XmlPullParserException { - if(eventType != START_TAG) throw new XmlPullParserException( - "parser must be on START_TAG to check for empty element", this, null); + if ( eventType != START_TAG ) + throw new XmlPullParserException( "parser must be on START_TAG to check for empty element", this, null ); return emptyElementTag; } + @Override public int getAttributeCount() { - if(eventType != START_TAG) return -1; + if ( eventType != START_TAG ) + return -1; return attributeCount; } - public String getAttributeNamespace(int index) + @Override + public String getAttributeNamespace( int index ) { - if(eventType != START_TAG) throw new IndexOutOfBoundsException( - "only START_TAG can have attributes"); - if(processNamespaces == false) return NO_NAMESPACE; - if(index < 0 || index >= attributeCount) throw new IndexOutOfBoundsException( - "attribute position must be 0.."+(attributeCount-1)+" and not "+index); - return attributeUri[ index ]; + if ( eventType != START_TAG ) + throw new IndexOutOfBoundsException( "only START_TAG can have attributes" ); + if ( !processNamespaces ) + return NO_NAMESPACE; + if ( index < 0 || index >= attributeCount ) + throw new IndexOutOfBoundsException( "attribute position must be 0.." + ( attributeCount - 1 ) + " and not " + + index ); + return attributeUri[index]; } - public String getAttributeName(int index) + @Override + public String getAttributeName( int index ) { - if(eventType != START_TAG) throw new IndexOutOfBoundsException( - "only START_TAG can have attributes"); - if(index < 0 || index >= attributeCount) throw new IndexOutOfBoundsException( - "attribute position must be 0.."+(attributeCount-1)+" and not "+index); - return attributeName[ index ]; + if ( eventType != START_TAG ) + throw new IndexOutOfBoundsException( "only START_TAG can have attributes" ); + if ( index < 0 || index >= attributeCount ) + throw new IndexOutOfBoundsException( "attribute position must be 0.." + ( attributeCount - 1 ) + " and not " + + index ); + return attributeName[index]; } - public String getAttributePrefix(int index) + @Override + public String getAttributePrefix( int index ) { - if(eventType != START_TAG) throw new IndexOutOfBoundsException( - "only START_TAG can have attributes"); - if(processNamespaces == false) return null; - if(index < 0 || index >= attributeCount) throw new IndexOutOfBoundsException( - "attribute position must be 0.."+(attributeCount-1)+" and not "+index); - return attributePrefix[ index ]; + if ( eventType != START_TAG ) + throw new IndexOutOfBoundsException( "only START_TAG can have attributes" ); + if ( !processNamespaces ) + return null; + if ( index < 0 || index >= attributeCount ) + throw new IndexOutOfBoundsException( "attribute position must be 0.." + ( attributeCount - 1 ) + " and not " + + index ); + return attributePrefix[index]; } - public String getAttributeType(int index) { - if(eventType != START_TAG) throw new IndexOutOfBoundsException( - "only START_TAG can have attributes"); - if(index < 0 || index >= attributeCount) throw new IndexOutOfBoundsException( - "attribute position must be 0.."+(attributeCount-1)+" and not "+index); + @Override + public String getAttributeType( int index ) + { + if ( eventType != START_TAG ) + throw new IndexOutOfBoundsException( "only START_TAG can have attributes" ); + if ( index < 0 || index >= attributeCount ) + throw new IndexOutOfBoundsException( "attribute position must be 0.." + ( attributeCount - 1 ) + " and not " + + index ); return "CDATA"; } - public boolean isAttributeDefault(int index) { - if(eventType != START_TAG) throw new IndexOutOfBoundsException( - "only START_TAG can have attributes"); - if(index < 0 || index >= attributeCount) throw new IndexOutOfBoundsException( - "attribute position must be 0.."+(attributeCount-1)+" and not "+index); + @Override + public boolean isAttributeDefault( int index ) + { + if ( eventType != START_TAG ) + throw new IndexOutOfBoundsException( "only START_TAG can have attributes" ); + if ( index < 0 || index >= attributeCount ) + throw new IndexOutOfBoundsException( "attribute position must be 0.." + ( attributeCount - 1 ) + " and not " + + index ); return false; } - public String getAttributeValue(int index) + @Override + public String getAttributeValue( int index ) { - if(eventType != START_TAG) throw new IndexOutOfBoundsException( - "only START_TAG can have attributes"); - if(index < 0 || index >= attributeCount) throw new IndexOutOfBoundsException( - "attribute position must be 0.."+(attributeCount-1)+" and not "+index); - return attributeValue[ index ]; + if ( eventType != START_TAG ) + throw new IndexOutOfBoundsException( "only START_TAG can have attributes" ); + if ( index < 0 || index >= attributeCount ) + throw new IndexOutOfBoundsException( "attribute position must be 0.." + ( attributeCount - 1 ) + " and not " + + index ); + return attributeValue[index]; } - public String getAttributeValue(String namespace, - String name) + @Override + public String getAttributeValue( String namespace, String name ) { - if(eventType != START_TAG) throw new IndexOutOfBoundsException( - "only START_TAG can have attributes"+getPositionDescription()); - if(name == null) { - throw new IllegalArgumentException("attribute name can not be null"); + if ( eventType != START_TAG ) + throw new IndexOutOfBoundsException( "only START_TAG can have attributes" + getPositionDescription() ); + if ( name == null ) + { + throw new IllegalArgumentException( "attribute name can not be null" ); } // TODO make check if namespace is interned!!! etc. for names!!! - if(processNamespaces) { - if(namespace == null) { + if ( processNamespaces ) + { + if ( namespace == null ) + { namespace = ""; } - for(int i = 0; i < attributeCount; ++i) { - if((namespace == attributeUri[ i ] || - namespace.equals(attributeUri[ i ]) ) - //(namespace != null && namespace.equals(attributeUri[ i ])) - // taking advantage of String.intern() - && name.equals(attributeName[ i ]) ) + for ( int i = 0; i < attributeCount; ++i ) + { + if ( ( namespace == attributeUri[i] || namespace.equals( attributeUri[i] ) ) + // (namespace != null && namespace.equals(attributeUri[ i ])) + // taking advantage of String.intern() + && name.equals( attributeName[i] ) ) { return attributeValue[i]; } } - } else { - if(namespace != null && namespace.length() == 0) { + } + else + { + if ( namespace != null && namespace.length() == 0 ) + { namespace = null; } - if(namespace != null) throw new IllegalArgumentException( - "when namespaces processing is disabled attribute namespace must be null"); - for(int i = 0; i < attributeCount; ++i) { - if(name.equals(attributeName[i])) + if ( namespace != null ) + throw new IllegalArgumentException( "when namespaces processing is disabled attribute namespace must be null" ); + for ( int i = 0; i < attributeCount; ++i ) + { + if ( name.equals( attributeName[i] ) ) { return attributeValue[i]; } @@ -961,131 +1232,142 @@ public String getAttributeValue(String namespace, return null; } - + @Override public int getEventType() throws XmlPullParserException { return eventType; } - public void require(int type, String namespace, String name) + @Override + public void require( int type, String namespace, String name ) throws XmlPullParserException, IOException { - if(processNamespaces == false && namespace != null) { - throw new XmlPullParserException( - "processing namespaces must be enabled on parser (or factory)"+ - " to have possible namespaces delcared on elements" - +(" (postion:"+ getPositionDescription())+")"); + if ( !processNamespaces && namespace != null ) + { + throw new XmlPullParserException( "processing namespaces must be enabled on parser (or factory)" + + " to have possible namespaces declared on elements" + ( " (position:" + getPositionDescription() ) + + ")" ); } - if (type != getEventType() - || (namespace != null && !namespace.equals (getNamespace())) - || (name != null && !name.equals (getName ())) ) + if ( type != getEventType() || ( namespace != null && !namespace.equals( getNamespace() ) ) + || ( name != null && !name.equals( getName() ) ) ) { - throw new XmlPullParserException ( - "expected event "+TYPES[ type ] - +(name != null ? " with name '"+name+"'" : "") - +(namespace != null && name != null ? " and" : "") - +(namespace != null ? " with namespace '"+namespace+"'" : "") - +" but got" - +(type != getEventType() ? " "+TYPES[ getEventType() ] : "") - +(name != null && getName() != null && !name.equals (getName ()) - ? " name '"+getName()+"'" : "") - +(namespace != null && name != null - && getName() != null && !name.equals (getName ()) - && getNamespace() != null && !namespace.equals (getNamespace()) - ? " and" : "") - +(namespace != null && getNamespace() != null && !namespace.equals (getNamespace()) - ? " namespace '"+getNamespace()+"'" : "") - +(" (postion:"+ getPositionDescription())+")"); + throw new XmlPullParserException( "expected event " + TYPES[type] + + ( name != null ? " with name '" + name + "'" : "" ) + + ( namespace != null && name != null ? " and" : "" ) + + ( namespace != null ? " with namespace '" + namespace + "'" : "" ) + " but got" + + ( type != getEventType() ? " " + TYPES[getEventType()] : "" ) + + ( name != null && getName() != null && !name.equals( getName() ) ? " name '" + getName() + "'" : "" ) + + ( namespace != null && name != null && getName() != null && !name.equals( getName() ) + && getNamespace() != null && !namespace.equals( getNamespace() ) ? " and" : "" ) + + ( namespace != null && getNamespace() != null && !namespace.equals( getNamespace() ) + ? " namespace '" + getNamespace() + "'" + : "" ) + + ( " (position:" + getPositionDescription() ) + ")" ); } } - /** - * Skip sub tree that is currently porser positioned on. - *
                NOTE: parser must be on START_TAG and when funtion returns - * parser will be positioned on corresponding END_TAG + *

                Skip sub tree that is currently parser positioned on.

                + * NOTE: parser must be on START_TAG and when function returns parser will be positioned on corresponding END_TAG + * @throws XmlPullParserException issue + * @throws IOException io */ public void skipSubTree() throws XmlPullParserException, IOException { - require(START_TAG, null, null); + require( START_TAG, null, null ); int level = 1; - while(level > 0) { + while ( level > 0 ) + { int eventType = next(); - if(eventType == END_TAG) { + if ( eventType == END_TAG ) + { --level; - } else if(eventType == START_TAG) { + } + else if ( eventType == START_TAG ) + { ++level; } } } - // public String readText() throws XmlPullParserException, IOException - // { - // if (getEventType() != TEXT) return ""; - // String result = getText(); - // next(); - // return result; - // } - - public String nextText() throws XmlPullParserException, IOException - { - // String result = null; - // boolean onStartTag = false; - // if(eventType == START_TAG) { - // onStartTag = true; - // next(); - // } - // if(eventType == TEXT) { - // result = getText(); - // next(); - // } else if(onStartTag && eventType == END_TAG) { - // result = ""; - // } else { - // throw new XmlPullParserException( - // "parser must be on START_TAG or TEXT to read text", this, null); - // } - // if(eventType != END_TAG) { - // throw new XmlPullParserException( - // "event TEXT it must be immediately followed by END_TAG", this, null); - // } - // return result; - if(getEventType() != START_TAG) { - throw new XmlPullParserException( - "parser must be on START_TAG to read next text", this, null); + // public String readText() throws XmlPullParserException, IOException + // { + // if (getEventType() != TEXT) return ""; + // String result = getText(); + // next(); + // return result; + // } + + @Override + public String nextText() + throws XmlPullParserException, IOException + { + // String result = null; + // boolean onStartTag = false; + // if(eventType == START_TAG) { + // onStartTag = true; + // next(); + // } + // if(eventType == TEXT) { + // result = getText(); + // next(); + // } else if(onStartTag && eventType == END_TAG) { + // result = ""; + // } else { + // throw new XmlPullParserException( + // "parser must be on START_TAG or TEXT to read text", this, null); + // } + // if(eventType != END_TAG) { + // throw new XmlPullParserException( + // "event TEXT it must be immediately followed by END_TAG", this, null); + // } + // return result; + if ( getEventType() != START_TAG ) + { + throw new XmlPullParserException( "parser must be on START_TAG to read next text", this, null ); } int eventType = next(); - if(eventType == TEXT) { + if ( eventType == TEXT ) + { final String result = getText(); eventType = next(); - if(eventType != END_TAG) { - throw new XmlPullParserException( - "TEXT must be immediately followed by END_TAG and not " - +TYPES[ getEventType() ], this, null); + if ( eventType != END_TAG ) + { + throw new XmlPullParserException( "TEXT must be immediately followed by END_TAG and not " + + TYPES[getEventType()], this, null ); } return result; - } else if(eventType == END_TAG) { + } + else if ( eventType == END_TAG ) + { return ""; - } else { - throw new XmlPullParserException( - "parser must be on START_TAG or TEXT to read text", this, null); + } + else + { + throw new XmlPullParserException( "parser must be on START_TAG or TEXT to read text", this, null ); } } - public int nextTag() throws XmlPullParserException, IOException + @Override + public int nextTag() + throws XmlPullParserException, IOException { next(); - if(eventType == TEXT && isWhitespace()) { // skip whitespace + if ( eventType == TEXT && isWhitespace() ) + { // skip whitespace next(); } - if (eventType != START_TAG && eventType != END_TAG) { - throw new XmlPullParserException("expected START_TAG or END_TAG not " - +TYPES[ getEventType() ], this, null); + if ( eventType != START_TAG && eventType != END_TAG ) + { + throw new XmlPullParserException( "expected START_TAG or END_TAG not " + TYPES[getEventType()], this, + null ); } return eventType; } + @Override public int next() throws XmlPullParserException, IOException { @@ -1093,6 +1375,7 @@ public int next() return nextImpl(); } + @Override public int nextToken() throws XmlPullParserException, IOException { @@ -1100,33 +1383,37 @@ public int nextToken() return nextImpl(); } - - protected int nextImpl() + private int nextImpl() throws XmlPullParserException, IOException { text = null; pcEnd = pcStart = 0; usePC = false; bufStart = posEnd; - if(pastEndTag) { + if ( pastEndTag ) + { pastEndTag = false; --depth; - namespaceEnd = elNamespaceCount[ depth ]; // less namespaces available + namespaceEnd = elNamespaceCount[depth]; // less namespaces available } - if(emptyElementTag) { + if ( emptyElementTag ) + { emptyElementTag = false; pastEndTag = true; return eventType = END_TAG; } // [1] document ::= prolog element Misc* - if(depth > 0) { + if ( depth > 0 ) + { - if(seenStartTag) { + if ( seenStartTag ) + { seenStartTag = false; return eventType = parseStartTag(); } - if(seenEndTag) { + if ( seenEndTag ) + { seenEndTag = false; return eventType = parseEndTag(); } @@ -1134,13 +1421,18 @@ protected int nextImpl() // ASSUMPTION: we are _on_ first character of content or markup!!!! // [43] content ::= CharData? ((element | Reference | CDSect | PI | Comment) CharData?)* char ch; - if(seenMarkup) { // we have read ahead ... + if ( seenMarkup ) + { // we have read ahead ... seenMarkup = false; ch = '<'; - } else if(seenAmpersand) { + } + else if ( seenAmpersand ) + { seenAmpersand = false; ch = '&'; - } else { + } + else + { ch = more(); } posStart = pos - 1; // VERY IMPORTANT: this is correct start of event!!! @@ -1151,230 +1443,294 @@ protected int nextImpl() // when true TEXT data is not continuous (like ) and requires PC merging boolean needsMerging = false; - MAIN_LOOP: - while(true) { + MAIN_LOOP: while ( true ) + { // work on MARKUP - if(ch == '<') { - if(hadCharData) { - //posEnd = pos - 1; - if(tokenize) { + if ( ch == '<' ) + { + if ( hadCharData ) + { + // posEnd = pos - 1; + if ( tokenize ) + { seenMarkup = true; return eventType = TEXT; } } ch = more(); - if(ch == '/') { - if(!tokenize && hadCharData) { + if ( ch == '/' ) + { + if ( !tokenize && hadCharData ) + { seenEndTag = true; - //posEnd = pos - 2; + // posEnd = pos - 2; return eventType = TEXT; } return eventType = parseEndTag(); - } else if(ch == '!') { + } + else if ( ch == '!' ) + { ch = more(); - if(ch == '-') { + if ( ch == '-' ) + { // note: if(tokenize == false) posStart/End is NOT changed!!!! parseComment(); - if(tokenize) return eventType = COMMENT; - if( !usePC && hadCharData ) { + if ( tokenize ) + return eventType = COMMENT; + if ( !usePC && hadCharData ) + { needsMerging = true; - } else { - posStart = pos; //completely ignore comment } - } else if(ch == '[') { - //posEnd = pos - 3; + else + { + posStart = pos; // completely ignore comment + } + } + else if ( ch == '[' ) + { + // posEnd = pos - 3; // must remember previous posStart/End as it merges with content of CDATA - //int oldStart = posStart + bufAbsoluteStart; - //int oldEnd = posEnd + bufAbsoluteStart; - parseCDSect(hadCharData); - if(tokenize) return eventType = CDSECT; + // int oldStart = posStart + bufAbsoluteStart; + // int oldEnd = posEnd + bufAbsoluteStart; + parseCDSect( hadCharData ); + if ( tokenize ) + return eventType = CDSECT; final int cdStart = posStart; final int cdEnd = posEnd; final int cdLen = cdEnd - cdStart; - - if(cdLen > 0) { // was there anything inside CDATA section? + if ( cdLen > 0 ) + { // was there anything inside CDATA section? hadCharData = true; - if(!usePC) { + if ( !usePC ) + { needsMerging = true; } } - // posStart = oldStart; - // posEnd = oldEnd; - // if(cdLen > 0) { // was there anything inside CDATA section? - // if(hadCharData) { - // // do merging if there was anything in CDSect!!!! - // // if(!usePC) { - // // // posEnd is correct already!!! - // // if(posEnd > posStart) { - // // joinPC(); - // // } else { - // // usePC = true; - // // pcStart = pcEnd = 0; - // // } - // // } - // // if(pcEnd + cdLen >= pc.length) ensurePC(pcEnd + cdLen); - // // // copy [cdStart..cdEnd) into PC - // // System.arraycopy(buf, cdStart, pc, pcEnd, cdLen); - // // pcEnd += cdLen; - // if(!usePC) { - // needsMerging = true; - // posStart = cdStart; - // posEnd = cdEnd; - // } - // } else { - // if(!usePC) { - // needsMerging = true; - // posStart = cdStart; - // posEnd = cdEnd; - // hadCharData = true; - // } - // } - // //hadCharData = true; - // } else { - // if( !usePC && hadCharData ) { - // needsMerging = true; - // } - // } - } else { - throw new XmlPullParserException( - "unexpected character in markup "+printable(ch), this, null); + // posStart = oldStart; + // posEnd = oldEnd; + // if(cdLen > 0) { // was there anything inside CDATA section? + // if(hadCharData) { + // // do merging if there was anything in CDSect!!!! + // // if(!usePC) { + // // // posEnd is correct already!!! + // // if(posEnd > posStart) { + // // joinPC(); + // // } else { + // // usePC = true; + // // pcStart = pcEnd = 0; + // // } + // // } + // // if(pcEnd + cdLen >= pc.length) ensurePC(pcEnd + cdLen); + // // // copy [cdStart..cdEnd) into PC + // // System.arraycopy(buf, cdStart, pc, pcEnd, cdLen); + // // pcEnd += cdLen; + // if(!usePC) { + // needsMerging = true; + // posStart = cdStart; + // posEnd = cdEnd; + // } + // } else { + // if(!usePC) { + // needsMerging = true; + // posStart = cdStart; + // posEnd = cdEnd; + // hadCharData = true; + // } + // } + // //hadCharData = true; + // } else { + // if( !usePC && hadCharData ) { + // needsMerging = true; + // } + // } + } + else + { + throw new XmlPullParserException( "unexpected character in markup " + printable( ch ), this, + null ); } - } else if(ch == '?') { + } + else if ( ch == '?' ) + { parsePI(); - if(tokenize) return eventType = PROCESSING_INSTRUCTION; - if( !usePC && hadCharData ) { + if ( tokenize ) + return eventType = PROCESSING_INSTRUCTION; + if ( !usePC && hadCharData ) + { needsMerging = true; - } else { - posStart = pos; //completely ignore PI + } + else + { + posStart = pos; // completely ignore PI } - } else if( isNameStartChar(ch) ) { - if(!tokenize && hadCharData) { + } + else if ( isNameStartChar( ch ) ) + { + if ( !tokenize && hadCharData ) + { seenStartTag = true; - //posEnd = pos - 2; + // posEnd = pos - 2; return eventType = TEXT; } return eventType = parseStartTag(); - } else { - throw new XmlPullParserException( - "unexpected character in markup "+printable(ch), this, null); } - // do content comapctation if it makes sense!!!! + else + { + throw new XmlPullParserException( "unexpected character in markup " + printable( ch ), this, + null ); + } + // do content compaction if it makes sense!!!! - } else if(ch == '&') { - // work on ENTITTY - //posEnd = pos - 1; - if(tokenize && hadCharData) { + } + else if ( ch == '&' ) + { + // work on ENTITY + // posEnd = pos - 1; + if ( tokenize && hadCharData ) + { seenAmpersand = true; return eventType = TEXT; } final int oldStart = posStart + bufAbsoluteStart; final int oldEnd = posEnd + bufAbsoluteStart; final char[] resolvedEntity = parseEntityRef(); - if(tokenize) return eventType = ENTITY_REF; + if ( tokenize ) + return eventType = ENTITY_REF; // check if replacement text can be resolved !!! - if(resolvedEntity == null) { - if(entityRefName == null) { - entityRefName = newString(buf, posStart, posEnd - posStart); + if ( resolvedEntity == null ) + { + if ( entityRefName == null ) + { + entityRefName = newString( buf, posStart, posEnd - posStart ); } - throw new XmlPullParserException( - "could not resolve entity named '"+printable(entityRefName)+"'", - this, null); + throw new XmlPullParserException( "could not resolve entity named '" + + printable( entityRefName ) + "'", this, null ); } - //int entStart = posStart; - //int entEnd = posEnd; + // int entStart = posStart; + // int entEnd = posEnd; posStart = oldStart - bufAbsoluteStart; posEnd = oldEnd - bufAbsoluteStart; - if(!usePC) { - if(hadCharData) { + if ( !usePC ) + { + if ( hadCharData ) + { joinPC(); // posEnd is already set correctly!!! needsMerging = false; - } else { + } + else + { usePC = true; pcStart = pcEnd = 0; } } - //assert usePC == true; + // assert usePC == true; // write into PC replacement text - do merge for replacement text!!!! - for (int i = 0; i < resolvedEntity.length; i++) + for ( char aResolvedEntity : resolvedEntity ) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = resolvedEntity[ i ]; + if ( pcEnd >= pc.length ) + { + ensurePC( pcEnd ); + } + pc[pcEnd++] = aResolvedEntity; } hadCharData = true; - //assert needsMerging == false; - } else { + // assert needsMerging == false; + } + else + { - if(needsMerging) { - //assert usePC == false; - joinPC(); // posEnd is already set correctly!!! - //posStart = pos - 1; + if ( needsMerging ) + { + // assert usePC == false; + joinPC(); // posEnd is already set correctly!!! + // posStart = pos - 1; needsMerging = false; } + // no MARKUP not ENTITIES so work on character data ... - //no MARKUP not ENTITIES so work on character data ... - - - - // [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) - + // [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) hadCharData = true; boolean normalizedCR = false; - final boolean normalizeInput = tokenize == false || roundtripSupported == false; + final boolean normalizeInput = !tokenize || !roundtripSupported; // use loop locality here!!!! boolean seenBracket = false; boolean seenBracketBracket = false; - do { + do + { // check that ]]> does not show in - if(ch == ']') { - if(seenBracket) { + if ( ch == ']' ) + { + if ( seenBracket ) + { seenBracketBracket = true; - } else { + } + else + { seenBracket = true; } - } else if(seenBracketBracket && ch == '>') { - throw new XmlPullParserException( - "characters ]]> are not allowed in content", this, null); - } else { - if(seenBracket) { + } + else if ( seenBracketBracket && ch == '>' ) + { + throw new XmlPullParserException( "characters ]]> are not allowed in content", this, null ); + } + else + { + if ( seenBracket ) + { seenBracketBracket = seenBracket = false; } // assert seenTwoBrackets == seenBracket == false; } - if(normalizeInput) { + if ( normalizeInput ) + { // deal with normalization issues ... - if(ch == '\r') { + if ( ch == '\r' ) + { normalizedCR = true; - posEnd = pos -1; + posEnd = pos - 1; // posEnd is already set - if(!usePC) { - if(posEnd > posStart) { + if ( !usePC ) + { + if ( posEnd > posStart ) + { joinPC(); - } else { + } + else + { usePC = true; pcStart = pcEnd = 0; } } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); + // assert usePC == true; + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = '\n'; - } else if(ch == '\n') { - // if(!usePC) { joinPC(); } else { if(pcEnd >= pc.length) ensurePC(); } - if(!normalizedCR && usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else if ( ch == '\n' ) + { + // if(!usePC) { joinPC(); } else { if(pcEnd >= pc.length) ensurePC(); } + if ( !normalizedCR && usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = '\n'; } normalizedCR = false; - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else + { + if ( usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = ch; } normalizedCR = false; @@ -1382,254 +1738,360 @@ protected int nextImpl() } ch = more(); - } while(ch != '<' && ch != '&'); + } + while ( ch != '<' && ch != '&' ); posEnd = pos - 1; - continue MAIN_LOOP; // skip ch = more() from below - we are already ahead ... + continue MAIN_LOOP; // skip ch = more() from below - we are already ahead ... } ch = more(); } // endless while(true) - } else { - if(seenRoot) { + } + else + { + if ( seenRoot ) + { return parseEpilog(); - } else { + } + else + { return parseProlog(); } } } - - protected int parseProlog() + private int parseProlog() throws XmlPullParserException, IOException { // [2] prolog: ::= XMLDecl? Misc* (doctypedecl Misc*)? and look for [39] element char ch; - if(seenMarkup) { - ch = buf[ pos - 1 ]; - } else { + if ( seenMarkup ) + { + ch = buf[pos - 1]; + } + else + { ch = more(); } - if(eventType == START_DOCUMENT) { + if ( eventType == START_DOCUMENT ) + { // bootstrap parsing with getting first character input! // deal with BOM // detect BOM and crop it (Unicode int Order Mark) - if(ch == '\uFFFE') { - throw new XmlPullParserException( - "first character in input was UNICODE noncharacter (0xFFFE)"+ - "- input requires int swapping", this, null); + if ( ch == '\uFFFE' ) + { + throw new XmlPullParserException( "first character in input was UNICODE noncharacter (0xFFFE)" + + "- input requires int swapping", this, null ); } - if(ch == '\uFEFF') { + if ( ch == '\uFEFF' ) + { // skipping UNICODE int Order Mark (so called BOM) ch = more(); } + else if ( ch == '\uFFFD' ) + { + // UTF-16 BOM in an UTF-8 encoded file? + // This is a hack...not the best way to check for BOM in UTF-16 + ch = more(); + if ( ch == '\uFFFD' ) + { + throw new XmlPullParserException( "UTF-16 BOM in a UTF-8 encoded file is incompatible", this, + null ); + } + } } seenMarkup = false; boolean gotS = false; posStart = pos - 1; - final boolean normalizeIgnorableWS = tokenize == true && roundtripSupported == false; + final boolean normalizeIgnorableWS = tokenize && !roundtripSupported; boolean normalizedCR = false; - while(true) { + while ( true ) + { // deal with Misc // [27] Misc ::= Comment | PI | S // deal with docdecl --> mark it! // else parseStartTag seen <[^/] - if(ch == '<') { - if(gotS && tokenize) { + if ( ch == '<' ) + { + if ( gotS && tokenize ) + { posEnd = pos - 1; seenMarkup = true; return eventType = IGNORABLE_WHITESPACE; } ch = more(); - if(ch == '?') { + if ( ch == '?' ) + { // check if it is 'xml' // deal with XMLDecl boolean isXMLDecl = parsePI(); - if(tokenize) { - if (isXMLDecl) { + if ( tokenize ) + { + if ( isXMLDecl ) + { return eventType = START_DOCUMENT; } return eventType = PROCESSING_INSTRUCTION; } - } else if(ch == '!') { + } + else if ( ch == '!' ) + { ch = more(); - if(ch == 'D') { - if(seenDocdecl) { - throw new XmlPullParserException( - "only one docdecl allowed in XML document", this, null); + if ( ch == 'D' ) + { + if ( seenDocdecl ) + { + throw new XmlPullParserException( "only one docdecl allowed in XML document", this, null ); } seenDocdecl = true; parseDocdecl(); - if(tokenize) return eventType = DOCDECL; - } else if(ch == '-') { + if ( tokenize ) + return eventType = DOCDECL; + } + else if ( ch == '-' ) + { parseComment(); - if(tokenize) return eventType = COMMENT; - } else { - throw new XmlPullParserException( - "unexpected markup posStart) { + if ( !usePC ) + { + posEnd = pos - 1; + if ( posEnd > posStart ) + { joinPC(); - } else { + } + else + { usePC = true; pcStart = pcEnd = 0; } } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); + // assert usePC == true; + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = '\n'; - } else if(ch == '\n') { - if(!normalizedCR && usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else if ( ch == '\n' ) + { + if ( !normalizedCR && usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = '\n'; } normalizedCR = false; - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else + { + if ( usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = ch; } normalizedCR = false; } } - } else { - throw new XmlPullParserException( - "only whitespace content allowed before start tag and not "+printable(ch), - this, null); + } + else + { + throw new XmlPullParserException( "only whitespace content allowed before start tag and not " + + printable( ch ), this, null ); } ch = more(); } } - protected int parseEpilog() + private int parseEpilog() throws XmlPullParserException, IOException { - if(eventType == END_DOCUMENT) { - throw new XmlPullParserException("already reached end of XML input", this, null); + if ( eventType == END_DOCUMENT ) + { + throw new XmlPullParserException( "already reached end of XML input", this, null ); } - if(reachedEnd) { + if ( reachedEnd ) + { return eventType = END_DOCUMENT; } boolean gotS = false; - final boolean normalizeIgnorableWS = tokenize == true && roundtripSupported == false; + final boolean normalizeIgnorableWS = tokenize && !roundtripSupported; boolean normalizedCR = false; - try { + try + { // epilog: Misc* char ch; - if(seenMarkup) { - ch = buf[ pos - 1 ]; - } else { + if ( seenMarkup ) + { + ch = buf[pos - 1]; + } + else + { ch = more(); } seenMarkup = false; posStart = pos - 1; - if(!reachedEnd) { - while(true) { + if ( !reachedEnd ) + { + while ( true ) + { // deal with Misc // [27] Misc ::= Comment | PI | S - if(ch == '<') { - if(gotS && tokenize) { + if ( ch == '<' ) + { + if ( gotS && tokenize ) + { posEnd = pos - 1; seenMarkup = true; return eventType = IGNORABLE_WHITESPACE; } ch = more(); - if(reachedEnd) { + if ( reachedEnd ) + { break; } - if(ch == '?') { + if ( ch == '?' ) + { // check if it is 'xml' // deal with XMLDecl parsePI(); - if(tokenize) return eventType = PROCESSING_INSTRUCTION; + if ( tokenize ) + return eventType = PROCESSING_INSTRUCTION; - } else if(ch == '!') { + } + else if ( ch == '!' ) + { ch = more(); - if(reachedEnd) { + if ( reachedEnd ) + { break; } - if(ch == 'D') { - parseDocdecl(); //FIXME - if(tokenize) return eventType = DOCDECL; - } else if(ch == '-') { + if ( ch == 'D' ) + { + parseDocdecl(); // FIXME + if ( tokenize ) + return eventType = DOCDECL; + } + else if ( ch == '-' ) + { parseComment(); - if(tokenize) return eventType = COMMENT; - } else { - throw new XmlPullParserException( - "unexpected markup posStart) { + if ( !usePC ) + { + posEnd = pos - 1; + if ( posEnd > posStart ) + { joinPC(); - } else { + } + else + { usePC = true; pcStart = pcEnd = 0; } } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); + // assert usePC == true; + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = '\n'; - } else if(ch == '\n') { - if(!normalizedCR && usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else if ( ch == '\n' ) + { + if ( !normalizedCR && usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = '\n'; } normalizedCR = false; - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else + { + if ( usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = ch; } normalizedCR = false; } } - } else { - throw new XmlPullParserException( - "in epilog non whitespace content is not allowed but got "+printable(ch), - this, null); + } + else + { + throw new XmlPullParserException( "in epilog non whitespace content is not allowed but got " + + printable( ch ), this, null ); } ch = more(); - if(reachedEnd) { + if ( reachedEnd ) + { break; } @@ -1638,87 +2100,93 @@ protected int parseEpilog() // throw Exception("unexpected content in epilog // catch EOFException return END_DOCUMENT - //try { - } catch(EOFException ex) { + // try { + } + catch ( EOFException ex ) + { reachedEnd = true; } - if(reachedEnd) { - if(tokenize && gotS) { - posEnd = pos; // well - this is LAST available character pos - return eventType = IGNORABLE_WHITESPACE; - } - return eventType = END_DOCUMENT; - } else { - throw new XmlPullParserException("internal error in parseEpilog"); + if ( tokenize && gotS ) + { + posEnd = pos; // well - this is LAST available character pos + return eventType = IGNORABLE_WHITESPACE; } + return eventType = END_DOCUMENT; } - - public int parseEndTag() throws XmlPullParserException, IOException { - //ASSUMPTION ch is past "' + public int parseEndTag() + throws XmlPullParserException, IOException + { + // ASSUMPTION ch is past "' char ch = more(); - if(!isNameStartChar(ch)) { - throw new XmlPullParserException( - "expected name start and not "+printable(ch), this, null); + if ( !isNameStartChar( ch ) ) + { + throw new XmlPullParserException( "expected name start and not " + printable( ch ), this, null ); } posStart = pos - 3; final int nameStart = pos - 1 + bufAbsoluteStart; - do { + do + { ch = more(); - } while(isNameChar(ch)); + } + while ( isNameChar( ch ) ); // now we go one level down -- do checks - //--depth; //FIXME + // --depth; //FIXME // check that end tag name is the same as start tag - //String name = new String(buf, nameStart - bufAbsoluteStart, - // (pos - 1) - (nameStart - bufAbsoluteStart)); - //int last = pos - 1; + // String name = new String(buf, nameStart - bufAbsoluteStart, + // (pos - 1) - (nameStart - bufAbsoluteStart)); + // int last = pos - 1; int off = nameStart - bufAbsoluteStart; - //final int len = last - off; - final int len = (pos - 1) - off; + // final int len = last - off; + final int len = ( pos - 1 ) - off; final char[] cbuf = elRawName[depth]; - if(elRawNameEnd[depth] != len) { + if ( elRawNameEnd[depth] != len ) + { // construct strings for exception - final String startname = new String(cbuf, 0, elRawNameEnd[depth]); - final String endname = new String(buf, off, len); - throw new XmlPullParserException( - "end tag name must match start tag name <"+startname+">" - +" from line "+elRawNameLine[depth], this, null); + final String startname = new String( cbuf, 0, elRawNameEnd[depth] ); + final String endname = new String( buf, off, len ); + throw new XmlPullParserException( "end tag name must match start tag name <" + startname + + ">" + " from line " + elRawNameLine[depth], this, null ); } - for (int i = 0; i < len; i++) + for ( int i = 0; i < len; i++ ) { - if(buf[off++] != cbuf[i]) { + if ( buf[off++] != cbuf[i] ) + { // construct strings for exception - final String startname = new String(cbuf, 0, len); - final String endname = new String(buf, off - i - 1, len); - throw new XmlPullParserException( - "end tag name must be the same as start tag <"+startname+">" - +" from line "+elRawNameLine[depth], this, null); + final String startname = new String( cbuf, 0, len ); + final String endname = new String( buf, off - i - 1, len ); + throw new XmlPullParserException( "end tag name must be the same as start tag <" + + startname + ">" + " from line " + elRawNameLine[depth], this, null ); } } - while(isS(ch)) { ch = more(); } // skip additional white spaces - if(ch != '>') { - throw new XmlPullParserException( - "expected > to finsh end tag not "+printable(ch) - +" from line "+elRawNameLine[depth], this, null); + while ( isS( ch ) ) + { + ch = more(); + } // skip additional white spaces + if ( ch != '>' ) + { + throw new XmlPullParserException( "expected > to finsh end tag not " + printable( ch ) + " from line " + + elRawNameLine[depth], this, null ); } - - //namespaceEnd = elNamespaceCount[ depth ]; //FIXME + // namespaceEnd = elNamespaceCount[ depth ]; //FIXME posEnd = pos; pastEndTag = true; return eventType = END_TAG; } - public int parseStartTag() throws XmlPullParserException, IOException { - //ASSUMPTION ch is past ' + public int parseStartTag() + throws XmlPullParserException, IOException + { + // ASSUMPTION ch is past ' // [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' - ++depth; //FIXME + ++depth; // FIXME posStart = pos - 2; @@ -1727,17 +2195,20 @@ public int parseStartTag() throws XmlPullParserException, IOException { // retrieve name final int nameStart = pos - 1 + bufAbsoluteStart; int colonPos = -1; - char ch = buf[ pos - 1]; - if(ch == ':' && processNamespaces) throw new XmlPullParserException( - "when namespaces processing enabled colon can not be at element name start", - this, null); - while(true) { + char ch = buf[pos - 1]; + if ( ch == ':' && processNamespaces ) + throw new XmlPullParserException( "when namespaces processing enabled colon can not be at element name start", + this, null ); + while ( true ) + { ch = more(); - if(!isNameChar(ch)) break; - if(ch == ':' && processNamespaces) { - if(colonPos != -1) throw new XmlPullParserException( - "only one colon is allowed in name of element when namespaces are enabled", - this, null); + if ( !isNameChar( ch ) ) + break; + if ( ch == ':' && processNamespaces ) + { + if ( colonPos != -1 ) + throw new XmlPullParserException( "only one colon is allowed in name of element when namespaces are enabled", + this, null ); colonPos = pos - 1 + bufAbsoluteStart; } } @@ -1745,159 +2216,183 @@ public int parseStartTag() throws XmlPullParserException, IOException { // retrieve name ensureElementsCapacity(); + // TODO check for efficient interning and then use elRawNameInterned!!!! - //TODO check for efficient interning and then use elRawNameInterned!!!! - - int elLen = (pos - 1) - (nameStart - bufAbsoluteStart); - if(elRawName[ depth ] == null || elRawName[ depth ].length < elLen) { - elRawName[ depth ] = new char[ 2 * elLen ]; + int elLen = ( pos - 1 ) - ( nameStart - bufAbsoluteStart ); + if ( elRawName[depth] == null || elRawName[depth].length < elLen ) + { + elRawName[depth] = new char[2 * elLen]; } - System.arraycopy(buf, nameStart - bufAbsoluteStart, elRawName[ depth ], 0, elLen); - elRawNameEnd[ depth ] = elLen; - elRawNameLine[ depth ] = lineNumber; + System.arraycopy( buf, nameStart - bufAbsoluteStart, elRawName[depth], 0, elLen ); + elRawNameEnd[depth] = elLen; + elRawNameLine[depth] = lineNumber; String name = null; // work on prefixes and namespace URI String prefix = null; - if(processNamespaces) { - if(colonPos != -1) { - prefix = elPrefix[ depth ] = newString(buf, nameStart - bufAbsoluteStart, - colonPos - nameStart); - name = elName[ depth ] = newString(buf, colonPos + 1 - bufAbsoluteStart, - //(pos -1) - (colonPos + 1)); - pos - 2 - (colonPos - bufAbsoluteStart)); - } else { - prefix = elPrefix[ depth ] = null; - name = elName[ depth ] = newString(buf, nameStart - bufAbsoluteStart, elLen); + if ( processNamespaces ) + { + if ( colonPos != -1 ) + { + prefix = elPrefix[depth] = newString( buf, nameStart - bufAbsoluteStart, colonPos - nameStart ); + name = elName[depth] = newString( buf, colonPos + 1 - bufAbsoluteStart, + // (pos -1) - (colonPos + 1)); + pos - 2 - ( colonPos - bufAbsoluteStart ) ); + } + else + { + prefix = elPrefix[depth] = null; + name = elName[depth] = newString( buf, nameStart - bufAbsoluteStart, elLen ); } - } else { + } + else + { - name = elName[ depth ] = newString(buf, nameStart - bufAbsoluteStart, elLen); + name = elName[depth] = newString( buf, nameStart - bufAbsoluteStart, elLen ); } + while ( true ) + { - while(true) { - - while(isS(ch)) { ch = more(); } // skip additional white spaces + while ( isS( ch ) ) + { + ch = more(); + } // skip additional white spaces - if(ch == '>') { + if ( ch == '>' ) + { break; - } else if(ch == '/') { - if(emptyElementTag) throw new XmlPullParserException( - "repeated / in tag declaration", this, null); + } + else if ( ch == '/' ) + { + if ( emptyElementTag ) + throw new XmlPullParserException( "repeated / in tag declaration", this, null ); emptyElementTag = true; ch = more(); - if(ch != '>') throw new XmlPullParserException( - "expected > to end empty tag not "+printable(ch), this, null); + if ( ch != '>' ) + throw new XmlPullParserException( "expected > to end empty tag not " + printable( ch ), this, + null ); break; - } else if(isNameStartChar(ch)) { + } + else if ( isNameStartChar( ch ) ) + { ch = parseAttribute(); ch = more(); - continue; - } else { - throw new XmlPullParserException( - "start tag unexpected character "+printable(ch), this, null); } - //ch = more(); // skip space + else + { + throw new XmlPullParserException( "start tag unexpected character " + printable( ch ), this, null ); + } + // ch = more(); // skip space } // now when namespaces were declared we can resolve them - if(processNamespaces) { - String uri = getNamespace(prefix); - if(uri == null) { - if(prefix == null) { // no prefix and no uri => use default namespace + if ( processNamespaces ) + { + String uri = getNamespace( prefix ); + if ( uri == null ) + { + if ( prefix == null ) + { // no prefix and no uri => use default namespace uri = NO_NAMESPACE; - } else { - throw new XmlPullParserException( - "could not determine namespace bound to element prefix "+prefix, - this, null); + } + else + { + throw new XmlPullParserException( "could not determine namespace bound to element prefix " + prefix, + this, null ); } } - elUri[ depth ] = uri; + elUri[depth] = uri; - - //String uri = getNamespace(prefix); - //if(uri == null && prefix == null) { // no prefix and no uri => use default namespace - // uri = ""; - //} + // String uri = getNamespace(prefix); + // if(uri == null && prefix == null) { // no prefix and no uri => use default namespace + // uri = ""; + // } // resolve attribute namespaces - for (int i = 0; i < attributeCount; i++) + for ( int i = 0; i < attributeCount; i++ ) { - final String attrPrefix = attributePrefix[ i ]; - if(attrPrefix != null) { - final String attrUri = getNamespace(attrPrefix); - if(attrUri == null) { - throw new XmlPullParserException( - "could not determine namespace bound to attribute prefix "+attrPrefix, - this, null); + final String attrPrefix = attributePrefix[i]; + if ( attrPrefix != null ) + { + final String attrUri = getNamespace( attrPrefix ); + if ( attrUri == null ) + { + throw new XmlPullParserException( "could not determine namespace bound to attribute prefix " + + attrPrefix, this, null ); } - attributeUri[ i ] = attrUri; - } else { - attributeUri[ i ] = NO_NAMESPACE; + attributeUri[i] = attrUri; + } + else + { + attributeUri[i] = NO_NAMESPACE; } } - //TODO - //[ WFC: Unique Att Spec ] - // check namespaced attribute uniqueness contraint!!! + // TODO + // [ WFC: Unique Att Spec ] + // check namespaced attribute uniqueness constraint!!! - for (int i = 1; i < attributeCount; i++) + for ( int i = 1; i < attributeCount; i++ ) { - for (int j = 0; j < i; j++) + for ( int j = 0; j < i; j++ ) { - if( attributeUri[j] == attributeUri[i] - && (allStringsInterned && attributeName[j].equals(attributeName[i]) - || (!allStringsInterned - && attributeNameHash[ j ] == attributeNameHash[ i ] - && attributeName[j].equals(attributeName[i])) ) + if ( attributeUri[j] == attributeUri[i] + && ( allStringsInterned && attributeName[j].equals( attributeName[i] ) + || ( !allStringsInterned && attributeNameHash[j] == attributeNameHash[i] + && attributeName[j].equals( attributeName[i] ) ) ) - ) { - // prepare data for nice error messgae? + ) + { + // prepare data for nice error message? String attr1 = attributeName[j]; - if(attributeUri[j] != null) attr1 = attributeUri[j]+":"+attr1; + if ( attributeUri[j] != null ) + attr1 = attributeUri[j] + ":" + attr1; String attr2 = attributeName[i]; - if(attributeUri[i] != null) attr2 = attributeUri[i]+":"+attr2; - throw new XmlPullParserException( - "duplicated attributes "+attr1+" and "+attr2, this, null); + if ( attributeUri[i] != null ) + attr2 = attributeUri[i] + ":" + attr2; + throw new XmlPullParserException( "duplicated attributes " + attr1 + " and " + attr2, this, + null ); } } } + } + else + { // ! processNamespaces - } else { // ! processNamespaces - - //[ WFC: Unique Att Spec ] - // check raw attribute uniqueness contraint!!! - for (int i = 1; i < attributeCount; i++) + // [ WFC: Unique Att Spec ] + // check raw attribute uniqueness constraint!!! + for ( int i = 1; i < attributeCount; i++ ) { - for (int j = 0; j < i; j++) + for ( int j = 0; j < i; j++ ) { - if((allStringsInterned && attributeName[j].equals(attributeName[i]) - || (!allStringsInterned - && attributeNameHash[ j ] == attributeNameHash[ i ] - && attributeName[j].equals(attributeName[i])) ) + if ( ( allStringsInterned && attributeName[j].equals( attributeName[i] ) + || ( !allStringsInterned && attributeNameHash[j] == attributeNameHash[i] + && attributeName[j].equals( attributeName[i] ) ) ) - ) { - // prepare data for nice error messgae? + ) + { + // prepare data for nice error message? final String attr1 = attributeName[j]; final String attr2 = attributeName[i]; - throw new XmlPullParserException( - "duplicated attributes "+attr1+" and "+attr2, this, null); + throw new XmlPullParserException( "duplicated attributes " + attr1 + " and " + attr2, this, + null ); } } } } - elNamespaceCount[ depth ] = namespaceEnd; + elNamespaceCount[depth] = namespaceEnd; posEnd = pos; return eventType = START_TAG; } - protected char parseAttribute() throws XmlPullParserException, IOException + private char parseAttribute() + throws XmlPullParserException, IOException { // parse attribute // [41] Attribute ::= Name Eq AttValue @@ -1906,240 +2401,273 @@ protected char parseAttribute() throws XmlPullParserException, IOException final int prevPosStart = posStart + bufAbsoluteStart; final int nameStart = pos - 1 + bufAbsoluteStart; int colonPos = -1; - char ch = buf[ pos - 1 ]; - if(ch == ':' && processNamespaces) throw new XmlPullParserException( - "when namespaces processing enabled colon can not be at attribute name start", - this, null); - + char ch = buf[pos - 1]; + if ( ch == ':' && processNamespaces ) + throw new XmlPullParserException( "when namespaces processing enabled colon can not be at attribute name start", + this, null ); boolean startsWithXmlns = processNamespaces && ch == 'x'; int xmlnsPos = 0; ch = more(); - while(isNameChar(ch)) { - if(processNamespaces) { - if(startsWithXmlns && xmlnsPos < 5) { + while ( isNameChar( ch ) ) + { + if ( processNamespaces ) + { + if ( startsWithXmlns && xmlnsPos < 5 ) + { ++xmlnsPos; - if(xmlnsPos == 1) { if(ch != 'm') startsWithXmlns = false; } - else if(xmlnsPos == 2) { if(ch != 'l') startsWithXmlns = false; } - else if(xmlnsPos == 3) { if(ch != 'n') startsWithXmlns = false; } - else if(xmlnsPos == 4) { if(ch != 's') startsWithXmlns = false; } - else if(xmlnsPos == 5) { - if(ch != ':') throw new XmlPullParserException( - "after xmlns in attribute name must be colon" - +"when namespaces are enabled", this, null); - //colonPos = pos - 1 + bufAbsoluteStart; - } - } - if(ch == ':') { - if(colonPos != -1) throw new XmlPullParserException( - "only one colon is allowed in attribute name" - +" when namespaces are enabled", this, null); + if ( xmlnsPos == 1 ) + { + if ( ch != 'm' ) + startsWithXmlns = false; + } + else if ( xmlnsPos == 2 ) + { + if ( ch != 'l' ) + startsWithXmlns = false; + } + else if ( xmlnsPos == 3 ) + { + if ( ch != 'n' ) + startsWithXmlns = false; + } + else if ( xmlnsPos == 4 ) + { + if ( ch != 's' ) + startsWithXmlns = false; + } + else if ( xmlnsPos == 5 ) + { + if ( ch != ':' ) + throw new XmlPullParserException( "after xmlns in attribute name must be colon" + + "when namespaces are enabled", this, null ); + // colonPos = pos - 1 + bufAbsoluteStart; + } + } + if ( ch == ':' ) + { + if ( colonPos != -1 ) + throw new XmlPullParserException( "only one colon is allowed in attribute name" + + " when namespaces are enabled", this, null ); colonPos = pos - 1 + bufAbsoluteStart; } } ch = more(); } - ensureAttributesCapacity(attributeCount); + ensureAttributesCapacity( attributeCount ); // --- start processing attributes String name = null; String prefix = null; // work on prefixes and namespace URI - if(processNamespaces) { - if(xmlnsPos < 4) startsWithXmlns = false; - if(startsWithXmlns) { - if(colonPos != -1) { - //prefix = attributePrefix[ attributeCount ] = null; - final int nameLen = pos - 2 - (colonPos - bufAbsoluteStart); - if(nameLen == 0) { - throw new XmlPullParserException( - "namespace prefix is required after xmlns: " - +" when namespaces are enabled", this, null); - } - name = //attributeName[ attributeCount ] = - newString(buf, colonPos - bufAbsoluteStart + 1, nameLen); - //pos - 1 - (colonPos + 1 - bufAbsoluteStart) - } - } else { - if(colonPos != -1) { + if ( processNamespaces ) + { + if ( xmlnsPos < 4 ) + startsWithXmlns = false; + if ( startsWithXmlns ) + { + if ( colonPos != -1 ) + { + // prefix = attributePrefix[ attributeCount ] = null; + final int nameLen = pos - 2 - ( colonPos - bufAbsoluteStart ); + if ( nameLen == 0 ) + { + throw new XmlPullParserException( "namespace prefix is required after xmlns: " + + " when namespaces are enabled", this, null ); + } + name = // attributeName[ attributeCount ] = + newString( buf, colonPos - bufAbsoluteStart + 1, nameLen ); + // pos - 1 - (colonPos + 1 - bufAbsoluteStart) + } + } + else + { + if ( colonPos != -1 ) + { int prefixLen = colonPos - nameStart; - prefix = attributePrefix[ attributeCount ] = - newString(buf, nameStart - bufAbsoluteStart,prefixLen); - //colonPos - (nameStart - bufAbsoluteStart)); - int nameLen = pos - 2 - (colonPos - bufAbsoluteStart); - name = attributeName[ attributeCount ] = - newString(buf, colonPos - bufAbsoluteStart + 1, nameLen); - //pos - 1 - (colonPos + 1 - bufAbsoluteStart)); - - //name.substring(0, colonPos-nameStart); - } else { - prefix = attributePrefix[ attributeCount ] = null; - name = attributeName[ attributeCount ] = - newString(buf, nameStart - bufAbsoluteStart, - pos - 1 - (nameStart - bufAbsoluteStart)); + prefix = + attributePrefix[attributeCount] = newString( buf, nameStart - bufAbsoluteStart, prefixLen ); + // colonPos - (nameStart - bufAbsoluteStart)); + int nameLen = pos - 2 - ( colonPos - bufAbsoluteStart ); + name = attributeName[attributeCount] = newString( buf, colonPos - bufAbsoluteStart + 1, nameLen ); + // pos - 1 - (colonPos + 1 - bufAbsoluteStart)); + + // name.substring(0, colonPos-nameStart); } - if(!allStringsInterned) { - attributeNameHash[ attributeCount ] = name.hashCode(); + else + { + prefix = attributePrefix[attributeCount] = null; + name = attributeName[attributeCount] = + newString( buf, nameStart - bufAbsoluteStart, pos - 1 - ( nameStart - bufAbsoluteStart ) ); + } + if ( !allStringsInterned ) + { + attributeNameHash[attributeCount] = name.hashCode(); } } - } else { + } + else + { // retrieve name - name = attributeName[ attributeCount ] = - newString(buf, nameStart - bufAbsoluteStart, - pos - 1 - (nameStart - bufAbsoluteStart)); - ////assert name != null; - if(!allStringsInterned) { - attributeNameHash[ attributeCount ] = name.hashCode(); + name = attributeName[attributeCount] = + newString( buf, nameStart - bufAbsoluteStart, pos - 1 - ( nameStart - bufAbsoluteStart ) ); + //// assert name != null; + if ( !allStringsInterned ) + { + attributeNameHash[attributeCount] = name.hashCode(); } } - // [25] Eq ::= S? '=' S? - while(isS(ch)) { ch = more(); } // skip additional spaces - if(ch != '=') throw new XmlPullParserException( - "expected = after attribute name", this, null); - ch = more(); - while(isS(ch)) { ch = more(); } // skip additional spaces - - // [10] AttValue ::= '"' ([^<&"] | Reference)* '"' - // | "'" ([^<&'] | Reference)* "'" + // [25] Eq ::= S? '=' S? + while ( isS( ch ) ) + { + ch = more(); + } // skip additional spaces + if ( ch != '=' ) + throw new XmlPullParserException( "expected = after attribute name", this, null ); + ch = more(); + while ( isS( ch ) ) + { + ch = more(); + } // skip additional spaces + + // [10] AttValue ::= '"' ([^<&"] | Reference)* '"' + // | "'" ([^<&'] | Reference)* "'" final char delimit = ch; - if(delimit != '"' && delimit != '\'') throw new XmlPullParserException( - "attribute value must start with quotation or apostrophe not " - +printable(delimit), this, null); + if ( delimit != '"' && delimit != '\'' ) + throw new XmlPullParserException( "attribute value must start with quotation or apostrophe not " + + printable( delimit ), this, null ); // parse until delimit or < and resolve Reference - //[67] Reference ::= EntityRef | CharRef - //int valueStart = pos + bufAbsoluteStart; - + // [67] Reference ::= EntityRef | CharRef + // int valueStart = pos + bufAbsoluteStart; boolean normalizedCR = false; usePC = false; pcStart = pcEnd; posStart = pos; - while(true) { + while ( true ) + { ch = more(); - if(ch == delimit) { + if ( ch == delimit ) + { break; - } if(ch == '<') { - throw new XmlPullParserException( - "markup not allowed inside attribute value - illegal < ", this, null); - } if(ch == '&') { - // extractEntityRef - posEnd = pos - 1; - if(!usePC) { - final boolean hadCharData = posEnd > posStart; - if(hadCharData) { - // posEnd is already set correctly!!! - joinPC(); - } else { - usePC = true; - pcStart = pcEnd = 0; - } - } - //assert usePC == true; - - final char[] resolvedEntity = parseEntityRef(); - // check if replacement text can be resolved !!! - if(resolvedEntity == null) { - if(entityRefName == null) { - entityRefName = newString(buf, posStart, posEnd - posStart); - } - throw new XmlPullParserException( - "could not resolve entity named '"+printable(entityRefName)+"'", - this, null); - } - // write into PC replacement text - do merge for replacement text!!!! - for (int i = 0; i < resolvedEntity.length; i++) - { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = resolvedEntity[ i ]; - } - } else if(ch == '\t' || ch == '\n' || ch == '\r') { + } + if ( ch == '<' ) + { + throw new XmlPullParserException( "markup not allowed inside attribute value - illegal < ", this, + null ); + } + if ( ch == '&' ) + { + extractEntityRef(); + } + else if ( ch == '\t' || ch == '\n' || ch == '\r' ) + { // do attribute value normalization // as described in http://www.w3.org/TR/REC-xml#AVNormalize // TODO add test for it form spec ... // handle EOL normalization ... - if(!usePC) { + if ( !usePC ) + { posEnd = pos - 1; - if(posEnd > posStart) { + if ( posEnd > posStart ) + { joinPC(); - } else { + } + else + { usePC = true; pcEnd = pcStart = 0; } } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); - if(ch != '\n' || !normalizedCR) { - pc[pcEnd++] = ' '; //'\n'; + // assert usePC == true; + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); + if ( ch != '\n' || !normalizedCR ) + { + pc[pcEnd++] = ' '; // '\n'; } - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else + { + if ( usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = ch; } } normalizedCR = ch == '\r'; } - - if(processNamespaces && startsWithXmlns) { + if ( processNamespaces && startsWithXmlns ) + { String ns = null; - if(!usePC) { - ns = newStringIntern(buf, posStart, pos - 1 - posStart); - } else { - ns = newStringIntern(pc, pcStart, pcEnd - pcStart); + if ( !usePC ) + { + ns = newStringIntern( buf, posStart, pos - 1 - posStart ); + } + else + { + ns = newStringIntern( pc, pcStart, pcEnd - pcStart ); } - ensureNamespacesCapacity(namespaceEnd); + ensureNamespacesCapacity( namespaceEnd ); int prefixHash = -1; - if(colonPos != -1) { - if(ns.length() == 0) { - throw new XmlPullParserException( - "non-default namespace can not be declared to be empty string", this, null); + if ( colonPos != -1 ) + { + if ( ns.length() == 0 ) + { + throw new XmlPullParserException( "non-default namespace can not be declared to be empty string", + this, null ); } // declare new namespace - namespacePrefix[ namespaceEnd ] = name; - if(!allStringsInterned) { - prefixHash = namespacePrefixHash[ namespaceEnd ] = name.hashCode(); + namespacePrefix[namespaceEnd] = name; + if ( !allStringsInterned ) + { + prefixHash = namespacePrefixHash[namespaceEnd] = name.hashCode(); } - } else { + } + else + { // declare new default namespace... - namespacePrefix[ namespaceEnd ] = null; //""; //null; //TODO check FIXME Alek - if(!allStringsInterned) { - prefixHash = namespacePrefixHash[ namespaceEnd ] = -1; + namespacePrefix[namespaceEnd] = null; // ""; //null; //TODO check FIXME Alek + if ( !allStringsInterned ) + { + prefixHash = namespacePrefixHash[namespaceEnd] = -1; } } - namespaceUri[ namespaceEnd ] = ns; + namespaceUri[namespaceEnd] = ns; // detect duplicate namespace declarations!!! - final int startNs = elNamespaceCount[ depth - 1 ]; - for (int i = namespaceEnd - 1; i >= startNs; --i) + final int startNs = elNamespaceCount[depth - 1]; + for ( int i = namespaceEnd - 1; i >= startNs; --i ) { - if(((allStringsInterned || name == null) && namespacePrefix[ i ] == name) - || (!allStringsInterned && name != null && - namespacePrefixHash[ i ] == prefixHash - && name.equals(namespacePrefix[ i ]) - )) + if ( ( ( allStringsInterned || name == null ) && namespacePrefix[i] == name ) || ( !allStringsInterned + && name != null && namespacePrefixHash[i] == prefixHash && name.equals( namespacePrefix[i] ) ) ) { - final String s = name == null ? "default" : "'"+name+"'"; - throw new XmlPullParserException( - "duplicated namespace declaration for "+s+" prefix", this, null); + final String s = name == null ? "default" : "'" + name + "'"; + throw new XmlPullParserException( "duplicated namespace declaration for " + s + " prefix", this, + null ); } } ++namespaceEnd; - } else { - if(!usePC) { - attributeValue[ attributeCount ] = - new String(buf, posStart, pos - 1 - posStart); - } else { - attributeValue[ attributeCount ] = - new String(pc, pcStart, pcEnd - pcStart); + } + else + { + if ( !usePC ) + { + attributeValue[attributeCount] = new String( buf, posStart, pos - 1 - posStart ); + } + else + { + attributeValue[attributeCount] = new String( pc, pcStart, pcEnd - pcStart ); } ++attributeCount; } @@ -2147,238 +2675,352 @@ else if(xmlnsPos == 5) { return ch; } - protected char[] charRefOneCharBuf = new char[1]; + private char[] charRefOneCharBuf = new char[1]; - protected char[] parseEntityRef() + private char[] parseEntityRef() throws XmlPullParserException, IOException { // entity reference http://www.w3.org/TR/2000/REC-xml-20001006#NT-Reference - // [67] Reference ::= EntityRef | CharRef + // [67] Reference ::= EntityRef | CharRef // ASSUMPTION just after & entityRefName = null; posStart = pos; char ch = more(); - if(ch == '#') { + if ( ch == '#' ) + { // parse character reference + char charRef = 0; ch = more(); - if(ch == 'x') { - //encoded in hex - while(true) { + StringBuilder sb = new StringBuilder(); + boolean isHex = ( ch == 'x' ); + + if ( isHex ) + { + // encoded in hex + while ( true ) + { ch = more(); - if(ch >= '0' && ch <= '9') { - charRef = (char)(charRef * 16 + (ch - '0')); - } else if(ch >= 'a' && ch <= 'f') { - charRef = (char)(charRef * 16 + (ch - ('a' - 10))); - } else if(ch >= 'A' && ch <= 'F') { - charRef = (char)(charRef * 16 + (ch - ('A' - 10))); - } else if(ch == ';') { + if ( ch >= '0' && ch <= '9' ) + { + charRef = (char) ( charRef * 16 + ( ch - '0' ) ); + sb.append( ch ); + } + else if ( ch >= 'a' && ch <= 'f' ) + { + charRef = (char) ( charRef * 16 + ( ch - ( 'a' - 10 ) ) ); + sb.append( ch ); + } + else if ( ch >= 'A' && ch <= 'F' ) + { + charRef = (char) ( charRef * 16 + ( ch - ( 'A' - 10 ) ) ); + sb.append( ch ); + } + else if ( ch == ';' ) + { break; - } else { - throw new XmlPullParserException( - "character reference (with hex value) may not contain " - +printable(ch), this, null); + } + else + { + throw new XmlPullParserException( "character reference (with hex value) may not contain " + + printable( ch ), this, null ); } } - } else { + } + else + { // encoded in decimal - while(true) { - if(ch >= '0' && ch <= '9') { - charRef = (char)(charRef * 10 + (ch - '0')); - } else if(ch == ';') { + while ( true ) + { + if ( ch >= '0' && ch <= '9' ) + { + charRef = (char) ( charRef * 10 + ( ch - '0' ) ); + sb.append( ch ); + } + else if ( ch == ';' ) + { break; - } else { - throw new XmlPullParserException( - "character reference (with decimal value) may not contain " - +printable(ch), this, null); + } + else + { + throw new XmlPullParserException( "character reference (with decimal value) may not contain " + + printable( ch ), this, null ); } ch = more(); } } posEnd = pos - 1; - charRefOneCharBuf[0] = charRef; - if(tokenize) { - text = newString(charRefOneCharBuf, 0, 1); + + boolean isValidCodePoint = true; + try + { + int codePoint = Integer.parseInt( sb.toString(), isHex ? 16 : 10 ); + isValidCodePoint = isValidCodePoint( codePoint ); + if ( isValidCodePoint ) + { + charRefOneCharBuf = Character.toChars( codePoint ); + } + } + catch ( IllegalArgumentException e ) + { + isValidCodePoint = false; + } + + if ( !isValidCodePoint ) + { + throw new XmlPullParserException( "character reference (with " + ( isHex ? "hex" : "decimal" ) + + " value " + sb.toString() + ") is invalid", this, null ); + } + + if ( tokenize ) + { + text = newString( charRefOneCharBuf, 0, charRefOneCharBuf.length ); } return charRefOneCharBuf; - } else { - // [68] EntityRef ::= '&' Name ';' + } + else + { + // [68] EntityRef ::= '&' Name ';' // scan anem until ; - if(!isNameStartChar(ch)) { - throw new XmlPullParserException( - "entity reference names can not start with character '" - +printable(ch)+"'", this, null); + if ( !isNameStartChar( ch ) ) + { + throw new XmlPullParserException( "entity reference names can not start with character '" + + printable( ch ) + "'", this, null ); } - while(true) { + while ( true ) + { ch = more(); - if(ch == ';') { + if ( ch == ';' ) + { break; } - if(!isNameChar(ch)) { - throw new XmlPullParserException( - "entity reference name can not contain character " - +printable(ch)+"'", this, null); + if ( !isNameChar( ch ) ) + { + throw new XmlPullParserException( "entity reference name can not contain character " + + printable( ch ) + "'", this, null ); } } posEnd = pos - 1; // determine what name maps to final int len = posEnd - posStart; - if(len == 2 && buf[posStart] == 'l' && buf[posStart+1] == 't') { - if(tokenize) { + if ( len == 2 && buf[posStart] == 'l' && buf[posStart + 1] == 't' ) + { + if ( tokenize ) + { text = "<"; } charRefOneCharBuf[0] = '<'; return charRefOneCharBuf; - //if(paramPC || isParserTokenizing) { - // if(pcEnd >= pc.length) ensurePC(); - // pc[pcEnd++] = '<'; - //} - } else if(len == 3 && buf[posStart] == 'a' - && buf[posStart+1] == 'm' && buf[posStart+2] == 'p') { - if(tokenize) { + // if(paramPC || isParserTokenizing) { + // if(pcEnd >= pc.length) ensurePC(); + // pc[pcEnd++] = '<'; + // } + } + else if ( len == 3 && buf[posStart] == 'a' && buf[posStart + 1] == 'm' && buf[posStart + 2] == 'p' ) + { + if ( tokenize ) + { text = "&"; } charRefOneCharBuf[0] = '&'; return charRefOneCharBuf; - } else if(len == 2 && buf[posStart] == 'g' && buf[posStart+1] == 't') { - if(tokenize) { + } + else if ( len == 2 && buf[posStart] == 'g' && buf[posStart + 1] == 't' ) + { + if ( tokenize ) + { text = ">"; } charRefOneCharBuf[0] = '>'; return charRefOneCharBuf; - } else if(len == 4 && buf[posStart] == 'a' && buf[posStart+1] == 'p' - && buf[posStart+2] == 'o' && buf[posStart+3] == 's') + } + else if ( len == 4 && buf[posStart] == 'a' && buf[posStart + 1] == 'p' && buf[posStart + 2] == 'o' + && buf[posStart + 3] == 's' ) { - if(tokenize) { + if ( tokenize ) + { text = "'"; } charRefOneCharBuf[0] = '\''; return charRefOneCharBuf; - } else if(len == 4 && buf[posStart] == 'q' && buf[posStart+1] == 'u' - && buf[posStart+2] == 'o' && buf[posStart+3] == 't') + } + else if ( len == 4 && buf[posStart] == 'q' && buf[posStart + 1] == 'u' && buf[posStart + 2] == 'o' + && buf[posStart + 3] == 't' ) { - if(tokenize) { + if ( tokenize ) + { text = "\""; } charRefOneCharBuf[0] = '"'; return charRefOneCharBuf; - } else { - final char[] result = lookuEntityReplacement(len); - if(result != null) { + } + else + { + final char[] result = lookuEntityReplacement( len ); + if ( result != null ) + { return result; } } - if(tokenize) text = null; + if ( tokenize ) + text = null; return null; } } - protected char[] lookuEntityReplacement(int entitNameLen) + /** + * Check if the provided parameter is a valid Char, according to: {@link https://www.w3.org/TR/REC-xml/#NT-Char} + * + * @param codePoint the numeric value to check + * @return true if it is a valid numeric character reference. False otherwise. + */ + private static boolean isValidCodePoint( int codePoint ) + { + // Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] + return codePoint == 0x9 || codePoint == 0xA || codePoint == 0xD || ( 0x20 <= codePoint && codePoint <= 0xD7FF ) + || ( 0xE000 <= codePoint && codePoint <= 0xFFFD ) || ( 0x10000 <= codePoint && codePoint <= 0x10FFFF ); + } + + private char[] lookuEntityReplacement( int entityNameLen ) throws XmlPullParserException, IOException { - if(!allStringsInterned) { - final int hash = fastHash(buf, posStart, posEnd - posStart); - LOOP: - for (int i = entityEnd - 1; i >= 0; --i) + if ( !allStringsInterned ) + { + final int hash = fastHash( buf, posStart, posEnd - posStart ); + LOOP: for ( int i = entityEnd - 1; i >= 0; --i ) { - if(hash == entityNameHash[ i ] && entitNameLen == entityNameBuf[ i ].length) { - final char[] entityBuf = entityNameBuf[ i ]; - for (int j = 0; j < entitNameLen; j++) + if ( hash == entityNameHash[i] && entityNameLen == entityNameBuf[i].length ) + { + final char[] entityBuf = entityNameBuf[i]; + for ( int j = 0; j < entityNameLen; j++ ) { - if(buf[posStart + j] != entityBuf[j]) continue LOOP; + if ( buf[posStart + j] != entityBuf[j] ) + continue LOOP; } - if(tokenize) text = entityReplacement[ i ]; - return entityReplacementBuf[ i ]; + if ( tokenize ) + text = entityReplacement[i]; + return entityReplacementBuf[i]; } } - } else { - entityRefName = newString(buf, posStart, posEnd - posStart); - for (int i = entityEnd - 1; i >= 0; --i) + } + else + { + entityRefName = newString( buf, posStart, posEnd - posStart ); + for ( int i = entityEnd - 1; i >= 0; --i ) { - // take advantage that interning for newStirng is enforced - if(entityRefName == entityName[ i ]) { - if(tokenize) text = entityReplacement[ i ]; - return entityReplacementBuf[ i ]; + // take advantage that interning for newString is enforced + if ( entityRefName == entityName[i] ) + { + if ( tokenize ) + text = entityReplacement[i]; + return entityReplacementBuf[i]; } } } return null; } - - protected void parseComment() + private void parseComment() throws XmlPullParserException, IOException { // implements XML 1.0 Section 2.5 Comments - //ASSUMPTION: seen ch = more(); - if(seenDashDash && ch != '>') { - throw new XmlPullParserException( - "in comment after two dashes (--) next character must be >" - +" not "+printable(ch), this, null); + if ( seenDashDash && ch != '>' ) + { + throw new XmlPullParserException( "in comment after two dashes (--) next character must be >" + + " not " + printable( ch ), this, null ); } - if(ch == '-') { - if(!seenDash) { + if ( ch == '-' ) + { + if ( !seenDash ) + { seenDash = true; - } else { + } + else + { seenDashDash = true; - seenDash = false; } - } else if(ch == '>') { - if(seenDashDash) { - break; // found end sequence!!!! - } else { - seenDashDash = false; + } + else if ( ch == '>' ) + { + if ( seenDashDash ) + { + break; // found end sequence!!!! } seenDash = false; - } else { + } + else if (isValidCodePoint( ch )) + { seenDash = false; } - if(normalizeIgnorableWS) { - if(ch == '\r') { + else + { + throw new XmlPullParserException( "Illegal character 0x" + Integer.toHexString(((int) ch)) + " found in comment", this, null ); + } + if ( normalizeIgnorableWS ) + { + if ( ch == '\r' ) + { normalizedCR = true; - //posEnd = pos -1; - //joinPC(); + // posEnd = pos -1; + // joinPC(); // posEnd is alreadys set - if(!usePC) { - posEnd = pos -1; - if(posEnd > posStart) { + if ( !usePC ) + { + posEnd = pos - 1; + if ( posEnd > posStart ) + { joinPC(); - } else { + } + else + { usePC = true; pcStart = pcEnd = 0; } } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); + // assert usePC == true; + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = '\n'; - } else if(ch == '\n') { - if(!normalizedCR && usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else if ( ch == '\n' ) + { + if ( !normalizedCR && usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = '\n'; } normalizedCR = false; - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else + { + if ( usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = ch; } normalizedCR = false; @@ -2386,163 +3028,219 @@ protected void parseComment() } } - } catch(EOFException ex) { + } + catch ( EOFException ex ) + { // detect EOF and create meaningful error ... - throw new XmlPullParserException( - "comment started on line "+curLine+" and column "+curColumn+" was not closed", - this, ex); + throw new XmlPullParserException( "comment started on line " + curLine + " and column " + curColumn + + " was not closed", this, ex ); } - if(tokenize) { + if ( tokenize ) + { posEnd = pos - 3; - if(usePC) { + if ( usePC ) + { pcEnd -= 2; } } } - protected boolean parsePI() + private boolean parsePI() throws XmlPullParserException, IOException { // implements XML 1.0 Section 2.6 Processing Instructions // [16] PI ::= '' Char*)))? '?>' - // [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) - //ASSUMPTION: seen - //ch = more(); + // ch = more(); - if(ch == '?') { + if ( ch == '?' ) + { + if ( !seenPITarget ) + { + throw new XmlPullParserException( "processing instruction PITarget name not found", this, + null ); + } seenQ = true; - } else if(ch == '>') { - if(seenQ) { - break; // found end sequence!!!! + } + else if ( ch == '>' ) + { + if ( seenQ ) + { + break; // found end sequence!!!! } - seenQ = false; - } else { - if(piTargetEnd == -1 && isS(ch)) { - piTargetEnd = pos - 1 + bufAbsoluteStart; + + if ( !seenPITarget ) + { + throw new XmlPullParserException( "processing instruction PITarget name not found", this, + null ); + } + else if ( !seenInnerTag ) + { + // seenPITarget && !seenQ + throw new XmlPullParserException( "processing instruction started on line " + curLine + + " and column " + curColumn + " was not closed", this, null ); + } + } + else if ( ch == '<' ) + { + seenInnerTag = true; + } + else + { + if ( piTargetEnd == -1 && isS( ch ) ) + { + piTargetEnd = pos - 1; // [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) - if((piTargetEnd - piTargetStart) == 3) { - if((buf[piTargetStart] == 'x' || buf[piTargetStart] == 'X') - && (buf[piTargetStart+1] == 'm' || buf[piTargetStart+1] == 'M') - && (buf[piTargetStart+2] == 'l' || buf[piTargetStart+2] == 'L') - ) + if ( ( piTargetEnd - piTargetStart ) >= 3 ) + { + if ( ( buf[piTargetStart] == 'x' || buf[piTargetStart] == 'X' ) + && ( buf[piTargetStart + 1] == 'm' || buf[piTargetStart + 1] == 'M' ) + && ( buf[piTargetStart + 2] == 'l' || buf[piTargetStart + 2] == 'L' ) ) { - if(piTargetStart > 3) { // 3 ) + { // posStart) { + if ( !usePC ) + { + posEnd = pos - 1; + if ( posEnd > posStart ) + { joinPC(); - } else { + } + else + { usePC = true; pcStart = pcEnd = 0; } } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); + // assert usePC == true; + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = '\n'; - } else if(ch == '\n') { - if(!normalizedCR && usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else if ( ch == '\n' ) + { + if ( !normalizedCR && usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = '\n'; } normalizedCR = false; - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else + { + if ( usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = ch; } normalizedCR = false; } } + seenPITarget = true; ch = more(); } - } catch(EOFException ex) { + } + catch ( EOFException ex ) + { // detect EOF and create meaningful error ... - throw new XmlPullParserException( - "processing instruction started on line "+curLine+" and column "+curColumn - +" was not closed", - this, ex); + throw new XmlPullParserException( "processing instruction started on line " + curLine + " and column " + + curColumn + " was not closed", this, ex ); } - if(piTargetEnd == -1) { + if ( piTargetEnd == -1 ) + { piTargetEnd = pos - 2 + bufAbsoluteStart; - //throw new XmlPullParserException( - // "processing instruction must have PITarget name", this, null); + // throw new XmlPullParserException( + // "processing instruction must have PITarget name", this, null); } - piTargetStart -= bufAbsoluteStart; - piTargetEnd -= bufAbsoluteStart; - if(tokenize) { + if ( tokenize ) + { posEnd = pos - 2; - if(normalizeIgnorableWS) { + if ( normalizeIgnorableWS ) + { --pcEnd; } } return true; } - // protected final static char[] VERSION = {'v','e','r','s','i','o','n'}; - // protected final static char[] NCODING = {'n','c','o','d','i','n','g'}; - // protected final static char[] TANDALONE = {'t','a','n','d','a','l','o','n','e'}; - // protected final static char[] YES = {'y','e','s'}; - // protected final static char[] NO = {'n','o'}; + // protected final static char[] VERSION = {'v','e','r','s','i','o','n'}; + // protected final static char[] NCODING = {'n','c','o','d','i','n','g'}; + // protected final static char[] TANDALONE = {'t','a','n','d','a','l','o','n','e'}; + // protected final static char[] YES = {'y','e','s'}; + // protected final static char[] NO = {'n','o'}; + + private final static char[] VERSION = "version".toCharArray(); + + private final static char[] NCODING = "ncoding".toCharArray(); - protected final static char[] VERSION = "version".toCharArray(); - protected final static char[] NCODING = "ncoding".toCharArray(); - protected final static char[] TANDALONE = "tandalone".toCharArray(); - protected final static char[] YES = "yes".toCharArray(); - protected final static char[] NO = "no".toCharArray(); + private final static char[] TANDALONE = "tandalone".toCharArray(); + private final static char[] YES = "yes".toCharArray(); + private final static char[] NO = "no".toCharArray(); - protected void parseXmlDecl(char ch) + private void parseXmlDecl( char ch ) throws XmlPullParserException, IOException { // [23] XMLDecl ::= '' @@ -2555,223 +3253,281 @@ protected void parseXmlDecl(char ch) // [24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"') // parse is positioned just on first S past 'z') && (ch < 'A' || ch > 'Z') && (ch < '0' || ch > '9') - && ch != '_' && ch != '.' && ch != ':' && ch != '-') + while ( ch != quotChar ) + { + if ( ( ch < 'a' || ch > 'z' ) && ( ch < 'A' || ch > 'Z' ) && ( ch < '0' || ch > '9' ) && ch != '_' + && ch != '.' && ch != ':' && ch != '-' ) { - throw new XmlPullParserException( - "' ) + { + throw new XmlPullParserException( "unexpected character " + printable( ch ), this, null ); + } + + if ( ch == 'e' ) + { + if ( !isS( prevCh ) ) + { + throw new XmlPullParserException( "expected a space after " + lastParsedAttr + " and not " + + printable( ch ), this, null ); + } ch = more(); - ch = requireInput(ch, NCODING); - ch = skipS(ch); - if(ch != '=') { - throw new XmlPullParserException( - "expected equals sign (=) after encoding and not "+printable(ch), this, null); + ch = requireInput( ch, NCODING ); + ch = skipS( ch ); + if ( ch != '=' ) + { + throw new XmlPullParserException( "expected equals sign (=) after encoding and not " + printable( ch ), + this, null ); } ch = more(); - ch = skipS(ch); - if(ch != '\'' && ch != '"') { - throw new XmlPullParserException( - "expected apostrophe (') or quotation mark (\") after encoding and not " - +printable(ch), this, null); + ch = skipS( ch ); + if ( ch != '\'' && ch != '"' ) + { + throw new XmlPullParserException( "expected apostrophe (') or quotation mark (\") after encoding and not " + + printable( ch ), this, null ); } final char quotChar = ch; final int encodingStart = pos; ch = more(); // [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* - if((ch < 'a' || ch > 'z') && (ch < 'A' || ch > 'Z')) + if ( ( ch < 'a' || ch > 'z' ) && ( ch < 'A' || ch > 'Z' ) ) { - throw new XmlPullParserException( - " 'z') && (ch < 'A' || ch > 'Z') && (ch < '0' || ch > '9') - && ch != '.' && ch != '_' && ch != '-') + while ( ch != quotChar ) + { + if ( ( ch < 'a' || ch > 'z' ) && ( ch < 'A' || ch > 'Z' ) && ( ch < '0' || ch > '9' ) && ch != '.' + && ch != '_' && ch != '-' ) { - throw new XmlPullParserException( - " as last part of as last part of ') { - throw new XmlPullParserException( - "expected ?> as last part of ' ) + { + throw new XmlPullParserException( "expected ?> as last part of ' + // [28] doctypedecl ::= '' int bracketLevel = 0; - final boolean normalizeIgnorableWS = tokenize == true && roundtripSupported == false; + final boolean normalizeIgnorableWS = tokenize && !roundtripSupported; boolean normalizedCR = false; - while(true) { + while ( true ) + { ch = more(); - if(ch == '[') ++bracketLevel; - if(ch == ']') --bracketLevel; - if(ch == '>' && bracketLevel == 0) break; - if(normalizeIgnorableWS) { - if(ch == '\r') { + if ( ch == '[' ) + ++bracketLevel; + else if ( ch == ']' ) + --bracketLevel; + else if ( ch == '>' && bracketLevel == 0 ) + break; + else if ( ch == '&' ) + { + extractEntityRef(); + } + if ( normalizeIgnorableWS ) + { + if ( ch == '\r' ) + { normalizedCR = true; - //posEnd = pos -1; - //joinPC(); + // posEnd = pos -1; + // joinPC(); // posEnd is alreadys set - if(!usePC) { - posEnd = pos -1; - if(posEnd > posStart) { + if ( !usePC ) + { + posEnd = pos - 1; + if ( posEnd > posStart ) + { joinPC(); - } else { + } + else + { usePC = true; pcStart = pcEnd = 0; } } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); + // assert usePC == true; + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = '\n'; - } else if(ch == '\n') { - if(!normalizedCR && usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else if ( ch == '\n' ) + { + if ( !normalizedCR && usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = '\n'; } normalizedCR = false; - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else + { + if ( usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = ch; } normalizedCR = false; @@ -2782,49 +3538,99 @@ protected void parseDocdecl() posEnd = pos - 1; } - protected void parseCDSect(boolean hadCharData) + private void extractEntityRef() + throws XmlPullParserException, IOException + { + // extractEntityRef + posEnd = pos - 1; + if ( !usePC ) + { + final boolean hadCharData = posEnd > posStart; + if ( hadCharData ) + { + // posEnd is already set correctly!!! + joinPC(); + } + else + { + usePC = true; + pcStart = pcEnd = 0; + } + } + // assert usePC == true; + + final char[] resolvedEntity = parseEntityRef(); + // check if replacement text can be resolved !!! + if ( resolvedEntity == null ) + { + if ( entityRefName == null ) + { + entityRefName = newString( buf, posStart, posEnd - posStart ); + } + throw new XmlPullParserException( "could not resolve entity named '" + printable( entityRefName ) + + "'", this, null ); + } + // write into PC replacement text - do merge for replacement text!!!! + for ( char aResolvedEntity : resolvedEntity ) + { + if ( pcEnd >= pc.length ) + { + ensurePC( pcEnd ); + } + pc[pcEnd++] = aResolvedEntity; + } + } + + private void parseCDSect( boolean hadCharData ) throws XmlPullParserException, IOException { // implements XML 1.0 Section 2.7 CDATA Sections // [18] CDSect ::= CDStart CData CDEnd - // [19] CDStart ::= '' Char*)) // [21] CDEnd ::= ']]>' - //ASSUMPTION: seen posStart) { + if ( posEnd > posStart ) + { joinPC(); - } else { + } + else + { usePC = true; pcStart = pcEnd = 0; } @@ -2834,68 +3640,99 @@ protected void parseCDSect(boolean hadCharData) boolean seenBracket = false; boolean seenBracketBracket = false; boolean normalizedCR = false; - while(true) { + while ( true ) + { // scan until it hits "]]>" ch = more(); - if(ch == ']') { - if(!seenBracket) { + if ( ch == ']' ) + { + if ( !seenBracket ) + { seenBracket = true; - } else { + } + else + { seenBracketBracket = true; - //seenBracket = false; + // seenBracket = false; + } + } + else if ( ch == '>' ) + { + if ( seenBracket && seenBracketBracket ) + { + break; // found end sequence!!!! } - } else if(ch == '>') { - if(seenBracket && seenBracketBracket) { - break; // found end sequence!!!! - } else { + else + { seenBracketBracket = false; } seenBracket = false; - } else { - if(seenBracket) { + } + else + { + if ( seenBracket ) + { seenBracket = false; } } - if(normalizeInput) { + if ( normalizeInput ) + { // deal with normalization issues ... - if(ch == '\r') { + if ( ch == '\r' ) + { normalizedCR = true; posStart = cdStart - bufAbsoluteStart; posEnd = pos - 1; // posEnd is alreadys set - if(!usePC) { - if(posEnd > posStart) { + if ( !usePC ) + { + if ( posEnd > posStart ) + { joinPC(); - } else { + } + else + { usePC = true; pcStart = pcEnd = 0; } } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); + // assert usePC == true; + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = '\n'; - } else if(ch == '\n') { - if(!normalizedCR && usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else if ( ch == '\n' ) + { + if ( !normalizedCR && usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = '\n'; } normalizedCR = false; - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); + } + else + { + if ( usePC ) + { + if ( pcEnd >= pc.length ) + ensurePC( pcEnd ); pc[pcEnd++] = ch; } normalizedCR = false; } } } - } catch(EOFException ex) { + } + catch ( EOFException ex ) + { // detect EOF and create meaningful error ... - throw new XmlPullParserException( - "CDATA section started on line "+curLine+" and column "+curColumn+" was not closed", - this, ex); + throw new XmlPullParserException( "CDATA section started on line " + curLine + " and column " + curColumn + + " was not closed", this, ex ); } - if(normalizeInput) { - if(usePC) { + if ( normalizeInput ) + { + if ( usePC ) + { pcEnd = pcEnd - 2; } } @@ -2903,54 +3740,46 @@ protected void parseCDSect(boolean hadCharData) posEnd = pos - 3; } - protected void fillBuf() throws IOException, XmlPullParserException { - if(reader == null) throw new XmlPullParserException( - "reader must be set before parsing is started"); + private void fillBuf() + throws IOException, XmlPullParserException + { + if ( reader == null ) + throw new XmlPullParserException( "reader must be set before parsing is started" ); // see if we are in compaction area - if(bufEnd > bufSoftLimit) { + if ( bufEnd > bufSoftLimit ) + { - // expand buffer it makes sense!!!! - boolean compact = bufStart > bufSoftLimit; - boolean expand = false; - if(preventBufferCompaction) { - compact = false; - expand = true; - } else if(!compact) { - //freeSpace - if(bufStart < buf.length / 2) { - // less then half buffer available forcompactin --> expand instead!!! - expand = true; - } else { - // at least half of buffer can be reclaimed --> worthwhile effort!!! - compact = true; - } - } + // check if we need to compact or expand the buffer + boolean compact = !preventBufferCompaction + && ( bufStart > bufSoftLimit || bufStart >= buf.length / 2 ); // if buffer almost full then compact it - if(compact) { - //TODO: look on trashing + if ( compact ) + { + // TODO: look on trashing // //assert bufStart > 0 - System.arraycopy(buf, bufStart, buf, 0, bufEnd - bufStart); - if(TRACE_SIZING) System.out.println( - "TRACE_SIZING fillBuf() compacting "+bufStart - +" bufEnd="+bufEnd - +" pos="+pos+" posStart="+posStart+" posEnd="+posEnd - +" buf first 100 chars:"+new String(buf, bufStart, - bufEnd - bufStart < 100 ? bufEnd - bufStart : 100 )); - - } else if(expand) { + System.arraycopy( buf, bufStart, buf, 0, bufEnd - bufStart ); + if ( TRACE_SIZING ) + System.out.println( "TRACE_SIZING fillBuf() compacting " + bufStart + " bufEnd=" + bufEnd + " pos=" + + pos + " posStart=" + posStart + " posEnd=" + posEnd + " buf first 100 chars:" + + new String( buf, bufStart, Math.min(bufEnd - bufStart, 100)) ); + + } + else + { final int newSize = 2 * buf.length; - final char newBuf[] = new char[ newSize ]; - if(TRACE_SIZING) System.out.println("TRACE_SIZING fillBuf() "+buf.length+" => "+newSize); - System.arraycopy(buf, bufStart, newBuf, 0, bufEnd - bufStart); + final char[] newBuf = new char[newSize]; + if ( TRACE_SIZING ) + System.out.println( "TRACE_SIZING fillBuf() " + buf.length + " => " + newSize ); + System.arraycopy( buf, bufStart, newBuf, 0, bufEnd - bufStart ); buf = newBuf; - if(bufLoadFactor > 0) { - bufSoftLimit = ( bufLoadFactor * buf.length ) /100; + if ( bufLoadFactor > 0 ) + { + // Include a fix for https://web.archive.org/web/20070831191548/http://www.extreme.indiana.edu/bugzilla/show_bug.cgi?id=228 + bufSoftLimit = (int) ( bufferLoadFactor * buf.length ); } - } else { - throw new XmlPullParserException("internal error in fillBuffer()"); } bufEnd -= bufStart; pos -= bufStart; @@ -2958,332 +3787,363 @@ protected void fillBuf() throws IOException, XmlPullParserException { posEnd -= bufStart; bufAbsoluteStart += bufStart; bufStart = 0; - if(TRACE_SIZING) System.out.println( - "TRACE_SIZING fillBuf() after bufEnd="+bufEnd - +" pos="+pos+" posStart="+posStart+" posEnd="+posEnd - +" buf first 100 chars:"+new String(buf, 0, bufEnd < 100 ? bufEnd : 100)); - } - // at least one charcter must be read or error - final int len = buf.length - bufEnd > READ_CHUNK_SIZE ? READ_CHUNK_SIZE : buf.length - bufEnd; - final int ret = reader.read(buf, bufEnd, len); - if(ret > 0) { + if ( TRACE_SIZING ) + System.out.println( "TRACE_SIZING fillBuf() after bufEnd=" + bufEnd + " pos=" + pos + " posStart=" + + posStart + " posEnd=" + posEnd + " buf first 100 chars:" + + new String( buf, 0, Math.min(bufEnd, 100)) ); + } + // at least one character must be read or error + final int len = Math.min(buf.length - bufEnd, READ_CHUNK_SIZE); + final int ret = reader.read( buf, bufEnd, len ); + if ( ret > 0 ) + { bufEnd += ret; - if(TRACE_SIZING) System.out.println( - "TRACE_SIZING fillBuf() after filling in buffer" - +" buf first 100 chars:"+new String(buf, 0, bufEnd < 100 ? bufEnd : 100)); + if ( TRACE_SIZING ) + System.out.println( "TRACE_SIZING fillBuf() after filling in buffer" + " buf first 100 chars:" + + new String( buf, 0, Math.min(bufEnd, 100)) ); return; } - if(ret == -1) { - if(bufAbsoluteStart == 0 && pos == 0) { - throw new EOFException("input contained no data"); - } else { - if(seenRoot && depth == 0) { // inside parsing epilog!!! + if ( ret == -1 ) + { + if ( bufAbsoluteStart == 0 && pos == 0 ) + { + throw new EOFException( "input contained no data" ); + } + else + { + if ( seenRoot && depth == 0 ) + { // inside parsing epilog!!! reachedEnd = true; return; - } else { - StringBuffer expectedTagStack = new StringBuffer(); - if(depth > 0) { - //final char[] cbuf = elRawName[depth]; - //final String startname = new String(cbuf, 0, elRawNameEnd[depth]); - expectedTagStack.append(" - expected end tag"); - if(depth > 1) { - expectedTagStack.append("s"); //more than one end tag - } - expectedTagStack.append(" "); - for (int i = depth; i > 0; i--) + } + else + { + StringBuilder expectedTagStack = new StringBuilder(); + if ( depth > 0 ) + { + if ( elRawName == null || elRawName[depth] == null ) { - String tagName = new String(elRawName[i], 0, elRawNameEnd[i]); - expectedTagStack.append("'); + String tagName = new String( buf, posStart + 1, pos - posStart - 1 ); + expectedTagStack.append( " - expected the opening tag <" ).append( tagName ).append( "...>" ); } - expectedTagStack.append(" to close"); - for (int i = depth; i > 0; i--) + else { - if(i != depth) { - expectedTagStack.append(" and"); //more than one end tag + // final char[] cbuf = elRawName[depth]; + // final String startname = new String(cbuf, 0, elRawNameEnd[depth]); + expectedTagStack.append( " - expected end tag" ); + if ( depth > 1 ) + { + expectedTagStack.append( "s" ); // more than one end tag + } + expectedTagStack.append( " " ); + + for ( int i = depth; i > 0; i-- ) + { + if ( elRawName == null || elRawName[i] == null ) + { + String tagName = new String( buf, posStart + 1, pos - posStart - 1 ); + expectedTagStack.append( " - expected the opening tag <" ).append( tagName ).append( "...>" ); + } + else + { + String tagName = new String( elRawName[i], 0, elRawNameEnd[i] ); + expectedTagStack.append( "' ); + } } - String tagName = new String(elRawName[i], 0, elRawNameEnd[i]); - expectedTagStack.append(" start tag <"+tagName+">"); - expectedTagStack.append(" from line "+elRawNameLine[i]); + expectedTagStack.append( " to close" ); + for ( int i = depth; i > 0; i-- ) + { + if ( i != depth ) + { + expectedTagStack.append( " and" ); // more than one end tag + } + if ( elRawName == null || elRawName[i] == null ) + { + String tagName = new String( buf, posStart + 1, pos - posStart - 1 ); + expectedTagStack.append( " start tag <" ).append( tagName ).append( ">" ); + expectedTagStack.append( " from line " ).append( elRawNameLine[i] ); + } + else + { + String tagName = new String( elRawName[i], 0, elRawNameEnd[i] ); + expectedTagStack.append( " start tag <" ).append( tagName ).append( ">" ); + expectedTagStack.append( " from line " ).append( elRawNameLine[i] ); + } + } + expectedTagStack.append( ", parser stopped on" ); } - expectedTagStack.append(", parser stopped on"); } - throw new EOFException("no more data available" - +expectedTagStack.toString()+getPositionDescription()); + throw new EOFException( "no more data available" + expectedTagStack.toString() + + getPositionDescription() ); } } - } else { - throw new IOException("error reading input, returned "+ret); + } + else + { + throw new IOException( "error reading input, returned " + ret ); } } - protected char more() throws IOException, XmlPullParserException { - if(pos >= bufEnd) { + private char more() + throws IOException, XmlPullParserException + { + if ( pos >= bufEnd ) + { fillBuf(); - // this return value should be ignonored as it is used in epilog parsing ... - if(reachedEnd) return (char)-1; + // this return value should be ignored as it is used in epilog parsing ... + if ( reachedEnd ) + return (char) -1; } final char ch = buf[pos++]; - //line/columnNumber - if(ch == '\n') { ++lineNumber; columnNumber = 1; } - else { ++columnNumber; } - //System.out.print(ch); + // line/columnNumber + if ( ch == '\n' ) + { + ++lineNumber; + columnNumber = 1; + } + else + { + ++columnNumber; + } + // System.out.print(ch); return ch; } - // /** - // * This function returns position of parser in XML input stream - // * (how many characters were processed. - // *

                NOTE: this logical position and not byte offset as encodings - // * such as UTF8 may use more than one byte to encode one character. - // */ - // public int getCurrentInputPosition() { - // return pos + bufAbsoluteStart; - // } - - protected void ensurePC(int end) { - //assert end >= pc.length; + // /** + // * This function returns position of parser in XML input stream + // * (how many characters were processed. + // *

                NOTE: this logical position and not byte offset as encodings + // * such as UTF8 may use more than one byte to encode one character. + // */ + // public int getCurrentInputPosition() { + // return pos + bufAbsoluteStart; + // } + + private void ensurePC( int end ) + { + // assert end >= pc.length; final int newSize = end > READ_CHUNK_SIZE ? 2 * end : 2 * READ_CHUNK_SIZE; - final char[] newPC = new char[ newSize ]; - if(TRACE_SIZING) System.out.println("TRACE_SIZING ensurePC() "+pc.length+" ==> "+newSize+" end="+end); - System.arraycopy(pc, 0, newPC, 0, pcEnd); + final char[] newPC = new char[newSize]; + if ( TRACE_SIZING ) + System.out.println( "TRACE_SIZING ensurePC() " + pc.length + " ==> " + newSize + " end=" + end ); + System.arraycopy( pc, 0, newPC, 0, pcEnd ); pc = newPC; - //assert end < pc.length; + // assert end < pc.length; } - protected void joinPC() { - //assert usePC == false; - //assert posEnd > posStart; + private void joinPC() + { + // assert usePC == false; + // assert posEnd > posStart; final int len = posEnd - posStart; final int newEnd = pcEnd + len + 1; - if(newEnd >= pc.length) ensurePC(newEnd); // add 1 for extra space for one char - //assert newEnd < pc.length; - System.arraycopy(buf, posStart, pc, pcEnd, len); + if ( newEnd >= pc.length ) + ensurePC( newEnd ); // add 1 for extra space for one char + // assert newEnd < pc.length; + System.arraycopy( buf, posStart, pc, pcEnd, len ); pcEnd += len; usePC = true; } - protected char requireInput(char ch, char[] input) + private char requireInput( char ch, char[] input ) throws XmlPullParserException, IOException { - for (int i = 0; i < input.length; i++) + for ( char anInput : input ) { - if(ch != input[i]) { - throw new XmlPullParserException( - "expected "+printable(input[i])+" in "+new String(input) - +" and not "+printable(ch), this, null); + if ( ch != anInput ) + { + throw new XmlPullParserException( "expected " + printable( anInput ) + " in " + new String( input ) + + " and not " + printable( ch ), this, null ); } ch = more(); } return ch; } - protected char requireNextS() - throws XmlPullParserException, IOException - { - final char ch = more(); - if(!isS(ch)) { - throw new XmlPullParserException( - "white space is required and not "+printable(ch), this, null); - } - return skipS(ch); - } - - protected char skipS(char ch) + private char skipS( char ch ) throws XmlPullParserException, IOException { - while(isS(ch)) { ch = more(); } // skip additional spaces + while ( isS( ch ) ) + { + ch = more(); + } // skip additional spaces return ch; } // nameStart / name lookup tables based on XML 1.1 http://www.w3.org/TR/2001/WD-xml11-20011213/ - protected static final int LOOKUP_MAX = 0x400; - protected static final char LOOKUP_MAX_CHAR = (char)LOOKUP_MAX; - // protected static int lookupNameStartChar[] = new int[ LOOKUP_MAX_CHAR / 32 ]; - // protected static int lookupNameChar[] = new int[ LOOKUP_MAX_CHAR / 32 ]; - protected static boolean lookupNameStartChar[] = new boolean[ LOOKUP_MAX ]; - protected static boolean lookupNameChar[] = new boolean[ LOOKUP_MAX ]; - - private static final void setName(char ch) - //{ lookupNameChar[ (int)ch / 32 ] |= (1 << (ch % 32)); } - { lookupNameChar[ ch ] = true; } - private static final void setNameStart(char ch) - //{ lookupNameStartChar[ (int)ch / 32 ] |= (1 << (ch % 32)); setName(ch); } - { lookupNameStartChar[ ch ] = true; setName(ch); } - - static { - setNameStart(':'); - for (char ch = 'A'; ch <= 'Z'; ++ch) setNameStart(ch); - setNameStart('_'); - for (char ch = 'a'; ch <= 'z'; ++ch) setNameStart(ch); - for (char ch = '\u00c0'; ch <= '\u02FF'; ++ch) setNameStart(ch); - for (char ch = '\u0370'; ch <= '\u037d'; ++ch) setNameStart(ch); - for (char ch = '\u037f'; ch < '\u0400'; ++ch) setNameStart(ch); - - setName('-'); - setName('.'); - for (char ch = '0'; ch <= '9'; ++ch) setName(ch); - setName('\u00b7'); - for (char ch = '\u0300'; ch <= '\u036f'; ++ch) setName(ch); - } - - //private final static boolean isNameStartChar(char ch) { - protected boolean isNameStartChar(char ch) { - return (ch < LOOKUP_MAX_CHAR && lookupNameStartChar[ ch ]) - || (ch >= LOOKUP_MAX_CHAR && ch <= '\u2027') - || (ch >= '\u202A' && ch <= '\u218F') - || (ch >= '\u2800' && ch <= '\uFFEF') - ; - - // if(ch < LOOKUP_MAX_CHAR) return lookupNameStartChar[ ch ]; - // else return ch <= '\u2027' - // || (ch >= '\u202A' && ch <= '\u218F') - // || (ch >= '\u2800' && ch <= '\uFFEF') - // ; - //return false; - // return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == ':' - // || (ch >= '0' && ch <= '9'); - // if(ch < LOOKUP_MAX_CHAR) return (lookupNameStartChar[ (int)ch / 32 ] & (1 << (ch % 32))) != 0; - // if(ch <= '\u2027') return true; - // //[#x202A-#x218F] - // if(ch < '\u202A') return false; - // if(ch <= '\u218F') return true; - // // added pairts [#x2800-#xD7FF] | [#xE000-#xFDCF] | [#xFDE0-#xFFEF] | [#x10000-#x10FFFF] - // if(ch < '\u2800') return false; - // if(ch <= '\uFFEF') return true; - // return false; + private static final int LOOKUP_MAX = 0x400; + private static final char LOOKUP_MAX_CHAR = (char) LOOKUP_MAX; - // else return (supportXml11 && ( (ch < '\u2027') || (ch > '\u2029' && ch < '\u2200') ... + // private static int lookupNameStartChar[] = new int[ LOOKUP_MAX_CHAR / 32 ]; + // private static int lookupNameChar[] = new int[ LOOKUP_MAX_CHAR / 32 ]; + private static final boolean[] lookupNameStartChar = new boolean[LOOKUP_MAX]; + + private static final boolean[] lookupNameChar = new boolean[LOOKUP_MAX]; + + private static void setName( char ch ) + // { lookupNameChar[ (int)ch / 32 ] |= (1 << (ch % 32)); } + { + lookupNameChar[ch] = true; } - //private final static boolean isNameChar(char ch) { - protected boolean isNameChar(char ch) { - //return isNameStartChar(ch); + private static void setNameStart( char ch ) + // { lookupNameStartChar[ (int)ch / 32 ] |= (1 << (ch % 32)); setName(ch); } + { + lookupNameStartChar[ch] = true; + setName( ch ); + } - // if(ch < LOOKUP_MAX_CHAR) return (lookupNameChar[ (int)ch / 32 ] & (1 << (ch % 32))) != 0; + static + { + setNameStart( ':' ); + for ( char ch = 'A'; ch <= 'Z'; ++ch ) + setNameStart( ch ); + setNameStart( '_' ); + for ( char ch = 'a'; ch <= 'z'; ++ch ) + setNameStart( ch ); + for ( char ch = '\u00c0'; ch <= '\u02FF'; ++ch ) + setNameStart( ch ); + for ( char ch = '\u0370'; ch <= '\u037d'; ++ch ) + setNameStart( ch ); + for ( char ch = '\u037f'; ch < '\u0400'; ++ch ) + setNameStart( ch ); + + setName( '-' ); + setName( '.' ); + for ( char ch = '0'; ch <= '9'; ++ch ) + setName( ch ); + setName( '\u00b7' ); + for ( char ch = '\u0300'; ch <= '\u036f'; ++ch ) + setName( ch ); + } - return (ch < LOOKUP_MAX_CHAR && lookupNameChar[ ch ]) - || (ch >= LOOKUP_MAX_CHAR && ch <= '\u2027') - || (ch >= '\u202A' && ch <= '\u218F') - || (ch >= '\u2800' && ch <= '\uFFEF') - ; - //return false; - // return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == ':' - // || (ch >= '0' && ch <= '9'); - // if(ch < LOOKUP_MAX_CHAR) return (lookupNameStartChar[ (int)ch / 32 ] & (1 << (ch % 32))) != 0; + // protected boolean isNameStartChar( char ch ) + private static boolean isNameStartChar( char ch ) + { + return ch < LOOKUP_MAX_CHAR ? lookupNameStartChar[ch] : ( ch <= '\u2027' ) + || ( ch >= '\u202A' && ch <= '\u218F' ) || ( ch >= '\u2800' && ch <= '\uFFEF' ); + + // if(ch < LOOKUP_MAX_CHAR) return lookupNameStartChar[ ch ]; + // else return ch <= '\u2027' + // || (ch >= '\u202A' && ch <= '\u218F') + // || (ch >= '\u2800' && ch <= '\uFFEF') + // ; + // return false; + // return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == ':' + // || (ch >= '0' && ch <= '9'); + // if(ch < LOOKUP_MAX_CHAR) return (lookupNameStartChar[ (int)ch / 32 ] & (1 << (ch % 32))) != 0; + // if(ch <= '\u2027') return true; + // //[#x202A-#x218F] + // if(ch < '\u202A') return false; + // if(ch <= '\u218F') return true; + // // added parts [#x2800-#xD7FF] | [#xE000-#xFDCF] | [#xFDE0-#xFFEF] | [#x10000-#x10FFFF] + // if(ch < '\u2800') return false; + // if(ch <= '\uFFEF') return true; + // return false; - //else return - // else if(ch <= '\u2027') return true; - // //[#x202A-#x218F] - // else if(ch < '\u202A') return false; - // else if(ch <= '\u218F') return true; - // // added pairts [#x2800-#xD7FF] | [#xE000-#xFDCF] | [#xFDE0-#xFFEF] | [#x10000-#x10FFFF] - // else if(ch < '\u2800') return false; - // else if(ch <= '\uFFEF') return true; - //else return false; + // else return (supportXml11 && ( (ch < '\u2027') || (ch > '\u2029' && ch < '\u2200') ... } - protected boolean isS(char ch) { - return (ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t'); - // || (supportXml11 && (ch == '\u0085' || ch == '\u2028'); + // protected boolean isNameChar( char ch ) + private static boolean isNameChar( char ch ) + { + // return isNameStartChar(ch); + + // if(ch < LOOKUP_MAX_CHAR) return (lookupNameChar[ (int)ch / 32 ] & (1 << (ch % 32))) != 0; + + return ch < LOOKUP_MAX_CHAR ? lookupNameChar[ch] : ( ch <= '\u2027' ) + || ( ch >= '\u202A' && ch <= '\u218F' ) || ( ch >= '\u2800' && ch <= '\uFFEF' ); + // return false; + // return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == ':' + // || (ch >= '0' && ch <= '9'); + // if(ch < LOOKUP_MAX_CHAR) return (lookupNameStartChar[ (int)ch / 32 ] & (1 << (ch % 32))) != 0; + + // else return + // else if(ch <= '\u2027') return true; + // //[#x202A-#x218F] + // else if(ch < '\u202A') return false; + // else if(ch <= '\u218F') return true; + // // added parts [#x2800-#xD7FF] | [#xE000-#xFDCF] | [#xFDE0-#xFFEF] | [#x10000-#x10FFFF] + // else if(ch < '\u2800') return false; + // else if(ch <= '\uFFEF') return true; + // else return false; } - //protected boolean isChar(char ch) { return (ch < '\uD800' || ch > '\uDFFF') - // ch != '\u0000' ch < '\uFFFE' + private static boolean isS( char ch ) + { + return ( ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t' ); + // || (supportXml11 && (ch == '\u0085' || ch == '\u2028'); + } + // protected boolean isChar(char ch) { return (ch < '\uD800' || ch > '\uDFFF') + // ch != '\u0000' ch < '\uFFFE' - //protected char printable(char ch) { return ch; } - protected String printable(char ch) { - if(ch == '\n') { + // private char printable(char ch) { return ch; } + private static String printable( char ch ) + { + if ( ch == '\n' ) + { return "\\n"; - } else if(ch == '\r') { + } + else if ( ch == '\r' ) + { return "\\r"; - } else if(ch == '\t') { + } + else if ( ch == '\t' ) + { return "\\t"; - } else if(ch == '\'') { + } + else if ( ch == '\'' ) + { return "\\'"; - } if(ch > 127 || ch < 32) { - return "\\u"+Integer.toHexString((int)ch); } - return ""+ch; + if ( ch > 127 || ch < 32 ) + { + return "\\u" + Integer.toHexString( ch ); + } + return "" + ch; } - protected String printable(String s) { - if(s == null) return null; + private static String printable( String s ) + { + if ( s == null ) + return null; final int sLen = s.length(); - StringBuffer buf = new StringBuffer(sLen + 10); - for(int i = 0; i < sLen; ++i) { - buf.append(printable(s.charAt(i))); + StringBuilder buf = new StringBuilder( sLen + 10 ); + for ( int i = 0; i < sLen; ++i ) + { + buf.append( printable( s.charAt( i ) ) ); } s = buf.toString(); return s; } -} +} /* - * Indiana University Extreme! Lab Software License, Version 1.2 - * - * Copyright (C) 2003 The Trustees of Indiana University. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1) All redistributions of source code must retain the above - * copyright notice, the list of authors in the original source - * code, this list of conditions and the disclaimer listed in this - * license; - * - * 2) All redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the disclaimer - * listed in this license in the documentation and/or other - * materials provided with the distribution; - * - * 3) Any documentation included with all redistributions must include - * the following acknowledgement: - * - * "This product includes software developed by the Indiana - * University Extreme! Lab. For further information please visit - * http://www.extreme.indiana.edu/" - * - * Alternatively, this acknowledgment may appear in the software - * itself, and wherever such third-party acknowledgments normally - * appear. - * - * 4) The name "Indiana University" or "Indiana University - * Extreme! Lab" shall not be used to endorse or promote - * products derived from this software without prior written - * permission from Indiana University. For written permission, - * please contact http://www.extreme.indiana.edu/. - * - * 5) Products derived from this software may not use "Indiana - * University" name nor may "Indiana University" appear in their name, - * without prior written permission of the Indiana University. - * - * Indiana University provides no reassurances that the source code - * provided does not infringe the patent or any other intellectual - * property rights of any other entity. Indiana University disclaims any - * liability to any recipient for claims brought by any other entity - * based on infringement of intellectual property rights or otherwise. - * - * LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH - * NO WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA - * UNIVERSITY GIVES NO WARRANTIES AND MAKES NO REPRESENTATION THAT - * SOFTWARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR - * OTHER PROPRIETARY RIGHTS. INDIANA UNIVERSITY MAKES NO WARRANTIES THAT - * SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", "TRAP - * DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE - * RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS, - * AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING - * SOFTWARE. + * Indiana University Extreme! Lab Software License, Version 1.2 Copyright (C) 2003 The Trustees of Indiana University. + * All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted + * provided that the following conditions are met: 1) All redistributions of source code must retain the above copyright + * notice, the list of authors in the original source code, this list of conditions and the disclaimer listed in this + * license; 2) All redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the disclaimer listed in this license in the documentation and/or other materials provided with the distribution; 3) + * Any documentation included with all redistributions must include the following acknowledgement: "This product + * includes software developed by the Indiana University Extreme! Lab. For further information please visit + * http://www.extreme.indiana.edu/" Alternatively, this acknowledgment may appear in the software itself, and wherever + * such third-party acknowledgments normally appear. 4) The name "Indiana University" or "Indiana University Extreme! + * Lab" shall not be used to endorse or promote products derived from this software without prior written permission + * from Indiana University. For written permission, please contact http://www.extreme.indiana.edu/. 5) Products derived + * from this software may not use "Indiana University" name nor may "Indiana University" appear in their name, without + * prior written permission of the Indiana University. Indiana University provides no reassurances that the source code + * provided does not infringe the patent or any other intellectual property rights of any other entity. Indiana + * University disclaims any liability to any recipient for claims brought by any other entity based on infringement of + * intellectual property rights or otherwise. LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH NO + * WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA UNIVERSITY GIVES NO WARRANTIES AND MAKES NO + * REPRESENTATION THAT SOFTWARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR OTHER PROPRIETARY RIGHTS. + * INDIANA UNIVERSITY MAKES NO WARRANTIES THAT SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", "TRAP + * DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR + * ASSOCIATED MATERIALS, AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING SOFTWARE. */ - - - - - - diff --git a/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java b/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java index 29d6b8a5..cd1edc59 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java +++ b/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java @@ -9,44 +9,55 @@ import java.io.Writer; /** - * Implementation of XmlSerializer interface from XmlPull V1 API. - * This implementation is optimized for performance and low memory footprint. - * - *

                Implemented features:

                  - *
                • FEATURE_NAMES_INTERNED - when enabled all returned names - * (namespaces, prefixes) will be interned and it is required that - * all names passed as arguments MUST be interned - *
                • FEATURE_SERIALIZER_ATTVALUE_USE_APOSTROPHE - *
                - *

                Implemented properties:

                  - *
                • PROPERTY_SERIALIZER_INDENTATION - *
                • PROPERTY_SERIALIZER_LINE_SEPARATOR - *
                - * + * Implementation of XmlSerializer interface from XmlPull V1 API. This implementation is optimized for performance and + * low memory footprint. + *

                + * Implemented features: + *

                  + *
                • FEATURE_NAMES_INTERNED - when enabled all returned names (namespaces, prefixes) will be interned and it is + * required that all names passed as arguments MUST be interned + *
                • FEATURE_SERIALIZER_ATTVALUE_USE_APOSTROPHE + *
                + *

                + * Implemented properties: + *

                  + *
                • PROPERTY_SERIALIZER_INDENTATION + *
                • PROPERTY_SERIALIZER_LINE_SEPARATOR + *
                */ -public class MXSerializer implements XmlSerializer { +public class MXSerializer + implements XmlSerializer +{ protected final static String XML_URI = "http://www.w3.org/XML/1998/namespace"; + protected final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/"; + private static final boolean TRACE_SIZING = false; protected final String FEATURE_SERIALIZER_ATTVALUE_USE_APOSTROPHE = "http://xmlpull.org/v1/doc/features.html#serializer-attvalue-use-apostrophe"; - protected final String FEATURE_NAMES_INTERNED = - "http://xmlpull.org/v1/doc/features.html#names-interned"; + + protected final String FEATURE_NAMES_INTERNED = "http://xmlpull.org/v1/doc/features.html#names-interned"; + protected final String PROPERTY_SERIALIZER_INDENTATION = "http://xmlpull.org/v1/doc/properties.html#serializer-indentation"; + protected final String PROPERTY_SERIALIZER_LINE_SEPARATOR = "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator"; - protected final static String PROPERTY_LOCATION = - "http://xmlpull.org/v1/doc/properties.html#location"; + + protected final static String PROPERTY_LOCATION = "http://xmlpull.org/v1/doc/properties.html#location"; // properties/features protected boolean namesInterned; + protected boolean attributeUseApostrophe; - protected String indentationString = null; //" "; + + protected String indentationString = null; // " "; + protected String lineSeparator = "\n"; protected String location; + protected Writer out; protected int autoDeclaredPrefixes; @@ -54,290 +65,353 @@ public class MXSerializer implements XmlSerializer { protected int depth = 0; // element stack - protected String elNamespace[] = new String[ 2 ]; - protected String elName[] = new String[ elNamespace.length ]; - protected int elNamespaceCount[] = new int[ elNamespace.length ]; + protected String elNamespace[] = new String[2]; + + protected String elName[] = new String[elNamespace.length]; + + protected int elNamespaceCount[] = new int[elNamespace.length]; - //namespace stack + // namespace stack protected int namespaceEnd = 0; - protected String namespacePrefix[] = new String[ 8 ]; - protected String namespaceUri[] = new String[ namespacePrefix.length ]; + + protected String namespacePrefix[] = new String[8]; + + protected String namespaceUri[] = new String[namespacePrefix.length]; protected boolean finished; + protected boolean pastRoot; + protected boolean setPrefixCalled; + protected boolean startTagIncomplete; protected boolean doIndent; + protected boolean seenTag; protected boolean seenBracket; + protected boolean seenBracketBracket; // buffer output if needed to write escaped String see text(String) - private static final int BUF_LEN = Runtime.getRuntime().freeMemory() > 1000000L ? 8*1024 : 256; - protected char buf[] = new char[ BUF_LEN ]; + private static final int BUF_LEN = Runtime.getRuntime().freeMemory() > 1000000L ? 8 * 1024 : 256; + protected char buf[] = new char[BUF_LEN]; protected static final String precomputedPrefixes[]; - static { - precomputedPrefixes = new String[32]; //arbitrary number ... - for (int i = 0; i < precomputedPrefixes.length; i++) + static + { + precomputedPrefixes = new String[32]; // arbitrary number ... + for ( int i = 0; i < precomputedPrefixes.length; i++ ) { - precomputedPrefixes[i] = ("n"+i).intern(); + precomputedPrefixes[i] = ( "n" + i ).intern(); } } private boolean checkNamesInterned = false; - private void checkInterning(String name) { - if(namesInterned && name != name.intern()) { - throw new IllegalArgumentException( - "all names passed as arguments must be interned" - +"when NAMES INTERNED feature is enabled"); + private void checkInterning( String name ) + { + if ( namesInterned && name != name.intern() ) + { + throw new IllegalArgumentException( "all names passed as arguments must be interned" + + "when NAMES INTERNED feature is enabled" ); } } - protected void reset() { + protected void reset() + { location = null; out = null; autoDeclaredPrefixes = 0; depth = 0; // nullify references on all levels to allow it to be GCed - for (int i = 0; i < elNamespaceCount.length; i++) + for ( int i = 0; i < elNamespaceCount.length; i++ ) { - elName[ i ] = null; - elNamespace[ i ] = null; - elNamespaceCount[ i ] = 2; + elName[i] = null; + elNamespace[i] = null; + elNamespaceCount[i] = 2; } - namespaceEnd = 0; - - //NOTE: no need to intern() as all literal strings and string-valued constant expressions - //are interned. String literals are defined in 3.10.5 of the Java Language Specification + // NOTE: no need to intern() as all literal strings and string-valued constant expressions + // are interned. String literals are defined in 3.10.5 of the Java Language Specification // just checking ... - //assert "xmlns" == "xmlns".intern(); - //assert XMLNS_URI == XMLNS_URI.intern(); + // assert "xmlns" == "xmlns".intern(); + // assert XMLNS_URI == XMLNS_URI.intern(); - //TODO: how to prevent from reporting this namespace? + // TODO: how to prevent from reporting this namespace? // this is special namespace declared for consistency with XML infoset - namespacePrefix[ namespaceEnd ] = "xmlns"; - namespaceUri[ namespaceEnd ] = XMLNS_URI; + namespacePrefix[namespaceEnd] = "xmlns"; + namespaceUri[namespaceEnd] = XMLNS_URI; ++namespaceEnd; - namespacePrefix[ namespaceEnd ] = "xml"; - namespaceUri[ namespaceEnd ] = XML_URI; + namespacePrefix[namespaceEnd] = "xml"; + namespaceUri[namespaceEnd] = XML_URI; ++namespaceEnd; finished = false; pastRoot = false; setPrefixCalled = false; startTagIncomplete = false; - //doIntent is not changed + // doIntent is not changed seenTag = false; seenBracket = false; seenBracketBracket = false; } - - protected void ensureElementsCapacity() { + protected void ensureElementsCapacity() + { final int elStackSize = elName.length; - //assert (depth + 1) >= elName.length; + // assert (depth + 1) >= elName.length; // we add at least one extra slot ... - final int newSize = (depth >= 7 ? 2 * depth : 8) + 2; // = lucky 7 + 1 //25 - if(TRACE_SIZING) { - System.err.println( - getClass().getName()+" elStackSize "+elStackSize+" ==> "+newSize); + final int newSize = ( depth >= 7 ? 2 * depth : 8 ) + 2; // = lucky 7 + 1 //25 + if ( TRACE_SIZING ) + { + System.err.println( getClass().getName() + " elStackSize " + elStackSize + " ==> " + newSize ); } final boolean needsCopying = elStackSize > 0; String[] arr = null; // reuse arr local variable slot arr = new String[newSize]; - if(needsCopying) System.arraycopy(elName, 0, arr, 0, elStackSize); + if ( needsCopying ) + System.arraycopy( elName, 0, arr, 0, elStackSize ); elName = arr; arr = new String[newSize]; - if(needsCopying) System.arraycopy(elNamespace, 0, arr, 0, elStackSize); + if ( needsCopying ) + System.arraycopy( elNamespace, 0, arr, 0, elStackSize ); elNamespace = arr; final int[] iarr = new int[newSize]; - if(needsCopying) { - System.arraycopy(elNamespaceCount, 0, iarr, 0, elStackSize); - } else { + if ( needsCopying ) + { + System.arraycopy( elNamespaceCount, 0, iarr, 0, elStackSize ); + } + else + { // special initialization iarr[0] = 0; } elNamespaceCount = iarr; } - protected void ensureNamespacesCapacity() { //int size) { - //int namespaceSize = namespacePrefix != null ? namespacePrefix.length : 0; - //assert (namespaceEnd >= namespacePrefix.length); + protected void ensureNamespacesCapacity() + { // int size) { + // int namespaceSize = namespacePrefix != null ? namespacePrefix.length : 0; + // assert (namespaceEnd >= namespacePrefix.length); - //if(size >= namespaceSize) { - //int newSize = size > 7 ? 2 * size : 8; // = lucky 7 + 1 //25 + // if(size >= namespaceSize) { + // int newSize = size > 7 ? 2 * size : 8; // = lucky 7 + 1 //25 final int newSize = namespaceEnd > 7 ? 2 * namespaceEnd : 8; - if(TRACE_SIZING) { - System.err.println( - getClass().getName()+" namespaceSize "+namespacePrefix.length+" ==> "+newSize); + if ( TRACE_SIZING ) + { + System.err.println( getClass().getName() + " namespaceSize " + namespacePrefix.length + " ==> " + newSize ); } final String[] newNamespacePrefix = new String[newSize]; final String[] newNamespaceUri = new String[newSize]; - if(namespacePrefix != null) { - System.arraycopy( - namespacePrefix, 0, newNamespacePrefix, 0, namespaceEnd); - System.arraycopy( - namespaceUri, 0, newNamespaceUri, 0, namespaceEnd); + if ( namespacePrefix != null ) + { + System.arraycopy( namespacePrefix, 0, newNamespacePrefix, 0, namespaceEnd ); + System.arraycopy( namespaceUri, 0, newNamespaceUri, 0, namespaceEnd ); } namespacePrefix = newNamespacePrefix; namespaceUri = newNamespaceUri; // TODO use hashes for quick namespace->prefix lookups - // if( ! allStringsInterned ) { - // int[] newNamespacePrefixHash = new int[newSize]; - // if(namespacePrefixHash != null) { - // System.arraycopy( - // namespacePrefixHash, 0, newNamespacePrefixHash, 0, namespaceEnd); - // } - // namespacePrefixHash = newNamespacePrefixHash; - // } - //prefixesSize = newSize; + // if( ! allStringsInterned ) { + // int[] newNamespacePrefixHash = new int[newSize]; + // if(namespacePrefixHash != null) { + // System.arraycopy( + // namespacePrefixHash, 0, newNamespacePrefixHash, 0, namespaceEnd); + // } + // namespacePrefixHash = newNamespacePrefixHash; + // } + // prefixesSize = newSize; // ////assert nsPrefixes.length > size && nsPrefixes.length == newSize - //} + // } } - - public void setFeature(String name, - boolean state) throws IllegalArgumentException, IllegalStateException + @Override + public void setFeature( String name, boolean state ) + throws IllegalArgumentException, IllegalStateException { - if(name == null) { - throw new IllegalArgumentException("feature name can not be null"); + if ( name == null ) + { + throw new IllegalArgumentException( "feature name can not be null" ); } - if(FEATURE_NAMES_INTERNED.equals(name)) { + if ( FEATURE_NAMES_INTERNED.equals( name ) ) + { namesInterned = state; - } else if(FEATURE_SERIALIZER_ATTVALUE_USE_APOSTROPHE.equals(name)) { + } + else if ( FEATURE_SERIALIZER_ATTVALUE_USE_APOSTROPHE.equals( name ) ) + { attributeUseApostrophe = state; - } else { - throw new IllegalStateException("unsupported feature "+name); + } + else + { + throw new IllegalStateException( "unsupported feature " + name ); } } - public boolean getFeature(String name) throws IllegalArgumentException + @Override + public boolean getFeature( String name ) + throws IllegalArgumentException { - if(name == null) { - throw new IllegalArgumentException("feature name can not be null"); + if ( name == null ) + { + throw new IllegalArgumentException( "feature name can not be null" ); } - if(FEATURE_NAMES_INTERNED.equals(name)) { + if ( FEATURE_NAMES_INTERNED.equals( name ) ) + { return namesInterned; - } else if(FEATURE_SERIALIZER_ATTVALUE_USE_APOSTROPHE.equals(name)) { + } + else if ( FEATURE_SERIALIZER_ATTVALUE_USE_APOSTROPHE.equals( name ) ) + { return attributeUseApostrophe; - } else { + } + else + { return false; } } // precomputed variables to simplify writing indentation protected int offsetNewLine; + protected int indentationJump; + protected char[] indentationBuf; + protected int maxIndentLevel; - protected boolean writeLineSepartor; //should end-of-line be written + + protected boolean writeLineSeparator; // should end-of-line be written + protected boolean writeIndentation; // is indentation used? /** - * For maximum efficiency when writing indents the required output is pre-computed - * This is internal function that recomputes buffer after user requested chnages. + * For maximum efficiency when writing indents the required output is pre-computed This is internal function that + * recomputes buffer after user requested changes. */ - protected void rebuildIndentationBuf() { - if(doIndent == false) return; - final int maxIndent = 65; //hardcoded maximum indentation size in characters + protected void rebuildIndentationBuf() + { + if ( doIndent == false ) + return; + final int maxIndent = 65; // hardcoded maximum indentation size in characters int bufSize = 0; offsetNewLine = 0; - if(writeLineSepartor) { + if ( writeLineSeparator ) + { offsetNewLine = lineSeparator.length(); bufSize += offsetNewLine; } maxIndentLevel = 0; - if(writeIndentation) { + if ( writeIndentation ) + { indentationJump = indentationString.length(); maxIndentLevel = maxIndent / indentationJump; bufSize += maxIndentLevel * indentationJump; } - if(indentationBuf == null || indentationBuf.length < bufSize) { + if ( indentationBuf == null || indentationBuf.length < bufSize ) + { indentationBuf = new char[bufSize + 8]; } int bufPos = 0; - if(writeLineSepartor) { - for (int i = 0; i < lineSeparator.length(); i++) + if ( writeLineSeparator ) + { + for ( int i = 0; i < lineSeparator.length(); i++ ) { - indentationBuf[ bufPos++ ] = lineSeparator.charAt(i); + indentationBuf[bufPos++] = lineSeparator.charAt( i ); } } - if(writeIndentation) { - for (int i = 0; i < maxIndentLevel; i++) + if ( writeIndentation ) + { + for ( int i = 0; i < maxIndentLevel; i++ ) { - for (int j = 0; j < indentationString.length(); j++) + for ( int j = 0; j < indentationString.length(); j++ ) { - indentationBuf[ bufPos++ ] = indentationString.charAt(j); + indentationBuf[bufPos++] = indentationString.charAt( j ); } } } } // if(doIndent) writeIndent(); - protected void writeIndent() throws IOException { - final int start = writeLineSepartor ? 0 : offsetNewLine; - final int level = (depth > maxIndentLevel) ? maxIndentLevel : depth; - out.write( indentationBuf, start, (level * indentationJump) + offsetNewLine); + protected void writeIndent() + throws IOException + { + final int start = writeLineSeparator ? 0 : offsetNewLine; + final int level = ( depth > maxIndentLevel ) ? maxIndentLevel : depth; + out.write( indentationBuf, start, ( level * indentationJump ) + offsetNewLine ); } - public void setProperty(String name, - Object value) throws IllegalArgumentException, IllegalStateException + @Override + public void setProperty( String name, Object value ) + throws IllegalArgumentException, IllegalStateException { - if(name == null) { - throw new IllegalArgumentException("property name can not be null"); - } - if(PROPERTY_SERIALIZER_INDENTATION.equals(name)) { - indentationString = (String)value; - } else if(PROPERTY_SERIALIZER_LINE_SEPARATOR.equals(name)) { - lineSeparator = (String)value; - } else if(PROPERTY_LOCATION.equals(name)) { + if ( name == null ) + { + throw new IllegalArgumentException( "property name can not be null" ); + } + if ( PROPERTY_SERIALIZER_INDENTATION.equals( name ) ) + { + indentationString = (String) value; + } + else if ( PROPERTY_SERIALIZER_LINE_SEPARATOR.equals( name ) ) + { + lineSeparator = (String) value; + } + else if ( PROPERTY_LOCATION.equals( name ) ) + { location = (String) value; - } else { - throw new IllegalStateException("unsupported property "+name); } - writeLineSepartor = lineSeparator != null && lineSeparator.length() > 0; + else + { + throw new IllegalStateException( "unsupported property " + name ); + } + writeLineSeparator = lineSeparator != null && lineSeparator.length() > 0; writeIndentation = indentationString != null && indentationString.length() > 0; // optimize - do not write when nothing to write ... - doIndent = indentationString != null && (writeLineSepartor || writeIndentation); - //NOTE: when indentationString == null there is no indentation - // (even though writeLineSeparator may be true ...) + doIndent = indentationString != null && ( writeLineSeparator || writeIndentation ); + // NOTE: when indentationString == null there is no indentation + // (even though writeLineSeparator may be true ...) rebuildIndentationBuf(); seenTag = false; // for consistency } - public Object getProperty(String name) throws IllegalArgumentException + @Override + public Object getProperty( String name ) + throws IllegalArgumentException { - if(name == null) { - throw new IllegalArgumentException("property name can not be null"); + if ( name == null ) + { + throw new IllegalArgumentException( "property name can not be null" ); } - if(PROPERTY_SERIALIZER_INDENTATION.equals(name)) { + if ( PROPERTY_SERIALIZER_INDENTATION.equals( name ) ) + { return indentationString; - } else if(PROPERTY_SERIALIZER_LINE_SEPARATOR.equals(name)) { + } + else if ( PROPERTY_SERIALIZER_LINE_SEPARATOR.equals( name ) ) + { return lineSeparator; - } else if(PROPERTY_LOCATION.equals(name)) { + } + else if ( PROPERTY_LOCATION.equals( name ) ) + { return location; - } else { + } + else + { return null; } } - private String getLocation() { - return location != null ? " @"+location : ""; + private String getLocation() + { + return location != null ? " @" + location : ""; } // this is special method that can be accessed directly to retrieve Writer serializer is using @@ -346,144 +420,191 @@ public Writer getWriter() return out; } - public void setOutput(Writer writer) + @Override + public void setOutput( Writer writer ) { reset(); out = writer; } - public void setOutput(OutputStream os, String encoding) throws IOException + @Override + public void setOutput( OutputStream os, String encoding ) + throws IOException { - if(os == null) throw new IllegalArgumentException("output stream can not be null"); + if ( os == null ) + throw new IllegalArgumentException( "output stream can not be null" ); reset(); - if(encoding != null) { - out = new OutputStreamWriter(os, encoding); - } else { - out = new OutputStreamWriter(os); + if ( encoding != null ) + { + out = new OutputStreamWriter( os, encoding ); + } + else + { + out = new OutputStreamWriter( os ); } } - public void startDocument (String encoding, Boolean standalone) throws IOException + @Override + public void startDocument( String encoding, Boolean standalone ) + throws IOException { char apos = attributeUseApostrophe ? '\'' : '"'; - if(attributeUseApostrophe) { - out.write(""); - if(writeLineSepartor) { - out.write(lineSeparator); + out.write( "?>" ); + if ( writeLineSeparator ) + { + out.write( lineSeparator ); } } - public void endDocument() throws IOException + @Override + public void endDocument() + throws IOException { // close all unclosed tag; - while(depth > 0) { - endTag(elNamespace[ depth ], elName[ depth ]); + while ( depth > 0 ) + { + endTag( elNamespace[depth], elName[depth] ); } - if(writeLineSepartor) { - out.write(lineSeparator); + if ( writeLineSeparator ) + { + out.write( lineSeparator ); } - //assert depth == 0; - //assert startTagIncomplete == false; + // assert depth == 0; + // assert startTagIncomplete == false; finished = pastRoot = startTagIncomplete = true; out.flush(); } - public void setPrefix(String prefix, String namespace) throws IOException + @Override + public void setPrefix( String prefix, String namespace ) + throws IOException { - if(startTagIncomplete) closeStartTag(); - //assert prefix != null; - //assert namespace != null; - if (prefix == null) { + if ( startTagIncomplete ) + closeStartTag(); + // assert prefix != null; + // assert namespace != null; + if ( prefix == null ) + { prefix = ""; } - if(!namesInterned) { - prefix = prefix.intern(); //will throw NPE if prefix==null - } else if(checkNamesInterned) { - checkInterning(prefix); - } else if(prefix == null) { - throw new IllegalArgumentException("prefix must be not null"+getLocation()); + if ( !namesInterned ) + { + prefix = prefix.intern(); // will throw NPE if prefix==null + } + else if ( checkNamesInterned ) + { + checkInterning( prefix ); + } + else if ( prefix == null ) + { + throw new IllegalArgumentException( "prefix must be not null" + getLocation() ); } - //check that prefix is not duplicated ... - for (int i = elNamespaceCount[ depth ]; i < namespaceEnd; i++) + // check that prefix is not duplicated ... + for ( int i = elNamespaceCount[depth]; i < namespaceEnd; i++ ) { - if(prefix == namespacePrefix[ i ]) { - throw new IllegalStateException("duplicated prefix "+printable(prefix)+getLocation()); + if ( prefix == namespacePrefix[i] ) + { + throw new IllegalStateException( "duplicated prefix " + printable( prefix ) + getLocation() ); } } - if(!namesInterned) { + if ( !namesInterned ) + { namespace = namespace.intern(); - } else if(checkNamesInterned) { - checkInterning(namespace); - } else if(namespace == null) { - throw new IllegalArgumentException("namespace must be not null"+getLocation()); + } + else if ( checkNamesInterned ) + { + checkInterning( namespace ); + } + else if ( namespace == null ) + { + throw new IllegalArgumentException( "namespace must be not null" + getLocation() ); } - if(namespaceEnd >= namespacePrefix.length) { + if ( namespaceEnd >= namespacePrefix.length ) + { ensureNamespacesCapacity(); } - namespacePrefix[ namespaceEnd ] = prefix; - namespaceUri[ namespaceEnd ] = namespace; + namespacePrefix[namespaceEnd] = prefix; + namespaceUri[namespaceEnd] = namespace; ++namespaceEnd; setPrefixCalled = true; } - protected String lookupOrDeclarePrefix( String namespace ) { - return getPrefix(namespace, true); + protected String lookupOrDeclarePrefix( String namespace ) + { + return getPrefix( namespace, true ); } - public String getPrefix(String namespace, boolean generatePrefix) + @Override + public String getPrefix( String namespace, boolean generatePrefix ) { - //assert namespace != null; - if(!namesInterned) { + // assert namespace != null; + if ( !namesInterned ) + { // when String is interned we can do much faster namespace stack lookups ... namespace = namespace.intern(); - } else if(checkNamesInterned) { - checkInterning(namespace); - //assert namespace != namespace.intern(); } - if(namespace == null) { - throw new IllegalArgumentException("namespace must be not null"+getLocation()); - } else if(namespace.length() == 0) { - throw new IllegalArgumentException("default namespace cannot have prefix"+getLocation()); + else if ( checkNamesInterned ) + { + checkInterning( namespace ); + // assert namespace != namespace.intern(); + } + if ( namespace == null ) + { + throw new IllegalArgumentException( "namespace must be not null" + getLocation() ); + } + else if ( namespace.length() == 0 ) + { + throw new IllegalArgumentException( "default namespace cannot have prefix" + getLocation() ); } // first check if namespace is already in scope - for (int i = namespaceEnd - 1; i >= 0 ; --i) + for ( int i = namespaceEnd - 1; i >= 0; --i ) { - if(namespace == namespaceUri[ i ]) { - final String prefix = namespacePrefix[ i ]; + if ( namespace == namespaceUri[i] ) + { + final String prefix = namespacePrefix[i]; // now check that prefix is still in scope - for (int p = namespaceEnd - 1; p > i ; --p) + for ( int p = namespaceEnd - 1; p > i; --p ) { - if(prefix == namespacePrefix[ p ]) + if ( prefix == namespacePrefix[p] ) continue; // too bad - prefix is redeclared with different namespace } return prefix; @@ -491,100 +612,125 @@ public String getPrefix(String namespace, boolean generatePrefix) } // so not found it ... - if(!generatePrefix) { + if ( !generatePrefix ) + { return null; } - return generatePrefix(namespace); + return generatePrefix( namespace ); } - private String generatePrefix(String namespace) { - //assert namespace == namespace.intern(); - while(true) { + private String generatePrefix( String namespace ) + { + // assert namespace == namespace.intern(); + while ( true ) + { ++autoDeclaredPrefixes; - //fast lookup uses table that was pre-initialized in static{} .... - final String prefix = autoDeclaredPrefixes < precomputedPrefixes.length - ? precomputedPrefixes[autoDeclaredPrefixes] : ("n"+autoDeclaredPrefixes).intern(); + // fast lookup uses table that was pre-initialized in static{} .... + final String prefix = + autoDeclaredPrefixes < precomputedPrefixes.length ? precomputedPrefixes[autoDeclaredPrefixes] + : ( "n" + autoDeclaredPrefixes ).intern(); // make sure this prefix is not declared in any scope (avoid hiding in-scope prefixes)! - for (int i = namespaceEnd - 1; i >= 0 ; --i) + for ( int i = namespaceEnd - 1; i >= 0; --i ) { - if(prefix == namespacePrefix[ i ]) { + if ( prefix == namespacePrefix[i] ) + { continue; // prefix is already declared - generate new and try again } } // declare prefix - if(namespaceEnd >= namespacePrefix.length) { + if ( namespaceEnd >= namespacePrefix.length ) + { ensureNamespacesCapacity(); } - namespacePrefix[ namespaceEnd ] = prefix; - namespaceUri[ namespaceEnd ] = namespace; + namespacePrefix[namespaceEnd] = prefix; + namespaceUri[namespaceEnd] = namespace; ++namespaceEnd; return prefix; } } + @Override public int getDepth() { return depth; } - public String getNamespace () + @Override + public String getNamespace() { return elNamespace[depth]; } + @Override public String getName() { return elName[depth]; } - public XmlSerializer startTag (String namespace, String name) throws IOException + @Override + public XmlSerializer startTag( String namespace, String name ) + throws IOException { - if(startTagIncomplete) { + if ( startTagIncomplete ) + { closeStartTag(); } seenBracket = seenBracketBracket = false; - if(doIndent && depth > 0 && seenTag) { + if ( doIndent && depth > 0 && seenTag ) + { writeIndent(); } seenTag = true; setPrefixCalled = false; startTagIncomplete = true; ++depth; - if( (depth + 1) >= elName.length) { + if ( ( depth + 1 ) >= elName.length ) + { ensureElementsCapacity(); } - ////assert namespace != null; - - if(checkNamesInterned && namesInterned) checkInterning(namespace); - elNamespace[ depth ] = (namesInterned || namespace == null) ? namespace : namespace.intern(); - //assert name != null; - //elName[ depth ] = name; - if(checkNamesInterned && namesInterned) checkInterning(name); - elName[ depth ] = (namesInterned || name == null) ? name : name.intern(); - if(out == null) { - throw new IllegalStateException("setOutput() must called set before serialization can start"); + //// assert namespace != null; + + if ( checkNamesInterned && namesInterned ) + checkInterning( namespace ); + elNamespace[depth] = ( namesInterned || namespace == null ) ? namespace : namespace.intern(); + // assert name != null; + // elName[ depth ] = name; + if ( checkNamesInterned && namesInterned ) + checkInterning( name ); + elName[depth] = ( namesInterned || name == null ) ? name : name.intern(); + if ( out == null ) + { + throw new IllegalStateException( "setOutput() must called set before serialization can start" ); } - out.write('<'); - if(namespace != null) { + out.write( '<' ); + if ( namespace != null ) + { - if(namespace.length() > 0) { - //ALEK: in future make it as feature on serializer + if ( namespace.length() > 0 ) + { + // ALEK: in future make it as feature on serializer String prefix = null; - if(depth > 0 && (namespaceEnd - elNamespaceCount[depth-1]) == 1) { - // if only one prefix was declared un-declare it if prefix is already declared on parent el with the same URI - String uri = namespaceUri[namespaceEnd-1]; - if(uri == namespace || uri.equals(namespace)) { - String elPfx = namespacePrefix[namespaceEnd-1]; + if ( depth > 0 && ( namespaceEnd - elNamespaceCount[depth - 1] ) == 1 ) + { + // if only one prefix was declared un-declare it if prefix is already declared on parent el with the + // same URI + String uri = namespaceUri[namespaceEnd - 1]; + if ( uri == namespace || uri.equals( namespace ) ) + { + String elPfx = namespacePrefix[namespaceEnd - 1]; // 2 == to skip predefined namespaces (xml and xmlns ...) - for(int pos = elNamespaceCount[depth-1] - 1; pos >= 2; --pos ) { + for ( int pos = elNamespaceCount[depth - 1] - 1; pos >= 2; --pos ) + { String pf = namespacePrefix[pos]; - if(pf == elPfx || pf.equals(elPfx)) { + if ( pf == elPfx || pf.equals( elPfx ) ) + { String n = namespaceUri[pos]; - if(n == uri || n.equals(uri)) { - --namespaceEnd; //un-declare namespace + if ( n == uri || n.equals( uri ) ) + { + --namespaceEnd; // un-declare namespace prefix = elPfx; } break; @@ -592,28 +738,35 @@ public XmlSerializer startTag (String namespace, String name) throws IOException } } } - if(prefix == null) { + if ( prefix == null ) + { prefix = lookupOrDeclarePrefix( namespace ); } - //assert prefix != null; + // assert prefix != null; // make sure that default ("") namespace to not print ":" - if(prefix.length() > 0) { - out.write(prefix); - out.write(':'); + if ( prefix.length() > 0 ) + { + out.write( prefix ); + out.write( ':' ); } - } else { + } + else + { // make sure that default namespace can be declared - for (int i = namespaceEnd - 1; i >= 0 ; --i) + for ( int i = namespaceEnd - 1; i >= 0; --i ) { - if(namespacePrefix[ i ] == "") { - final String uri = namespaceUri[ i ]; - if(uri == null) { + if ( namespacePrefix[i] == "" ) + { + final String uri = namespaceUri[i]; + if ( uri == null ) + { // declare default namespace - setPrefix("", ""); - } else if(uri.length() > 0) { - throw new IllegalStateException( - "start tag can not be written in empty default namespace "+ - "as default namespace is currently bound to '"+uri+"'"+getLocation()); + setPrefix( "", "" ); + } + else if ( uri.length() > 0 ) + { + throw new IllegalStateException( "start tag can not be written in empty default namespace " + + "as default namespace is currently bound to '" + uri + "'" + getLocation() ); } break; } @@ -621,501 +774,636 @@ public XmlSerializer startTag (String namespace, String name) throws IOException } } - out.write(name); + out.write( name ); return this; } - public XmlSerializer attribute (String namespace, String name, - String value) throws IOException + @Override + public XmlSerializer attribute( String namespace, String name, String value ) + throws IOException { - if(!startTagIncomplete) { - throw new IllegalArgumentException("startTag() must be called before attribute()"+getLocation()); - } - //assert setPrefixCalled == false; - out.write(' '); - ////assert namespace != null; - if(namespace != null && namespace.length() > 0) { - //namespace = namespace.intern(); - if(!namesInterned) { + if ( !startTagIncomplete ) + { + throw new IllegalArgumentException( "startTag() must be called before attribute()" + getLocation() ); + } + // assert setPrefixCalled == false; + out.write( ' ' ); + //// assert namespace != null; + if ( namespace != null && namespace.length() > 0 ) + { + // namespace = namespace.intern(); + if ( !namesInterned ) + { namespace = namespace.intern(); - } else if(checkNamesInterned) { - checkInterning(namespace); + } + else if ( checkNamesInterned ) + { + checkInterning( namespace ); } String prefix = lookupOrDeclarePrefix( namespace ); - //assert( prefix != null); - if(prefix.length() == 0) { + // assert( prefix != null); + if ( prefix.length() == 0 ) + { // needs to declare prefix to hold default namespace - //NOTE: attributes such as a='b' are in NO namespace - prefix = generatePrefix(namespace); + // NOTE: attributes such as a='b' are in NO namespace + prefix = generatePrefix( namespace ); } - out.write(prefix); - out.write(':'); - // if(prefix.length() > 0) { - // out.write(prefix); - // out.write(':'); - // } - } - //assert name != null; - out.write(name); - out.write('='); - //assert value != null; - out.write( attributeUseApostrophe ? '\'' : '"'); - writeAttributeValue(value, out); - out.write( attributeUseApostrophe ? '\'' : '"'); + out.write( prefix ); + out.write( ':' ); + // if(prefix.length() > 0) { + // out.write(prefix); + // out.write(':'); + // } + } + // assert name != null; + out.write( name ); + out.write( '=' ); + // assert value != null; + out.write( attributeUseApostrophe ? '\'' : '"' ); + writeAttributeValue( value, out ); + out.write( attributeUseApostrophe ? '\'' : '"' ); return this; } - protected void closeStartTag() throws IOException { - if(finished) { - throw new IllegalArgumentException("trying to write past already finished output"+getLocation()); + protected void closeStartTag() + throws IOException + { + if ( finished ) + { + throw new IllegalArgumentException( "trying to write past already finished output" + getLocation() ); } - if(seenBracket) { + if ( seenBracket ) + { seenBracket = seenBracketBracket = false; } - if( startTagIncomplete || setPrefixCalled ) { - if(setPrefixCalled) { - throw new IllegalArgumentException( - "startTag() must be called immediately after setPrefix()"+getLocation()); + if ( startTagIncomplete || setPrefixCalled ) + { + if ( setPrefixCalled ) + { + throw new IllegalArgumentException( "startTag() must be called immediately after setPrefix()" + + getLocation() ); } - if(!startTagIncomplete) { - throw new IllegalArgumentException("trying to close start tag that is not opened"+getLocation()); + if ( !startTagIncomplete ) + { + throw new IllegalArgumentException( "trying to close start tag that is not opened" + getLocation() ); } // write all namespace declarations! writeNamespaceDeclarations(); - out.write('>'); - elNamespaceCount[ depth ] = namespaceEnd; + out.write( '>' ); + elNamespaceCount[depth] = namespaceEnd; startTagIncomplete = false; } } - private void writeNamespaceDeclarations() throws IOException + private void writeNamespaceDeclarations() + throws IOException { - //int start = elNamespaceCount[ depth - 1 ]; - for (int i = elNamespaceCount[ depth - 1 ]; i < namespaceEnd; i++) + // int start = elNamespaceCount[ depth - 1 ]; + for ( int i = elNamespaceCount[depth - 1]; i < namespaceEnd; i++ ) { - if(doIndent && namespaceUri[ i ].length() > 40) { + if ( doIndent && namespaceUri[i].length() > 40 ) + { writeIndent(); - out.write(" "); + out.write( " " ); + } + if ( namespacePrefix[i] != "" ) + { + out.write( " xmlns:" ); + out.write( namespacePrefix[i] ); + out.write( '=' ); } - if(namespacePrefix[ i ] != "") { - out.write(" xmlns:"); - out.write(namespacePrefix[ i ]); - out.write('='); - } else { - out.write(" xmlns="); + else + { + out.write( " xmlns=" ); } - out.write( attributeUseApostrophe ? '\'' : '"'); + out.write( attributeUseApostrophe ? '\'' : '"' ); - //NOTE: escaping of namespace value the same way as attributes!!!! - writeAttributeValue(namespaceUri[ i ], out); + // NOTE: escaping of namespace value the same way as attributes!!!! + writeAttributeValue( namespaceUri[i], out ); - out.write( attributeUseApostrophe ? '\'' : '"'); + out.write( attributeUseApostrophe ? '\'' : '"' ); } } - public XmlSerializer endTag(String namespace, String name) throws IOException + @Override + public XmlSerializer endTag( String namespace, String name ) + throws IOException { // check that level is valid - ////assert namespace != null; - //if(namespace != null) { - // namespace = namespace.intern(); - //} + //// assert namespace != null; + // if(namespace != null) { + // namespace = namespace.intern(); + // } seenBracket = seenBracketBracket = false; - if(namespace != null) { - if(!namesInterned) { + if ( namespace != null ) + { + if ( !namesInterned ) + { namespace = namespace.intern(); - } else if(checkNamesInterned) { - checkInterning(namespace); + } + else if ( checkNamesInterned ) + { + checkInterning( namespace ); } } - if(namespace != elNamespace[ depth ]) + if ( namespace != elNamespace[depth] ) { - throw new IllegalArgumentException( - "expected namespace "+printable(elNamespace[ depth ]) - +" and not "+printable(namespace)+getLocation()); + throw new IllegalArgumentException( "expected namespace " + printable( elNamespace[depth] ) + " and not " + + printable( namespace ) + getLocation() ); } - if(name == null) { - throw new IllegalArgumentException("end tag name can not be null"+getLocation()); + if ( name == null ) + { + throw new IllegalArgumentException( "end tag name can not be null" + getLocation() ); } - if(checkNamesInterned && namesInterned) { - checkInterning(name); + if ( checkNamesInterned && namesInterned ) + { + checkInterning( name ); } - if((!namesInterned && !name.equals(elName[ depth ])) - || (namesInterned && name != elName[ depth ])) + if ( ( !namesInterned && !name.equals( elName[depth] ) ) || ( namesInterned && name != elName[depth] ) ) { - throw new IllegalArgumentException( - "expected element name "+printable(elName[ depth ])+" and not "+printable(name)+getLocation()); + throw new IllegalArgumentException( "expected element name " + printable( elName[depth] ) + " and not " + + printable( name ) + getLocation() ); } - if(startTagIncomplete) { + if ( startTagIncomplete ) + { writeNamespaceDeclarations(); - out.write(" />"); //space is added to make it easier to work in XHTML!!! + out.write( " />" ); // space is added to make it easier to work in XHTML!!! --depth; - } else { + } + else + { --depth; - //assert startTagIncomplete == false; - if(doIndent && seenTag) { writeIndent(); } - out.write(" 0) { - //TODO prefix should be alredy known from matching start tag ... + // assert startTagIncomplete == false; + if ( doIndent && seenTag ) + { + writeIndent(); + } + out.write( " 0 ) + { + // TODO prefix should be already known from matching start tag ... final String prefix = lookupOrDeclarePrefix( namespace ); - //assert( prefix != null); - if(prefix.length() > 0) { - out.write(prefix); - out.write(':'); + // assert( prefix != null); + if ( prefix.length() > 0 ) + { + out.write( prefix ); + out.write( ':' ); } } - out.write(name); - out.write('>'); + out.write( name ); + out.write( '>' ); } - namespaceEnd = elNamespaceCount[ depth ]; + namespaceEnd = elNamespaceCount[depth]; startTagIncomplete = false; seenTag = true; return this; } - public XmlSerializer text (String text) throws IOException + @Override + public XmlSerializer text( String text ) + throws IOException { - //assert text != null; - if(startTagIncomplete || setPrefixCalled) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - writeElementContent(text, out); + // assert text != null; + if ( startTagIncomplete || setPrefixCalled ) + closeStartTag(); + if ( doIndent && seenTag ) + seenTag = false; + writeElementContent( text, out ); return this; } - public XmlSerializer text (char [] buf, int start, int len) throws IOException + @Override + public XmlSerializer text( char[] buf, int start, int len ) + throws IOException { - if(startTagIncomplete || setPrefixCalled) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - writeElementContent(buf, start, len, out); + if ( startTagIncomplete || setPrefixCalled ) + closeStartTag(); + if ( doIndent && seenTag ) + seenTag = false; + writeElementContent( buf, start, len, out ); return this; } - public void cdsect (String text) throws IOException + @Override + public void cdsect( String text ) + throws IOException { - if(startTagIncomplete || setPrefixCalled || seenBracket) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - out.write(""); + if ( startTagIncomplete || setPrefixCalled || seenBracket ) + closeStartTag(); + if ( doIndent && seenTag ) + seenTag = false; + out.write( "" ); } - public void entityRef (String text) throws IOException + @Override + public void entityRef( String text ) + throws IOException { - if(startTagIncomplete || setPrefixCalled || seenBracket) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - out.write('&'); - out.write(text); //escape? - out.write(';'); + if ( startTagIncomplete || setPrefixCalled || seenBracket ) + closeStartTag(); + if ( doIndent && seenTag ) + seenTag = false; + out.write( '&' ); + out.write( text ); // escape? + out.write( ';' ); } - public void processingInstruction (String text) throws IOException + @Override + public void processingInstruction( String text ) + throws IOException { - if(startTagIncomplete || setPrefixCalled || seenBracket) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - out.write(""); + if ( startTagIncomplete || setPrefixCalled || seenBracket ) + closeStartTag(); + if ( doIndent && seenTag ) + seenTag = false; + out.write( "" ); } - public void comment (String text) throws IOException + @Override + public void comment( String text ) + throws IOException { - if(startTagIncomplete || setPrefixCalled || seenBracket) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - out.write(""); + if ( startTagIncomplete || setPrefixCalled || seenBracket ) + closeStartTag(); + if ( doIndent && seenTag ) + seenTag = false; + out.write( "" ); } - public void docdecl (String text) throws IOException + @Override + public void docdecl( String text ) + throws IOException { - if(startTagIncomplete || setPrefixCalled || seenBracket) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - out.write(""); + if ( startTagIncomplete || setPrefixCalled || seenBracket ) + closeStartTag(); + if ( doIndent && seenTag ) + seenTag = false; + out.write( "" ); } - public void ignorableWhitespace (String text) throws IOException + @Override + public void ignorableWhitespace( String text ) + throws IOException { - if(startTagIncomplete || setPrefixCalled || seenBracket) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - if(text.length() == 0) { - throw new IllegalArgumentException( - "empty string is not allowed for ignorable whitespace"+getLocation()); + if ( startTagIncomplete || setPrefixCalled || seenBracket ) + closeStartTag(); + if ( doIndent && seenTag ) + seenTag = false; + if ( text.length() == 0 ) + { + throw new IllegalArgumentException( "empty string is not allowed for ignorable whitespace" + + getLocation() ); } - out.write(text); //no escape? + out.write( text ); // no escape? } - public void flush () throws IOException + @Override + public void flush() + throws IOException { - if(!finished && startTagIncomplete) closeStartTag(); + if ( !finished && startTagIncomplete ) + closeStartTag(); out.flush(); } // --- utility methods - protected void writeAttributeValue(String value, Writer out) throws IOException + protected void writeAttributeValue( String value, Writer out ) + throws IOException { - //.[apostrophe and <, & escaped], + // .[apostrophe and <, & escaped], final char quot = attributeUseApostrophe ? '\'' : '"'; final String quotEntity = attributeUseApostrophe ? "'" : """; int pos = 0; - for (int i = 0; i < value.length(); i++) + for ( int i = 0; i < value.length(); i++ ) { - char ch = value.charAt(i); - if(ch == '&') { - if(i > pos) out.write(value.substring(pos, i)); - out.write("&"); + char ch = value.charAt( i ); + if ( ch == '&' ) + { + if ( i > pos ) + out.write( value.substring( pos, i ) ); + out.write( "&" ); pos = i + 1; - } if(ch == '<') { - if(i > pos) out.write(value.substring(pos, i)); - out.write("<"); + } + if ( ch == '<' ) + { + if ( i > pos ) + out.write( value.substring( pos, i ) ); + out.write( "<" ); pos = i + 1; - }else if(ch == quot) { - if(i > pos) out.write(value.substring(pos, i)); - out.write(quotEntity); + } + else if ( ch == quot ) + { + if ( i > pos ) + out.write( value.substring( pos, i ) ); + out.write( quotEntity ); pos = i + 1; - } else if(ch < 32) { - //in XML 1.0 only legal character are #x9 | #xA | #xD + } + else if ( ch < 32 ) + { + // in XML 1.0 only legal character are #x9 | #xA | #xD // and they must be escaped otherwise in attribute value they are normalized to spaces - if(ch == 13 || ch == 10 || ch == 9) { - if(i > pos) out.write(value.substring(pos, i)); - out.write("&#"); - out.write(Integer.toString(ch)); - out.write(';'); + if ( ch == 13 || ch == 10 || ch == 9 ) + { + if ( i > pos ) + out.write( value.substring( pos, i ) ); + out.write( "&#" ); + out.write( Integer.toString( ch ) ); + out.write( ';' ); pos = i + 1; - } else { - throw new IllegalStateException( - "character "+Integer.toString(ch)+" is not allowed in output"+getLocation()); + } + else + { + throw new IllegalStateException( "character " + Integer.toString( ch ) + " is not allowed in output" + + getLocation() ); // in XML 1.1 legal are [#x1-#xD7FF] - // if(ch > 0) { - // if(i > pos) out.write(text.substring(pos, i)); - // out.write("&#"); - // out.write(Integer.toString(ch)); - // out.write(';'); - // pos = i + 1; - // } else { - // throw new IllegalStateException( - // "character zero is not allowed in XML 1.1 output"+getLocation()); - // } + // if(ch > 0) { + // if(i > pos) out.write(text.substring(pos, i)); + // out.write("&#"); + // out.write(Integer.toString(ch)); + // out.write(';'); + // pos = i + 1; + // } else { + // throw new IllegalStateException( + // "character zero is not allowed in XML 1.1 output"+getLocation()); + // } } } } - if(pos > 0) { - out.write(value.substring(pos)); - } else { - out.write(value); // this is shortcut to the most common case + if ( pos > 0 ) + { + out.write( value.substring( pos ) ); + } + else + { + out.write( value ); // this is shortcut to the most common case } } - protected void writeElementContent(String text, Writer out) throws IOException + protected void writeElementContent( String text, Writer out ) + throws IOException { // escape '<', '&', ']]>', <32 if necessary int pos = 0; - for (int i = 0; i < text.length(); i++) + for ( int i = 0; i < text.length(); i++ ) { - //TODO: check if doing char[] text.getChars() would be faster than getCharAt(i) ... - char ch = text.charAt(i); - if(ch == ']') { - if(seenBracket) { + // TODO: check if doing char[] text.getChars() would be faster than getCharAt(i) ... + char ch = text.charAt( i ); + if ( ch == ']' ) + { + if ( seenBracket ) + { seenBracketBracket = true; - } else { + } + else + { seenBracket = true; } - } else { - if(ch == '&') { - if(i > pos) out.write(text.substring(pos, i)); - out.write("&"); + } + else + { + if ( ch == '&' ) + { + if ( i > pos ) + out.write( text.substring( pos, i ) ); + out.write( "&" ); pos = i + 1; - } else if(ch == '<') { - if(i > pos) out.write(text.substring(pos, i)); - out.write("<"); + } + else if ( ch == '<' ) + { + if ( i > pos ) + out.write( text.substring( pos, i ) ); + out.write( "<" ); pos = i + 1; - } else if(seenBracketBracket && ch == '>') { - if(i > pos) out.write(text.substring(pos, i)); - out.write(">"); + } + else if ( seenBracketBracket && ch == '>' ) + { + if ( i > pos ) + out.write( text.substring( pos, i ) ); + out.write( ">" ); pos = i + 1; - } else if(ch < 32) { - //in XML 1.0 only legal character are #x9 | #xA | #xD - if( ch == 9 || ch == 10 || ch == 13) { + } + else if ( ch < 32 ) + { + // in XML 1.0 only legal character are #x9 | #xA | #xD + if ( ch == 9 || ch == 10 || ch == 13 ) + { // pass through - // } else if(ch == 13) { //escape - // if(i > pos) out.write(text.substring(pos, i)); - // out.write("&#"); - // out.write(Integer.toString(ch)); - // out.write(';'); - // pos = i + 1; - } else { - throw new IllegalStateException( - "character "+Integer.toString(ch)+" is not allowed in output"+getLocation()); + // } else if(ch == 13) { //escape + // if(i > pos) out.write(text.substring(pos, i)); + // out.write("&#"); + // out.write(Integer.toString(ch)); + // out.write(';'); + // pos = i + 1; + } + else + { + throw new IllegalStateException( "character " + Integer.toString( ch ) + + " is not allowed in output" + getLocation() ); // in XML 1.1 legal are [#x1-#xD7FF] - // if(ch > 0) { - // if(i > pos) out.write(text.substring(pos, i)); - // out.write("&#"); - // out.write(Integer.toString(ch)); - // out.write(';'); - // pos = i + 1; - // } else { - // throw new IllegalStateException( - // "character zero is not allowed in XML 1.1 output"+getLocation()); - // } + // if(ch > 0) { + // if(i > pos) out.write(text.substring(pos, i)); + // out.write("&#"); + // out.write(Integer.toString(ch)); + // out.write(';'); + // pos = i + 1; + // } else { + // throw new IllegalStateException( + // "character zero is not allowed in XML 1.1 output"+getLocation()); + // } } } - if(seenBracket) { + if ( seenBracket ) + { seenBracketBracket = seenBracket = false; } } } - if(pos > 0) { - out.write(text.substring(pos)); - } else { - out.write(text); // this is shortcut to the most common case + if ( pos > 0 ) + { + out.write( text.substring( pos ) ); + } + else + { + out.write( text ); // this is shortcut to the most common case } - - } - protected void writeElementContent(char[] buf, int off, int len, Writer out) throws IOException + protected void writeElementContent( char[] buf, int off, int len, Writer out ) + throws IOException { // escape '<', '&', ']]>' final int end = off + len; int pos = off; - for (int i = off; i < end; i++) + for ( int i = off; i < end; i++ ) { final char ch = buf[i]; - if(ch == ']') { - if(seenBracket) { + if ( ch == ']' ) + { + if ( seenBracket ) + { seenBracketBracket = true; - } else { + } + else + { seenBracket = true; } - } else { - if(ch == '&') { - if(i > pos) { - out.write(buf, pos, i - pos); + } + else + { + if ( ch == '&' ) + { + if ( i > pos ) + { + out.write( buf, pos, i - pos ); } - out.write("&"); + out.write( "&" ); pos = i + 1; - } else if(ch == '<') { - if(i > pos) { - out.write(buf, pos, i - pos); + } + else if ( ch == '<' ) + { + if ( i > pos ) + { + out.write( buf, pos, i - pos ); } - out.write("<"); + out.write( "<" ); pos = i + 1; - } else if(seenBracketBracket && ch == '>') { - if(i > pos) { - out.write(buf, pos, i - pos); + } + else if ( seenBracketBracket && ch == '>' ) + { + if ( i > pos ) + { + out.write( buf, pos, i - pos ); } - out.write(">"); + out.write( ">" ); pos = i + 1; - } else if(ch < 32) { - //in XML 1.0 only legal character are #x9 | #xA | #xD - if( ch == 9 || ch == 10 || ch == 13) { + } + else if ( ch < 32 ) + { + // in XML 1.0 only legal character are #x9 | #xA | #xD + if ( ch == 9 || ch == 10 || ch == 13 ) + { // pass through - - // } else if(ch == 13 ) { //if(ch == '\r') { - // if(i > pos) { - // out.write(buf, pos, i - pos); - // } - // out.write("&#"); - // out.write(Integer.toString(ch)); - // out.write(';'); - // pos = i + 1; - } else { - throw new IllegalStateException( - "character "+Integer.toString(ch)+" is not allowed in output"+getLocation()); + // } else if(ch == 13 ) { //if(ch == '\r') { + // if(i > pos) { + // out.write(buf, pos, i - pos); + // } + // out.write("&#"); + // out.write(Integer.toString(ch)); + // out.write(';'); + // pos = i + 1; + } + else + { + throw new IllegalStateException( "character " + Integer.toString( ch ) + + " is not allowed in output" + getLocation() ); // in XML 1.1 legal are [#x1-#xD7FF] - // if(ch > 0) { - // if(i > pos) out.write(text.substring(pos, i)); - // out.write("&#"); - // out.write(Integer.toString(ch)); - // out.write(';'); - // pos = i + 1; - // } else { - // throw new IllegalStateException( - // "character zero is not allowed in XML 1.1 output"+getLocation()); - // } + // if(ch > 0) { + // if(i > pos) out.write(text.substring(pos, i)); + // out.write("&#"); + // out.write(Integer.toString(ch)); + // out.write(';'); + // pos = i + 1; + // } else { + // throw new IllegalStateException( + // "character zero is not allowed in XML 1.1 output"+getLocation()); + // } } } - if(seenBracket) { + if ( seenBracket ) + { seenBracketBracket = seenBracket = false; } // assert seenBracketBracket == seenBracket == false; } } - if(end > pos) { - out.write(buf, pos, end - pos); + if ( end > pos ) + { + out.write( buf, pos, end - pos ); } } - /** simple utility method -- good for debugging */ - protected static final String printable(String s) { - if(s == null) return "null"; - StringBuffer retval = new StringBuffer(s.length() + 16); - retval.append("'"); + // simple utility method -- good for debugging + protected static final String printable( String s ) + { + if ( s == null ) + return "null"; + StringBuilder retval = new StringBuilder( s.length() + 16 ); + retval.append( "'" ); char ch; - for (int i = 0; i < s.length(); i++) { - addPrintable(retval, s.charAt(i)); + for ( int i = 0; i < s.length(); i++ ) + { + addPrintable( retval, s.charAt( i ) ); } - retval.append("'"); + retval.append( "'" ); return retval.toString(); } - protected static final String printable(char ch) { - StringBuffer retval = new StringBuffer(); - addPrintable(retval, ch); + protected static final String printable( char ch ) + { + StringBuilder retval = new StringBuilder(); + addPrintable( retval, ch ); return retval.toString(); } - private static void addPrintable(StringBuffer retval, char ch) + private static void addPrintable( StringBuilder retval, char ch ) { - switch (ch) + switch ( ch ) { case '\b': - retval.append("\\b"); + retval.append( "\\b" ); break; case '\t': - retval.append("\\t"); + retval.append( "\\t" ); break; case '\n': - retval.append("\\n"); + retval.append( "\\n" ); break; case '\f': - retval.append("\\f"); + retval.append( "\\f" ); break; case '\r': - retval.append("\\r"); + retval.append( "\\r" ); break; case '\"': - retval.append("\\\""); + retval.append( "\\\"" ); break; case '\'': - retval.append("\\\'"); + retval.append( "\\\'" ); break; case '\\': - retval.append("\\\\"); + retval.append( "\\\\" ); break; default: - if (ch < 0x20 || ch > 0x7e) { - final String ss = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + ss.substring(ss.length() - 4, ss.length())); - } else { - retval.append(ch); + if ( ch < 0x20 || ch > 0x7e ) + { + final String ss = "0000" + Integer.toString( ch, 16 ); + retval.append( "\\u" ).append( ss, ss.length() - 4, ss.length() ); + } + else + { + retval.append( ch ); } } } } - - diff --git a/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParser.java b/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParser.java index 8c069e43..a5f06c14 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParser.java +++ b/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParser.java @@ -8,74 +8,66 @@ import java.io.Reader; /** - * XML Pull Parser is an interface that defines parsing functionality provided - * in XMLPULL V1 API (visit this website to - * learn more about API and its implementations). - * - *

                There are following different - * kinds of parser depending on which features are set:

                  - *
                • non-validating parser as defined in XML 1.0 spec when - * FEATURE_PROCESS_DOCDECL is set to true - *
                • validating parser as defined in XML 1.0 spec when - * FEATURE_VALIDATION is true (and that implies that FEATURE_PROCESS_DOCDECL is true) - *
                • when FEATURE_PROCESS_DOCDECL is false (this is default and - * if different value is required necessary must be changed before parsing is started) - * then parser behaves like XML 1.0 compliant non-validating parser under condition that - * no DOCDECL is present in XML documents - * (internal entities can still be defined with defineEntityReplacementText()). - * This mode of operation is intended for operation in constrained environments such as J2ME. + * XML Pull Parser is an interface that defines parsing functionality provided in + * XMLPULL V1 API (visit this website to learn more about API and its + * implementations). + *

                  + * There are following different kinds of parser depending on which features are set: + *

                    + *
                  • non-validating parser as defined in XML 1.0 spec when FEATURE_PROCESS_DOCDECL is set to true + *
                  • validating parser as defined in XML 1.0 spec when FEATURE_VALIDATION is true (and that implies that + * FEATURE_PROCESS_DOCDECL is true) + *
                  • when FEATURE_PROCESS_DOCDECL is false (this is default and if different value is required necessary must be + * changed before parsing is started) then parser behaves like XML 1.0 compliant non-validating parser under condition + * that no DOCDECL is present in XML documents (internal entities can still be defined with + * defineEntityReplacementText()). This mode of operation is intended for operation in constrained environments + * such as J2ME. *
                  - * - * - *

                  There are two key methods: next() and nextToken(). While next() provides - * access to high level parsing events, nextToken() allows access to lower - * level tokens. - * - *

                  The current event state of the parser - * can be determined by calling the - * getEventType() method. - * Initially, the parser is in the START_DOCUMENT - * state. - * - *

                  The method next() advances the parser to the - * next event. The int value returned from next determines the current parser - * state and is identical to the value returned from following calls to - * getEventType (). - * - *

                  The following event types are seen by next()

                  - *
                  START_TAG
                  An XML start tag was read. - *
                  TEXT
                  Text content was read; - * the text content can be retrieved using the getText() method. - * (when in validating mode next() will not report ignorable whitespaces, use nextToken() instead) - *
                  END_TAG
                  An end tag was read - *
                  END_DOCUMENT
                  No more events are available + *

                  + * There are two key methods: next() and nextToken(). While next() provides access to high level parsing events, + * nextToken() allows access to lower level tokens. + *

                  + * The current event state of the parser can be determined by calling the getEventType() + * method. Initially, the parser is in the START_DOCUMENT state. + *

                  + * The method next() advances the parser to the next event. The int value returned from next + * determines the current parser state and is identical to the value returned from following calls to getEventType (). + *

                  + * The following event types are seen by next() + *

                  + *
                  START_TAG + *
                  An XML start tag was read. + *
                  TEXT + *
                  Text content was read; the text content can be retrieved using the getText() method. (when in validating mode + * next() will not report ignorable whitespaces, use nextToken() instead) + *
                  END_TAG + *
                  An end tag was read + *
                  END_DOCUMENT + *
                  No more events are available *
                  - * - *

                  after first next() or nextToken() (or any other next*() method) - * is called user application can obtain - * XML version, standalone and encoding from XML declaration - * in following ways:

                    - *
                  • version: - * getProperty("http://xmlpull.org/v1/doc/properties.html#xmldecl-version") - * returns String ("1.0") or null if XMLDecl was not read or if property is not supported - *
                  • standalone: - * getProperty("http://xmlpull.org/v1/doc/features.html#xmldecl-standalone") - * returns Boolean: null if there was no standalone declaration - * or if property is not supported - * otherwise returns Boolean(true) if standalone="yes" and Boolean(false) when standalone="no" - *
                  • encoding: obtained from getInputEncoding() - * null if stream had unknown encoding (not set in setInputStream) - * and it was not declared in XMLDecl + *

                    + * after first next() or nextToken() (or any other next*() method) is called user application can obtain XML version, + * standalone and encoding from XML declaration in following ways: + *

                      + *
                    • version: getProperty("http://xmlpull.org/v1/doc/properties.html#xmldecl-version") + * returns String ("1.0") or null if XMLDecl was not read or if property is not supported + *
                    • standalone: getProperty("http://xmlpull.org/v1/doc/features.html#xmldecl-standalone") + * returns Boolean: null if there was no standalone declaration or if property is not supported otherwise returns + * Boolean(true) if standalone="yes" and Boolean(false) when standalone="no" + *
                    • encoding: obtained from getInputEncoding() null if stream had unknown encoding (not set in setInputStream) + * and it was not declared in XMLDecl *
                    - * * A minimal example for using this API may look as follows: + * *
                      * import java.io.IOException;
                      * import java.io.StringReader;
                      *
                      * import org.xmlpull.v1.XmlPullParser;
                    - * import org.xmlpull.v1.XmlPullParserException.html;
                    - * import org.xmlpull.v1.XmlPullParserFactory;
                    + * import org.xmlpull.v1.XmlPullParserException;
                    + * import org.xmlpull.v1.XmlPullParserFactory;
                      *
                      * public class SimpleXmlPullApp
                      * {
                    @@ -87,7 +79,7 @@
                      *         factory.setNamespaceAware(true);
                      *         XmlPullParser xpp = factory.newPullParser();
                      *
                    - *         xpp.setInput( new StringReader ( "<foo>Hello World!</foo>" ) );
                    + *         xpp.setInput( new StringReader ( "<foo%gt;Hello World!</foo>" ) );
                      *         int eventType = xpp.getEventType();
                      *         while (eventType != xpp.END_DOCUMENT) {
                      *          if(eventType == xpp.START_DOCUMENT) {
                    @@ -95,28 +87,29 @@
                      *          } else if(eventType == xpp.END_DOCUMENT) {
                      *              System.out.println("End document");
                      *          } else if(eventType == xpp.START_TAG) {
                    - *              System.out.println("Start tag "+xpp.getName());
                    + *              System.out.println("Start tag "+xpp.getName());
                      *          } else if(eventType == xpp.END_TAG) {
                      *              System.out.println("End tag "+xpp.getName());
                      *          } else if(eventType == xpp.TEXT) {
                    - *              System.out.println("Text "+xpp.getText());
                    + *              System.out.println("Text "+xpp.getText());
                      *          }
                      *          eventType = xpp.next();
                      *         }
                      *     }
                      * }
                      * 
                    - * - *

                    The above example will generate the following output: + *

                    + * The above example will generate the following output: + * *

                      * Start document
                      * Start tag foo
                      * Text Hello World!
                      * End tag foo
                      * 
                    - * - *

                    For more details on API usage, please refer to the - * quick Introduction available at http://www.xmlpull.org + * + * For more details on API usage, please refer to the quick Introduction available at + * http://www.xmlpull.org * * @see #defineEntityReplacementText * @see #getName @@ -132,12 +125,12 @@ * @see #TEXT * @see #END_TAG * @see #END_DOCUMENT - * * @author Stefan Haustein * @author Aleksander Slominski */ -public interface XmlPullParser { +public interface XmlPullParser +{ /** This constant represents the default namespace (empty string "") */ String NO_NAMESPACE = ""; @@ -146,10 +139,8 @@ public interface XmlPullParser { // EVENT TYPES as reported by next() /** - * Signalize that parser is at the very beginning of the document - * and nothing was read yet. - * This event type can only be observed by calling getEvent() - * before the first call to next(), nextToken, or nextTag()). + * Signalize that parser is at the very beginning of the document and nothing was read yet. This event type can only + * be observed by calling getEvent() before the first call to next(), nextToken, or nextTag()). * * @see #next * @see #nextToken @@ -157,12 +148,11 @@ public interface XmlPullParser { int START_DOCUMENT = 0; /** - * Logical end of the xml document. Returned from getEventType, next() - * and nextToken() - * when the end of the input document has been reached. - *

                    NOTE: calling again - * next() or nextToken() - * will result in exception being thrown. + * Logical end of the xml document. Returned from getEventType, next() and nextToken() when the end of the input + * document has been reached. + *

                    + * NOTE: calling again next() or nextToken() will + * result in exception being thrown. * * @see #next * @see #nextToken @@ -170,14 +160,11 @@ public interface XmlPullParser { int END_DOCUMENT = 1; /** - * Returned from getEventType(), - * next(), nextToken() when - * a start tag was read. - * The name of start tag is available from getName(), its namespace and prefix are - * available from getNamespace() and getPrefix() - * if namespaces are enabled. - * See getAttribute* methods to retrieve element attributes. - * See getNamespace* methods to retrieve newly declared namespaces. + * Returned from getEventType(), next(), nextToken() when a start + * tag was read. The name of start tag is available from getName(), its namespace and prefix are available from + * getNamespace() and getPrefix() if namespaces are enabled. See + * getAttribute* methods to retrieve element attributes. See getNamespace* methods to retrieve newly declared + * namespaces. * * @see #next * @see #nextToken @@ -193,11 +180,9 @@ public interface XmlPullParser { int START_TAG = 2; /** - * Returned from getEventType(), next(), or - * nextToken() when an end tag was read. - * The name of start tag is available from getName(), its - * namespace and prefix are - * available from getNamespace() and getPrefix(). + * Returned from getEventType(), next(), or nextToken() when an end + * tag was read. The name of start tag is available from getName(), its namespace and prefix are available from + * getNamespace() and getPrefix(). * * @see #next * @see #nextToken @@ -208,21 +193,15 @@ public interface XmlPullParser { */ int END_TAG = 3; - /** * Character data was read and will is available by calling getText(). - *

                    Please note: next() will - * accumulate multiple - * events into one TEXT event, skipping IGNORABLE_WHITESPACE, - * PROCESSING_INSTRUCTION and COMMENT events, - * In contrast, nextToken() will stop reading - * text when any other event is observed. - * Also, when the state was reached by calling next(), the text value will - * be normalized, whereas getText() will - * return unnormalized content in the case of nextToken(). This allows - * an exact roundtrip without changing line ends when examining low - * level events, whereas for high level applications the text is - * normalized appropriately. + *

                    + * Please note: next() will accumulate multiple events into one TEXT event, + * skipping IGNORABLE_WHITESPACE, PROCESSING_INSTRUCTION and COMMENT events, In contrast, + * nextToken() will stop reading text when any other event is observed. Also, when the + * state was reached by calling next(), the text value will be normalized, whereas getText() will return + * unnormalized content in the case of nextToken(). This allows an exact roundtrip without changing line ends when + * examining low level events, whereas for high level applications the text is normalized appropriately. * * @see #next * @see #nextToken @@ -234,11 +213,9 @@ public interface XmlPullParser { // additional events exposed by lower level nextToken() /** - * A CDATA sections was just read; - * this token is available only from calls to nextToken(). - * A call to next() will accumulate various text events into a single event - * of type TEXT. The text contained in the CDATA section is available - * by calling getText(). + * A CDATA sections was just read; this token is available only from calls to + * nextToken(). A call to next() will accumulate various text events into a single event + * of type TEXT. The text contained in the CDATA section is available by calling getText(). * * @see #nextToken * @see #getText @@ -246,14 +223,10 @@ public interface XmlPullParser { int CDSECT = 5; /** - * An entity reference was just read; - * this token is available from nextToken() - * only. The entity name is available by calling getName(). If available, - * the replacement text can be obtained by calling getTextt(); otherwise, - * the user is responsible for resolving the entity reference. - * This event type is never returned from next(); next() will - * accumulate the replacement text and other text - * events to a single TEXT event. + * An entity reference was just read; this token is available from nextToken() only. The + * entity name is available by calling getName(). If available, the replacement text can be obtained by calling + * getTextt(); otherwise, the user is responsible for resolving the entity reference. This event type is never + * returned from next(); next() will accumulate the replacement text and other text events to a single TEXT event. * * @see #nextToken * @see #getText @@ -261,21 +234,14 @@ public interface XmlPullParser { int ENTITY_REF = 6; /** - * Ignorable whitespace was just read. - * This token is available only from nextToken()). - * For non-validating - * parsers, this event is only reported by nextToken() when outside - * the root element. - * Validating parsers may be able to detect ignorable whitespace at - * other locations. - * The ignorable whitespace string is available by calling getText() - * - *

                    NOTE: this is different from calling the - * isWhitespace() method, since text content - * may be whitespace but not ignorable. - * - * Ignorable whitespace is skipped by next() automatically; this event - * type is never returned from next(). + * Ignorable whitespace was just read. This token is available only from nextToken()). + * For non-validating parsers, this event is only reported by nextToken() when outside the root element. Validating + * parsers may be able to detect ignorable whitespace at other locations. The ignorable whitespace string is + * available by calling getText() + *

                    + * NOTE: this is different from calling the isWhitespace() method, since text content may be + * whitespace but not ignorable. Ignorable whitespace is skipped by next() automatically; this event type is never + * returned from next(). * * @see #nextToken * @see #getText @@ -283,21 +249,19 @@ public interface XmlPullParser { int IGNORABLE_WHITESPACE = 7; /** - * An XML processing instruction declaration was just read. This - * event type is available only via nextToken(). - * getText() will return text that is inside the processing instruction. + * An XML processing instruction declaration was just read. This event type is available only via + * nextToken(). getText() will return text that is inside the processing instruction. * Calls to next() will skip processing instructions automatically. + * * @see #nextToken * @see #getText */ int PROCESSING_INSTRUCTION = 8; /** - * An XML comment was just read. This event type is this token is - * available via nextToken() only; - * calls to next() will skip comments automatically. - * The content of the comment can be accessed using the getText() - * method. + * An XML comment was just read. This event type is this token is available via + * nextToken() only; calls to next() will skip comments automatically. The content of the + * comment can be accessed using the getText() method. * * @see #nextToken * @see #getText @@ -305,10 +269,9 @@ public interface XmlPullParser { int COMMENT = 9; /** - * An XML document type declaration was just read. This token is - * available from nextToken() only. - * The unparsed text inside the doctype is available via - * the getText() method. + * An XML document type declaration was just read. This token is available from + * nextToken() only. The unparsed text inside the doctype is available via the getText() + * method. * * @see #nextToken * @see #getText @@ -316,239 +279,192 @@ public interface XmlPullParser { int DOCDECL = 10; /** - * This array can be used to convert the event type integer constants - * such as START_TAG or TEXT to - * to a string. For example, the value of TYPES[START_TAG] is - * the string "START_TAG". - * - * This array is intended for diagnostic output only. Relying - * on the contents of the array may be dangerous since malicious - * applications may alter the array, although it is final, due - * to limitations of the Java language. + * This array can be used to convert the event type integer constants such as START_TAG or TEXT to to a string. For + * example, the value of TYPES[START_TAG] is the string "START_TAG". This array is intended for diagnostic output + * only. Relying on the contents of the array may be dangerous since malicious applications may alter the array, + * although it is final, due to limitations of the Java language. */ - String [] TYPES = { - "START_DOCUMENT", - "END_DOCUMENT", - "START_TAG", - "END_TAG", - "TEXT", - "CDSECT", - "ENTITY_REF", - "IGNORABLE_WHITESPACE", - "PROCESSING_INSTRUCTION", - "COMMENT", - "DOCDECL" - }; - + String[] TYPES = { "START_DOCUMENT", "END_DOCUMENT", "START_TAG", "END_TAG", "TEXT", "CDSECT", "ENTITY_REF", + "IGNORABLE_WHITESPACE", "PROCESSING_INSTRUCTION", "COMMENT", "DOCDECL" }; // ---------------------------------------------------------------------------- // namespace related features /** - * This feature determines whether the parser processes - * namespaces. As for all features, the default value is false. - *

                    NOTE: The value can not be changed during - * parsing an must be set before parsing. + * This feature determines whether the parser processes namespaces. As for all features, the default value is false. + *

                    + * NOTE: The value can not be changed during parsing an must be set before parsing. * * @see #getFeature * @see #setFeature */ - String FEATURE_PROCESS_NAMESPACES = - "http://xmlpull.org/v1/doc/features.html#process-namespaces"; + String FEATURE_PROCESS_NAMESPACES = "http://xmlpull.org/v1/doc/features.html#process-namespaces"; /** - * This feature determines whether namespace attributes are - * exposed via the attribute access methods. Like all features, - * the default value is false. This feature cannot be changed - * during parsing. + * This feature determines whether namespace attributes are exposed via the attribute access methods. Like all + * features, the default value is false. This feature cannot be changed during parsing. * * @see #getFeature * @see #setFeature */ - String FEATURE_REPORT_NAMESPACE_ATTRIBUTES = - "http://xmlpull.org/v1/doc/features.html#report-namespace-prefixes"; + String FEATURE_REPORT_NAMESPACE_ATTRIBUTES = "http://xmlpull.org/v1/doc/features.html#report-namespace-prefixes"; /** - * This feature determines whether the document declaration - * is processed. If set to false, - * the DOCDECL event type is reported by nextToken() - * and ignored by next(). - * - * If this featue is activated, then the document declaration - * must be processed by the parser. - * - *

                    Please note: If the document type declaration - * was ignored, entity references may cause exceptions - * later in the parsing process. - * The default value of this feature is false. It cannot be changed - * during parsing. + * This feature determines whether the document declaration is processed. If set to false, the DOCDECL event type is + * reported by nextToken() and ignored by next(). If this feature is activated, then the document declaration must + * be processed by the parser. + *

                    + * Please note: If the document type declaration was ignored, entity references may cause + * exceptions later in the parsing process. The default value of this feature is false. It cannot be changed during + * parsing. * * @see #getFeature * @see #setFeature */ - String FEATURE_PROCESS_DOCDECL = - "http://xmlpull.org/v1/doc/features.html#process-docdecl"; + String FEATURE_PROCESS_DOCDECL = "http://xmlpull.org/v1/doc/features.html#process-docdecl"; /** - * If this feature is activated, all validation errors as - * defined in the XML 1.0 sepcification are reported. - * This implies that FEATURE_PROCESS_DOCDECL is true and both, the - * internal and external document type declaration will be processed. - *

                    Please Note: This feature can not be changed - * during parsing. The default value is false. + * If this feature is activated, all validation errors as defined in the XML 1.0 specification are reported. This + * implies that FEATURE_PROCESS_DOCDECL is true and both, the internal and external document type declaration will + * be processed. + *

                    + * Please Note: This feature can not be changed during parsing. The default value is false. * * @see #getFeature * @see #setFeature */ - String FEATURE_VALIDATION = - "http://xmlpull.org/v1/doc/features.html#validation"; + String FEATURE_VALIDATION = "http://xmlpull.org/v1/doc/features.html#validation"; /** - * Use this call to change the general behaviour of the parser, - * such as namespace processing or doctype declaration handling. - * This method must be called before the first call to next or - * nextToken. Otherwise, an exception is thrown. - *

                    Example: call setFeature(FEATURE_PROCESS_NAMESPACES, true) in order - * to switch on namespace processing. The initial settings correspond - * to the properties requested from the XML Pull Parser factory. - * If none were requested, all feautures are deactivated by default. - * + * Use this call to change the general behaviour of the parser, such as namespace processing or doctype declaration + * handling. This method must be called before the first call to next or nextToken. Otherwise, an exception is + * thrown. + *

                    + * Example: call setFeature(FEATURE_PROCESS_NAMESPACES, true) in order to switch on namespace processing. The + * initial settings correspond to the properties requested from the XML Pull Parser factory. If none were requested, + * all features are deactivated by default. + * @param name feature name + * @param state feature state * @exception XmlPullParserException If the feature is not supported or can not be set * @exception IllegalArgumentException If string with the feature name is null */ - void setFeature(String name, - boolean state) throws XmlPullParserException; + void setFeature( String name, boolean state ) + throws XmlPullParserException; /** * Returns the current value of the given feature. - *

                    Please note: unknown features are - * always returned as false. + *

                    + * Please note: unknown features are always returned as false. * * @param name The name of feature to be retrieved. * @return The value of the feature. * @exception IllegalArgumentException if string the feature name is null */ - - boolean getFeature(String name); + boolean getFeature( String name ); /** - * Set the value of a property. - * - * The property name is any fully-qualified URI. - * + * Set the value of a property. The property name is any fully-qualified URI. + * @param name property name + * @param value property value * @exception XmlPullParserException If the property is not supported or can not be set * @exception IllegalArgumentException If string with the property name is null + * @throws XmlPullParserException parsing issue */ - void setProperty(String name, - Object value) throws XmlPullParserException; + void setProperty( String name, Object value ) + throws XmlPullParserException; /** - * Look up the value of a property. - * - * The property name is any fully-qualified URI. - *

                    NOTE: unknown properties are always - * returned as null. + * Look up the value of a property. The property name is any fully-qualified URI. + *

                    + * NOTE: unknown properties are always returned as null. * * @param name The name of property to be retrieved. * @return The value of named property. */ - Object getProperty(String name); - + Object getProperty( String name ); /** - * Set the input source for parser to the given reader and - * resets the parser. The event type is set to the initial value - * START_DOCUMENT. - * Setting the reader to null will just stop parsing and - * reset parser state, - * allowing the parser to free internal resources - * such as parsing buffers. + * Set the input source for parser to the given reader and resets the parser. The event type is set to the initial + * value START_DOCUMENT. Setting the reader to null will just stop parsing and reset parser state, allowing the + * parser to free internal resources such as parsing buffers. + * @param in the Reader + * @throws XmlPullParserException parsing issue */ - void setInput(Reader in) throws XmlPullParserException; - + void setInput( Reader in ) + throws XmlPullParserException; /** - * Sets the input stream the parser is going to process. - * This call resets the parser state and sets the event type + * Sets the input stream the parser is going to process. This call resets the parser state and sets the event type * to the initial value START_DOCUMENT. - * - *

                    NOTE: If an input encoding string is passed, - * it MUST be used. Otherwise, - * if inputEncoding is null, the parser SHOULD try to determine - * input encoding following XML 1.0 specification (see below). - * If encoding detection is supported then following feature - * http://xmlpull.org/v1/doc/features.html#detect-encoding - * MUST be true amd otherwise it must be false - * - * @param inputStream contains a raw byte input stream of possibly - * unknown encoding (when inputEncoding is null). - * + *

                    + * NOTE: If an input encoding string is passed, it MUST be used. Otherwise, if inputEncoding is + * null, the parser SHOULD try to determine input encoding following XML 1.0 specification (see below). If encoding + * detection is supported then following feature http://xmlpull.org/v1/doc/features.html#detect-encoding + * MUST be true and otherwise it must be false + * + * @param inputStream contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null). * @param inputEncoding if not null it MUST be used as encoding for inputStream + * @throws XmlPullParserException parsing issue */ - void setInput(InputStream inputStream, String inputEncoding) + void setInput( InputStream inputStream, String inputEncoding ) throws XmlPullParserException; /** - * Returns the input encoding if known, null otherwise. - * If setInput(InputStream, inputEncoding) was called with an inputEncoding - * value other than null, this value must be returned - * from this method. Otherwise, if inputEncoding is null and - * the parser suppports the encoding detection feature - * (http://xmlpull.org/v1/doc/features.html#detect-encoding), - * it must return the detected encoding. - * If setInput(Reader) was called, null is returned. - * After first call to next if XML declaration was present this method - * will return encoding declared. + * @return the input encoding if known, null otherwise. If setInput(InputStream, inputEncoding) was called with an + * inputEncoding value other than null, this value must be returned from this method. Otherwise, if inputEncoding is + * null and the parser supports the encoding detection feature + * (http://xmlpull.org/v1/doc/features.html#detect-encoding), it must return the detected encoding. If + * setInput(Reader) was called, null is returned. After first call to next if XML declaration was present this + * method will return encoding declared. */ String getInputEncoding(); /** * Set new value for entity replacement text as defined in - * XML 1.0 Section 4.5 - * Construction of Internal Entity Replacement Text. - * If FEATURE_PROCESS_DOCDECL or FEATURE_VALIDATION are set, calling this - * function will result in an exception -- when processing of DOCDECL is - * enabled, there is no need to the entity replacement text manually. - * - *

                    The motivation for this function is to allow very small - * implementations of XMLPULL that will work in J2ME environments. - * Though these implementations may not be able to process the document type - * declaration, they still can work with known DTDs by using this function. - * - *

                    Please notes: The given value is used literally as replacement text - * and it corresponds to declaring entity in DTD that has all special characters - * escaped: left angle bracket is replaced with &lt;, ampersnad with &amp; - * and so on. - * - *

                    Note: The given value is the literal replacement text and must not - * contain any other entity reference (if it contains any entity reference - * there will be no further replacement). - * - *

                    Note: The list of pre-defined entity names will - * always contain standard XML entities such as - * amp (&amp;), lt (&lt;), gt (&gt;), quot (&quot;), and apos (&apos;). - * Those cannot be redefined by this method! - * + * XML 1.0 Section 4.5 Construction of Internal Entity + * Replacement Text. If FEATURE_PROCESS_DOCDECL or FEATURE_VALIDATION are set, calling this function will result + * in an exception -- when processing of DOCDECL is enabled, there is no need to the entity replacement text + * manually. + *

                    + * The motivation for this function is to allow very small implementations of XMLPULL that will work in J2ME + * environments. Though these implementations may not be able to process the document type declaration, they still + * can work with known DTDs by using this function. + *

                    + * Please notes: The given value is used literally as replacement text and it corresponds to declaring entity + * in DTD that has all special characters escaped: left angle bracket is replaced with &lt;, ampersand with + * &amp; and so on. + *

                    + * Note: The given value is the literal replacement text and must not contain any other entity reference (if + * it contains any entity reference there will be no further replacement). + *

                    + * Note: The list of pre-defined entity names will always contain standard XML entities such as amp + * (&amp;), lt (&lt;), gt (&gt;), quot (&quot;), and apos (&apos;). Those cannot be redefined by + * this method! + * @param entityName entity name + * @param replacementText remplacement * @see #setInput * @see #FEATURE_PROCESS_DOCDECL * @see #FEATURE_VALIDATION + * @throws XmlPullParserException parsing issue */ - void defineEntityReplacementText( String entityName, - String replacementText ) throws XmlPullParserException; + void defineEntityReplacementText( String entityName, String replacementText ) + throws XmlPullParserException; /** - * Returns the numbers of elements in the namespace stack for the given - * depth. - * If namespaces are not enabled, 0 is returned. - * - *

                    NOTE: when parser is on END_TAG then it is allowed to call - * this function with getDepth()+1 argument to retrieve position of namespace - * prefixes and URIs that were declared on corresponding START_TAG. - *

                    NOTE: to retrieve lsit of namespaces declared in current element:

                    +     * @return the numbers of elements in the namespace stack for the given depth. If namespaces are not enabled, 0 is
                    +     * returned.
                    +     * 

                    + * NOTE: when parser is on END_TAG then it is allowed to call this function with getDepth()+1 argument to + * retrieve position of namespace prefixes and URIs that were declared on corresponding START_TAG. + *

                    + * NOTE: to retrieve lsit of namespaces declared in current element: + * + *

                          *       XmlPullParser pp = ...
                          *       int nsStart = pp.getNamespaceCount(pp.getDepth()-1);
                          *       int nsEnd = pp.getNamespaceCount(pp.getDepth());
                    -     *       for (int i = nsStart; i < nsEnd; i++) {
                    +     *       for (int i = nsStart; i > nsEnd; i++) {
                          *          String prefix = pp.getNamespacePrefix(i);
                          *          String ns = pp.getNamespaceUri(i);
                          *           // ...
                    @@ -559,78 +475,77 @@ void defineEntityReplacementText( String entityName,
                          * @see #getNamespaceUri
                          * @see #getNamespace()
                          * @see #getNamespace(String)
                    +     * @param depth depth
                    +     * @throws XmlPullParserException parsing issue
                          */
                    -    int getNamespaceCount(int depth) throws XmlPullParserException;
                    +    int getNamespaceCount( int depth )
                    +        throws XmlPullParserException;
                     
                         /**
                    -     * Returns the namespace prefixe for the given position
                    -     * in the namespace stack.
                    -     * Default namespace declaration (xmlns='...') will have null as prefix.
                    -     * If the given index is out of range, an exception is thrown.
                    -     * 

                    Please note: when the parser is on an END_TAG, - * namespace prefixes that were declared - * in the corresponding START_TAG are still accessible - * although they are no longer in scope. + * @return Returns the namespace prefix for the given position in the namespace stack. Default namespace declaration + * (xmlns='...') will have null as prefix. If the given index is out of range, an exception is thrown. + * + * Please note: when the parser is on an END_TAG, namespace prefixes that were declared in the corresponding + * START_TAG are still accessible although they are no longer in scope. + * namespace prefix + * @param pos namespace stack position + * @throws XmlPullParserException parsing issue */ - String getNamespacePrefix(int pos) throws XmlPullParserException; + String getNamespacePrefix( int pos ) + throws XmlPullParserException; /** - * Returns the namespace URI for the given position in the - * namespace stack - * If the position is out of range, an exception is thrown. - *

                    NOTE: when parser is on END_TAG then namespace prefixes that were declared - * in corresponding START_TAG are still accessible even though they are not in scope + * @return Returns the namespace URI for the given position in the namespace stack If the position is out of range, an + * exception is thrown. + * + * NOTE: when parser is on END_TAG then namespace prefixes that were declared in corresponding START_TAG are + * still accessible even though they are not in scope + * @throws XmlPullParserException parsing issue + * @param pos namespace stack position */ - String getNamespaceUri(int pos) throws XmlPullParserException; + String getNamespaceUri( int pos ) + throws XmlPullParserException; /** - * Returns the URI corresponding to the given prefix, - * depending on current state of the parser. - * - *

                    If the prefix was not declared in the current scope, - * null is returned. The default namespace is included - * in the namespace table and is available via - * getNamespace (null). - * - *

                    This method is a convenience method for + * @return the URI corresponding to the given prefix, depending on current state of the parser. + *

                    + * If the prefix was not declared in the current scope, null is returned. The default namespace is included in the + * namespace table and is available via getNamespace (null). + *

                    + * This method is a convenience method for * *

                    -     *  for (int i = getNamespaceCount(getDepth ())-1; i >= 0; i--) {
                    -     *   if (getNamespacePrefix(i).equals( prefix )) {
                    -     *     return getNamespaceUri(i);
                    -     *   }
                    -     *  }
                    -     *  return null;
                    +     * for ( int i = getNamespaceCount( getDepth() ) - 1; i >= 0; i-- )
                    +     * {
                    +     *     if ( getNamespacePrefix( i ).equals( prefix ) )
                    +     *     {
                    +     *         return getNamespaceUri( i );
                    +     *     }
                    +     * }
                    +     * return null;
                          * 
                    - * - *

                    Please note: parser implementations - * may provide more efifcient lookup, e.g. using a Hashtable. - * The 'xml' prefix is bound to "http://www.w3.org/XML/1998/namespace", as - * defined in the - * Namespaces in XML - * specification. Analogous, the 'xmlns' prefix is resolved to - * http://www.w3.org/2000/xmlns/ - * + *

                    + * Please note: parser implementations may provide more efficient lookup, e.g. using a Hashtable. + * The 'xml' prefix is bound to "http://www.w3.org/XML/1998/namespace", as defined in the + * Namespaces in XML specification. Analogous, the + * 'xmlns' prefix is resolved to http://www.w3.org/2000/xmlns/ + * @param prefix given prefix * @see #getNamespaceCount * @see #getNamespacePrefix * @see #getNamespaceUri */ - String getNamespace (String prefix); - + String getNamespace( String prefix ); // -------------------------------------------------------------------------- // miscellaneous reporting methods /** - * Returns the current depth of the element. - * Outside the root element, the depth is 0. The - * depth is incremented by 1 when a start tag is reached. - * The depth is decremented AFTER the end tag - * event was observed. + * @return the current depth of the element. Outside the root element, the depth is 0. The depth is incremented by 1 + * when a start tag is reached. The depth is decremented AFTER the end tag event was observed. * *

                          * <!-- outside -->     0
                    -     * <root>                  1
                    +     * <root>                  1
                          *   sometext                 1
                          *     <foobar>         2
                          *     </foobar>        2
                    @@ -641,153 +556,118 @@ void defineEntityReplacementText( String entityName,
                         int getDepth();
                     
                         /**
                    -     * Returns a short text describing the current parser state, including
                    -     * the position, a
                    -     * description of the current event and the data source if known.
                    -     * This method is especially useful to provide meaningful
                    -     * error messages and for debugging purposes.
                    +     * @return a short text describing the current parser state, including the position, a description of the current
                    +     * event and the data source if known. This method is especially useful to provide meaningful error messages and for
                    +     * debugging purposes.
                          */
                    -    String getPositionDescription ();
                    -
                    +    String getPositionDescription();
                     
                         /**
                    -     * Returns the current line number, starting from 1.
                    -     * When the parser does not know the current line number
                    -     * or can not determine it,  -1 is returned (e.g. for WBXML).
                    +     * Returns the current line number, starting from 1. When the parser does not know the current line number or can
                    +     * not determine it, -1 is returned (e.g. for WBXML).
                          *
                          * @return current line number or -1 if unknown.
                          */
                         int getLineNumber();
                     
                         /**
                    -     * Returns the current column number, starting from 0.
                    -     * When the parser does not know the current column number
                    -     * or can not determine it,  -1 is returned (e.g. for WBXML).
                    +     * Returns the current column number, starting from 0. When the parser does not know the current column number or
                    +     * can not determine it, -1 is returned (e.g. for WBXML).
                          *
                          * @return current column number or -1 if unknown.
                          */
                         int getColumnNumber();
                     
                    -
                         // --------------------------------------------------------------------------
                         // TEXT related methods
                     
                         /**
                    -     * Checks whether the current TEXT event contains only whitespace
                    -     * characters.
                    -     * For IGNORABLE_WHITESPACE, this is always true.
                    -     * For TEXT and CDSECT, false is returned when the current event text
                    -     * contains at least one non-white space character. For any other
                    -     * event type an exception is thrown.
                    -     *
                    -     * 

                    Please note: non-validating parsers are not - * able to distinguish whitespace and ignorable whitespace, - * except from whitespace outside the root element. Ignorable - * whitespace is reported as separate event, which is exposed - * via nextToken only. - * + * @return Checks whether the current TEXT event contains only whitespace characters. For IGNORABLE_WHITESPACE, this is + * always true. For TEXT and CDSECT, false is returned when the current event text contains at least one non-white + * space character. For any other event type an exception is thrown. + *

                    + * Please note: non-validating parsers are not able to distinguish whitespace and ignorable whitespace, + * except from whitespace outside the root element. Ignorable whitespace is reported as separate event, which is + * exposed via nextToken only. + * @throws XmlPullParserException parsing issue */ - boolean isWhitespace() throws XmlPullParserException; + boolean isWhitespace() + throws XmlPullParserException; /** - * Returns the text content of the current event as String. - * The value returned depends on current event type, - * for example for TEXT event it is element content - * (this is typical case when next() is used). - * - * See description of nextToken() for detailed description of - * possible returned values for different types of events. - * - *

                    NOTE: in case of ENTITY_REF, this method returns - * the entity replacement text (or null if not available). This is - * the only case where - * getText() and getTextCharacters() return different values. + * @return the text content of the current event as String. The value returned depends on current event type, for + * example for TEXT event it is element content (this is typical case when next() is used). See description of + * nextToken() for detailed description of possible returned values for different types of events. + *

                    + * NOTE: in case of ENTITY_REF, this method returns the entity replacement text (or null if not + * available). This is the only case where getText() and getTextCharacters() return different values. * * @see #getEventType * @see #next * @see #nextToken */ - String getText (); - + String getText(); /** - * Returns the buffer that contains the text of the current event, - * as well as the start offset and length relevant for the current - * event. See getText(), next() and nextToken() for description of possible returned values. - * - *

                    Please note: this buffer must not - * be modified and its content MAY change after a call to - * next() or nextToken(). This method will always return the - * same value as getText(), except for ENTITY_REF. In the case - * of ENTITY ref, getText() returns the replacement text and - * this method returns the actual input buffer containing the - * entity name. - * If getText() returns null, this method returns null as well and - * the values returned in the holder array MUST be -1 (both start - * and length). + * Returns the buffer that contains the text of the current event, as well as the start offset and length relevant + * for the current event. See getText(), next() and nextToken() for description of possible returned values. + *

                    + * Please note: this buffer must not be modified and its content MAY change after a call to next() + * or nextToken(). This method will always return the same value as getText(), except for ENTITY_REF. In the case of + * ENTITY ref, getText() returns the replacement text and this method returns the actual input buffer containing the + * entity name. If getText() returns null, this method returns null as well and the values returned in the holder + * array MUST be -1 (both start and length). * * @see #getText * @see #next * @see #nextToken - * - * @param holderForStartAndLength Must hold an 2-element int array - * into which the start offset and length values will be written. - * @return char buffer that contains the text of the current event - * (null if the current event has no text associated). + * @param holderForStartAndLength Must hold an 2-element int array into which the start offset and length values + * will be written. + * @return char buffer that contains the text of the current event (null if the current event has no text + * associated). */ - char[] getTextCharacters(int [] holderForStartAndLength); + char[] getTextCharacters( int[] holderForStartAndLength ); // -------------------------------------------------------------------------- // START_TAG / END_TAG shared methods /** - * Returns the namespace URI of the current element. - * The default namespace is represented - * as empty string. - * If namespaces are not enabled, an empty String ("") is always returned. - * The current event must be START_TAG or END_TAG; otherwise, - * null is returned. + * @return the namespace URI of the current element. The default namespace is represented as empty string. If + * namespaces are not enabled, an empty String ("") is always returned. The current event must be START_TAG or + * END_TAG; otherwise, null is returned. */ - String getNamespace (); + String getNamespace(); /** - * For START_TAG or END_TAG events, the (local) name of the current - * element is returned when namespaces are enabled. When namespace - * processing is disabled, the raw name is returned. - * For ENTITY_REF events, the entity name is returned. - * If the current event is not START_TAG, END_TAG, or ENTITY_REF, - * null is returned. - *

                    Please note: To reconstruct the raw element name - * when namespaces are enabled and the prefix is not null, - * you will need to add the prefix and a colon to localName.. - * + * @return For START_TAG or END_TAG events, the (local) name of the current element is returned when namespaces are enabled. + * When namespace processing is disabled, the raw name is returned. For ENTITY_REF events, the entity name is + * returned. If the current event is not START_TAG, END_TAG, or ENTITY_REF, null is returned. + *

                    + * Please note: To reconstruct the raw element name when namespaces are enabled and the prefix is not null, + * you will need to add the prefix and a colon to localName.. */ String getName(); /** - * Returns the prefix of the current element. - * If the element is in the default namespace (has no prefix), - * null is returned. - * If namespaces are not enabled, or the current event - * is not START_TAG or END_TAG, null is returned. + * @return the prefix of the current element. If the element is in the default namespace (has no prefix), null is + * returned. If namespaces are not enabled, or the current event is not START_TAG or END_TAG, null is returned. */ String getPrefix(); /** - * Returns true if the current event is START_TAG and the tag - * is degenerated - * (e.g. <foobar/>). - *

                    NOTE: if the parser is not on START_TAG, an exception - * will be thrown. + * @return true if the current event is START_TAG and the tag is degenerated (e.g. <foobar/>). + *

                    + * NOTE: if the parser is not on START_TAG, an exception will be thrown. + * @throws XmlPullParserException parsing issue */ - boolean isEmptyElementTag() throws XmlPullParserException; + boolean isEmptyElementTag() + throws XmlPullParserException; // -------------------------------------------------------------------------- // START_TAG Attributes retrieval methods /** - * Returns the number of attributes of the current start tag, or - * -1 if the current event type is not START_TAG + * @return the number of attributes of the current start tag, or -1 if the current event type is not START_TAG * * @see #getAttributeNamespace * @see #getAttributeName @@ -797,220 +677,203 @@ void defineEntityReplacementText( String entityName, int getAttributeCount(); /** - * Returns the namespace URI of the attribute - * with the given index (starts from 0). - * Returns an empty string ("") if namespaces are not enabled - * or the attribute has no namespace. - * Throws an IndexOutOfBoundsException if the index is out of range - * or the current event type is not START_TAG. - * - *

                    NOTE: if FEATURE_REPORT_NAMESPACE_ATTRIBUTES is set - * then namespace attributes (xmlns:ns='...') must be reported - * with namespace - * http://www.w3.org/2000/xmlns/ - * (visit this URL for description!). - * The default namespace attribute (xmlns="...") will be reported with empty namespace. - *

                    NOTE:The xml prefix is bound as defined in - * Namespaces in XML - * specification to "http://www.w3.org/XML/1998/namespace". + * Returns the namespace URI of the attribute with the given index (starts from 0). Returns an empty string ("") if + * namespaces are not enabled or the attribute has no namespace. Throws an IndexOutOfBoundsException if the index is + * out of range or the current event type is not START_TAG. + *

                    + * NOTE: if FEATURE_REPORT_NAMESPACE_ATTRIBUTES is set then namespace attributes (xmlns:ns='...') + * must be reported with namespace http://www.w3.org/2000/xmlns/ (visit + * this URL for description!). The default namespace attribute (xmlns="...") will be reported with empty namespace. + *

                    + * NOTE:The xml prefix is bound as defined in + * Namespaces in XML specification to + * "http://www.w3.org/XML/1998/namespace". * * @param index zero based index of attribute - * @return attribute namespace, - * empty string ("") is returned if namesapces processing is not enabled or - * namespaces processing is enabled but attribute has no namespace (it has no prefix). + * @return attribute namespace, empty string ("") is returned if namespaces processing is not enabled or namespaces + * processing is enabled but attribute has no namespace (it has no prefix). */ - String getAttributeNamespace (int index); + String getAttributeNamespace( int index ); /** - * Returns the local name of the specified attribute - * if namespaces are enabled or just attribute name if namespaces are disabled. - * Throws an IndexOutOfBoundsException if the index is out of range - * or current event type is not START_TAG. + * Returns the local name of the specified attribute if namespaces are enabled or just attribute name if namespaces + * are disabled. Throws an IndexOutOfBoundsException if the index is out of range or current event type is not + * START_TAG. * * @param index zero based index of attribute * @return attribute name (null is never returned) */ - String getAttributeName (int index); + String getAttributeName( int index ); /** - * Returns the prefix of the specified attribute - * Returns null if the element has no prefix. - * If namespaces are disabled it will always return null. - * Throws an IndexOutOfBoundsException if the index is out of range - * or current event type is not START_TAG. + * Returns the prefix of the specified attribute Returns null if the element has no prefix. If namespaces are + * disabled it will always return null. Throws an IndexOutOfBoundsException if the index is out of range or current + * event type is not START_TAG. * * @param index zero based index of attribute * @return attribute prefix or null if namespaces processing is not enabled. */ - String getAttributePrefix(int index); + String getAttributePrefix( int index ); /** - * Returns the type of the specified attribute - * If parser is non-validating it MUST return CDATA. + * Returns the type of the specified attribute If parser is non-validating it MUST return CDATA. * * @param index zero based index of attribute * @return attribute type (null is never returned) */ - String getAttributeType(int index); + String getAttributeType( int index ); /** - * Returns if the specified attribute was not in input was declared in XML. - * If parser is non-validating it MUST always return false. - * This information is part of XML infoset: + * Returns if the specified attribute was not in input was declared in XML. If parser is non-validating it MUST + * always return false. This information is part of XML infoset: * * @param index zero based index of attribute * @return false if attribute was in input */ - boolean isAttributeDefault(int index); + boolean isAttributeDefault( int index ); /** - * Returns the given attributes value. - * Throws an IndexOutOfBoundsException if the index is out of range - * or current event type is not START_TAG. - * - *

                    NOTE: attribute value must be normalized - * (including entity replacement text if PROCESS_DOCDECL is false) as described in - * XML 1.0 section - * 3.3.3 Attribute-Value Normalization + * Returns the given attributes value. Throws an IndexOutOfBoundsException if the index is out of range or current + * event type is not START_TAG. + *

                    + * NOTE: attribute value must be normalized (including entity replacement text if PROCESS_DOCDECL + * is false) as described in XML 1.0 section 3.3.3 + * Attribute-Value Normalization * * @see #defineEntityReplacementText - * * @param index zero based index of attribute * @return value of attribute (null is never returned) */ - String getAttributeValue(int index); + String getAttributeValue( int index ); /** - * Returns the attributes value identified by namespace URI and namespace localName. - * If namespaces are disabled namespace must be null. - * If current event type is not START_TAG then IndexOutOfBoundsException will be thrown. - * - *

                    NOTE: attribute value must be normalized - * (including entity replacement text if PROCESS_DOCDECL is false) as described in - * XML 1.0 section - * 3.3.3 Attribute-Value Normalization + * Returns the attributes value identified by namespace URI and namespace localName. If namespaces are disabled + * namespace must be null. If current event type is not START_TAG then IndexOutOfBoundsException will be thrown. + *

                    + * NOTE: attribute value must be normalized (including entity replacement text if PROCESS_DOCDECL + * is false) as described in XML 1.0 section 3.3.3 + * Attribute-Value Normalization * * @see #defineEntityReplacementText - * * @param namespace Namespace of the attribute if namespaces are enabled otherwise must be null * @param name If namespaces enabled local name of attribute otherwise just attribute name * @return value of attribute or null if attribute with given name does not exist */ - String getAttributeValue(String namespace, - String name); + String getAttributeValue( String namespace, String name ); // -------------------------------------------------------------------------- // actual parsing methods /** - * Returns the type of the current event (START_TAG, END_TAG, TEXT, etc.) + * @return the type of the current event (START_TAG, END_TAG, TEXT, etc.) * * @see #next() * @see #nextToken() + * @throws XmlPullParserException parsing issue */ int getEventType() throws XmlPullParserException; /** - * Get next parsing event - element content wil be coalesced and only one - * TEXT event must be returned for whole element content - * (comments and processing instructions will be ignored and emtity references - * must be expanded or exception mus be thrown if entity reerence can not be exapnded). - * If element content is empty (content is "") then no TEXT event will be reported. - * - *

                    NOTE: empty element (such as <tag/>) will be reported - * with two separate events: START_TAG, END_TAG - it must be so to preserve - * parsing equivalency of empty element to <tag></tag>. - * (see isEmptyElementTag ()) + * @return Get next parsing event - element content wil be coalesced and only one TEXT event must be returned for whole + * element content (comments and processing instructions will be ignored and entity references must be expanded or + * exception mus be thrown if entity reference can not be expanded). If element content is empty (content is "") + * then no TEXT event will be reported. + *

                    + * NOTE: empty element (such as <tag/>) will be reported with two separate events: START_TAG, END_TAG - it + * must be so to preserve parsing equivalency of empty element to <tag></tag>. (see isEmptyElementTag ()) * * @see #isEmptyElementTag * @see #START_TAG * @see #TEXT * @see #END_TAG * @see #END_DOCUMENT + * @throws XmlPullParserException parsing issue + * @throws IOException io issue */ - int next() throws XmlPullParserException, IOException; - /** - * This method works similarly to next() but will expose - * additional event types (COMMENT, CDSECT, DOCDECL, ENTITY_REF, PROCESSING_INSTRUCTION, or - * IGNORABLE_WHITESPACE) if they are available in input. - * - *

                    If special feature - * FEATURE_XML_ROUNDTRIP - * (identified by URI: http://xmlpull.org/v1/doc/features.html#xml-roundtrip) - * is enabled it is possible to do XML document round trip ie. reproduce - * exectly on output the XML input using getText(): - * returned content is always unnormalized (exactly as in input). - * Otherwise returned content is end-of-line normalized as described - * XML 1.0 End-of-Line Handling - * and. Also when this feature is enabled exact content of START_TAG, END_TAG, - * DOCDECL and PROCESSING_INSTRUCTION is available. - * - *

                    Here is the list of tokens that can be returned from nextToken() - * and what getText() and getTextCharacters() returns:

                    - *
                    START_DOCUMENT
                    null - *
                    END_DOCUMENT
                    null - *
                    START_TAG
                    null unless FEATURE_XML_ROUNDTRIP - * enabled and then returns XML tag, ex: <tag attr='val'> - *
                    END_TAG
                    null unless FEATURE_XML_ROUNDTRIP - * id enabled and then returns XML tag, ex: </tag> - *
                    TEXT
                    return element content. - *
                    Note: that element content may be delivered in multiple consecutive TEXT events. - *
                    IGNORABLE_WHITESPACE
                    return characters that are determined to be ignorable white - * space. If the FEATURE_XML_ROUNDTRIP is enabled all whitespace content outside root - * element will always reported as IGNORABLE_WHITESPACE otherise rteporting is optional. - *
                    Note: that element content may be delevered in multiple consecutive IGNORABLE_WHITESPACE events. - *
                    CDSECT
                    - * return text inside CDATA - * (ex. 'fo<o' from <!CDATA[fo<o]]>) - *
                    PROCESSING_INSTRUCTION
                    - * if FEATURE_XML_ROUNDTRIP is true - * return exact PI content ex: 'pi foo' from <?pi foo?> - * otherwise it may be exact PI content or concatenation of PI target, - * space and data so for example for - * <?target data?> string "target data" may - * be returned if FEATURE_XML_ROUNDTRIP is false. - *
                    COMMENT
                    return comment content ex. 'foo bar' from <!--foo bar--> - *
                    ENTITY_REF
                    getText() MUST return entity replacement text if PROCESS_DOCDECL is false - * otherwise getText() MAY return null, - * additionally getTextCharacters() MUST return entity name - * (for example 'entity_name' for &entity_name;). - *
                    NOTE: this is the only place where value returned from getText() and - * getTextCharacters() are different - *
                    NOTE: it is user responsibility to resolve entity reference - * if PROCESS_DOCDECL is false and there is no entity replacement text set in - * defineEntityReplacementText() method (getText() will be null) - *
                    NOTE: character entities (ex. &#32;) and standard entities such as - * &amp; &lt; &gt; &quot; &apos; are reported as well - * and are not reported as TEXT tokens but as ENTITY_REF tokens! - * This requirement is added to allow to do roundtrip of XML documents! - *
                    DOCDECL
                    - * if FEATURE_XML_ROUNDTRIP is true or PROCESS_DOCDECL is false - * then return what is inside of DOCDECL for example it returns:
                    +     * This method works similarly to next() but will expose additional event types (COMMENT, CDSECT, DOCDECL,
                    +     * ENTITY_REF, PROCESSING_INSTRUCTION, or IGNORABLE_WHITESPACE) if they are available in input.
                    +     * 

                    + * If special feature FEATURE_XML_ROUNDTRIP + * (identified by URI: http://xmlpull.org/v1/doc/features.html#xml-roundtrip) is enabled it is possible to do XML + * document round trip ie. reproduce exactly on output the XML input using getText(): returned content is always + * unnormalized (exactly as in input). Otherwise returned content is end-of-line normalized as described + * XML 1.0 End-of-Line Handling and. Also when this feature + * is enabled exact content of START_TAG, END_TAG, DOCDECL and PROCESSING_INSTRUCTION is available. + *

                    + * Here is the list of tokens that can be returned from nextToken() and what getText() and getTextCharacters() + * @return + *

                    + *
                    START_DOCUMENT + *
                    null + *
                    END_DOCUMENT + *
                    null + *
                    START_TAG + *
                    null unless FEATURE_XML_ROUNDTRIP enabled and then returns XML tag, ex: <tag attr='val'> + *
                    END_TAG + *
                    null unless FEATURE_XML_ROUNDTRIP id enabled and then returns XML tag, ex: </tag> + *
                    TEXT + *
                    return element content.
                    + * Note: that element content may be delivered in multiple consecutive TEXT events. + *
                    IGNORABLE_WHITESPACE + *
                    return characters that are determined to be ignorable white space. If the FEATURE_XML_ROUNDTRIP is enabled + * all whitespace content outside root element will always reported as IGNORABLE_WHITESPACE otherwise reporting is + * optional.
                    + * Note: that element content may be delivered in multiple consecutive IGNORABLE_WHITESPACE events. + *
                    CDSECT + *
                    return text inside CDATA (ex. 'fo<o' from <!CDATA[fo<o]]>) + *
                    PROCESSING_INSTRUCTION + *
                    if FEATURE_XML_ROUNDTRIP is true return exact PI content ex: 'pi foo' from <?pi foo?> otherwise it may be + * exact PI content or concatenation of PI target, space and data so for example for <?target data?> string + * "target data" may be returned if FEATURE_XML_ROUNDTRIP is false. + *
                    COMMENT + *
                    return comment content ex. 'foo bar' from <!--foo bar--> + *
                    ENTITY_REF + *
                    getText() MUST return entity replacement text if PROCESS_DOCDECL is false otherwise getText() MAY return + * null, additionally getTextCharacters() MUST return entity name (for example 'entity_name' for &entity_name;). + *
                    + * NOTE: this is the only place where value returned from getText() and getTextCharacters() are + * different
                    + * NOTE: it is user responsibility to resolve entity reference if PROCESS_DOCDECL is false and there is no + * entity replacement text set in defineEntityReplacementText() method (getText() will be null)
                    + * NOTE: character entities (ex. &#32;) and standard entities such as &amp; &lt; &gt; + * &quot; &apos; are reported as well and are not reported as TEXT tokens but as ENTITY_REF tokens! + * This requirement is added to allow to do roundtrip of XML documents! + *
                    DOCDECL + *
                    if FEATURE_XML_ROUNDTRIP is true or PROCESS_DOCDECL is false then return what is inside of DOCDECL for + * example it returns: + * + *
                          * " titlepage SYSTEM "http://www.foo.bar/dtds/typo.dtd"
                    -     * [<!ENTITY % active.links "INCLUDE">]"
                    - *

                    for input document that contained:

                    +     * [<!ENTITY % active.links "INCLUDE">]"
                    +     * 
                    + *

                    + * for input document that contained: + * + *

                          * <!DOCTYPE titlepage SYSTEM "http://www.foo.bar/dtds/typo.dtd"
                    -     * [<!ENTITY % active.links "INCLUDE">]>
                    - * otherwise if FEATURE_XML_ROUNDTRIP is false and PROCESS_DOCDECL is true - * then what is returned is undefined (it may be even null) - *
                    + * [<!ENTITY % active.links "INCLUDE">]> + *
                    + * + * otherwise if FEATURE_XML_ROUNDTRIP is false and PROCESS_DOCDECL is true then what is returned is undefined (it + * may be even null)
                    *
                    - * - *

                    NOTE: there is no gurantee that there will only one TEXT or - * IGNORABLE_WHITESPACE event from nextToken() as parser may chose to deliver element content in - * multiple tokens (dividing element content into chunks) - * - *

                    NOTE: whether returned text of token is end-of-line normalized - * is depending on FEATURE_XML_ROUNDTRIP. - * - *

                    NOTE: XMLDecl (<?xml ...?>) is not reported but its content - * is available through optional properties (see class description above). - * + *

                    + * NOTE: there is no guarantee that there will only one TEXT or IGNORABLE_WHITESPACE event from + * nextToken() as parser may chose to deliver element content in multiple tokens (dividing element content into + * chunks) + *

                    + * NOTE: whether returned text of token is end-of-line normalized is depending on + * FEATURE_XML_ROUNDTRIP. + *

                    + * NOTE: XMLDecl (<?xml ...?>) is not reported but its content is available through optional + * properties (see class description above). + * @throws XmlPullParserException parsing issue + * @throws IOException io issue * @see #next * @see #START_TAG * @see #TEXT @@ -1025,91 +888,108 @@ int next() int nextToken() throws XmlPullParserException, IOException; - //----------------------------------------------------------------------------- + // ----------------------------------------------------------------------------- // utility methods to mak XML parsing easier ... /** - * Test if the current event is of the given type and if the - * namespace and name do match. null will match any namespace - * and any name. If the test is not passed, an exception is - * thrown. The exception text indicates the parser position, - * the expected event and the current event that is not meeting the - * requirement. - * - *

                    Essentially it does this + * Test if the current event is of the given type and if the namespace and name do match. null will match any + * namespace and any name. If the test is not passed, an exception is thrown. The exception text indicates the + * parser position, the expected event and the current event that is not meeting the requirement. + *

                    + * Essentially it does this + * *

                    -     *  if (type != getEventType()
                    -     *  || (namespace != null &&  !namespace.equals( getNamespace () ) )
                    -     *  || (name != null &&  !name.equals( getName() ) ) )
                    -     *     throw new XmlPullParserException( "expected "+ TYPES[ type ]+getPositionDescription());
                    +     * if ( type != getEventType() || ( namespace != null && !namespace.equals( getNamespace() ) )
                    +     *     || ( name != null && !name.equals( getName() ) ) )
                    +     *     throw new XmlPullParserException( "expected " + TYPES[type] + getPositionDescription() );
                          * 
                    + * @param type type + * @param name name + * @param namespace namespace + * @throws XmlPullParserException parsing issue + * @throws IOException io issue */ - void require(int type, String namespace, String name) + void require( int type, String namespace, String name ) throws XmlPullParserException, IOException; /** - * If current event is START_TAG then if next element is TEXT then element content is returned - * or if next event is END_TAG then empty string is returned, otherwise exception is thrown. - * After calling this function successfully parser will be positioned on END_TAG. - * - *

                    The motivation for this function is to allow to parse consistently both - * empty elements and elements that has non empty content, for example for input:

                      + * If current event is START_TAG then if next element is TEXT then element content is returned or if next event is + * END_TAG then empty string is returned, otherwise exception is thrown. After calling this function successfully + * parser will be positioned on END_TAG. + *

                      + * The motivation for this function is to allow to parse consistently both empty elements and elements that has non + * empty content, for example for input: + *

                        *
                      1. <tag>foo</tag> - *
                      2. <tag></tag> (which is equivalent to <tag/> - * both input can be parsed with the same code: + *
                      3. <tag></tag> (which is equivalent to <tag/> both input can be parsed with the same code: + * *
                              *   p.nextTag()
                              *   p.requireEvent(p.START_TAG, "", "tag");
                              *   String content = p.nextText();
                              *   p.requireEvent(p.END_TAG, "", "tag");
                        -     * 
                        - * This function together with nextTag make it very easy to parse XML that has - * no mixed content. - * - * - *

                        Essentially it does this + *

                  • + * + * This function together with nextTag make it very easy to parse XML that has no mixed content. + *

                    + * Essentially it does this + * *

                    -     *  if(getEventType() != START_TAG) {
                    -     *     throw new XmlPullParserException(
                    -     *       "parser must be on START_TAG to read next text", this, null);
                    -     *  }
                    -     *  int eventType = next();
                    -     *  if(eventType == TEXT) {
                    +     * if ( getEventType() != START_TAG )
                    +     * {
                    +     *     throw new XmlPullParserException( "parser must be on START_TAG to read next text", this, null );
                    +     * }
                    +     * int eventType = next();
                    +     * if ( eventType == TEXT )
                    +     * {
                          *     String result = getText();
                          *     eventType = next();
                    -     *     if(eventType != END_TAG) {
                    -     *       throw new XmlPullParserException(
                    -     *          "event TEXT it must be immediately followed by END_TAG", this, null);
                    -     *      }
                    -     *      return result;
                    -     *  } else if(eventType == END_TAG) {
                    +     *     if ( eventType != END_TAG )
                    +     *     {
                    +     *         throw new XmlPullParserException( "event TEXT it must be immediately followed by END_TAG", this, null );
                    +     *     }
                    +     *     return result;
                    +     * }
                    +     * else if ( eventType == END_TAG )
                    +     * {
                          *     return "";
                    -     *  } else {
                    -     *     throw new XmlPullParserException(
                    -     *       "parser must be on START_TAG or TEXT to read text", this, null);
                    -     *  }
                    +     * }
                    +     * else
                    +     * {
                    +     *     throw new XmlPullParserException( "parser must be on START_TAG or TEXT to read text", this, null );
                    +     * }
                          * 
                    + * @return see description + * @throws XmlPullParserException parsing issue + * @throws IOException io issue */ - String nextText() throws XmlPullParserException, IOException; + String nextText() + throws XmlPullParserException, IOException; /** - * Call next() and return event if it is START_TAG or END_TAG - * otherwise throw an exception. - * It will skip whitespace TEXT before actual tag if any. - * - *

                    essentially it does this + * Call next() and return event if it is START_TAG or END_TAG otherwise throw an exception. It will skip whitespace + * TEXT before actual tag if any. + *

                    + * essentially it does this + * *

                    -     *   int eventType = next();
                    -     *   if(eventType == TEXT &&  isWhitespace()) {   // skip whitespace
                    -     *      eventType = next();
                    -     *   }
                    -     *   if (eventType != START_TAG &&  eventType != END_TAG) {
                    -     *      throw new XmlPullParserException("expected start or end tag", this, null);
                    -     *   }
                    -     *   return eventType;
                    +     * int eventType = next();
                    +     * if ( eventType == TEXT && isWhitespace() )
                    +     * { // skip whitespace
                    +     *     eventType = next();
                    +     * }
                    +     * if ( eventType != START_TAG && eventType != END_TAG )
                    +     * {
                    +     *     throw new XmlPullParserException( "expected start or end tag", this, null );
                    +     * }
                    +     * return eventType;
                          * 
                    + * @return see description + * @throws XmlPullParserException parsing issue + * @throws + * IOException io issue */ - int nextTag() throws XmlPullParserException, IOException; + int nextTag() + throws XmlPullParserException, IOException; } - diff --git a/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParserException.java b/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParserException.java index 9dcd8395..ff23754f 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParserException.java +++ b/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParserException.java @@ -8,69 +8,89 @@ * * @author Aleksander Slominski */ -public class XmlPullParserException extends Exception { +public class XmlPullParserException + extends Exception +{ + /** + * @deprecated use generic getCause() method + */ + @Deprecated protected Throwable detail; + protected int row = -1; + protected int column = -1; - /* public XmlPullParserException() { - }*/ + /* + * public XmlPullParserException() { } + */ - public XmlPullParserException(String s) { - super(s); + public XmlPullParserException( String s ) + { + super( s ); } /* - public XmlPullParserException(String s, Throwable thrwble) { - super(s); - this.detail = thrwble; - } + * public XmlPullParserException(String s, Throwable throwable) { super(s); this.detail = throwable; } public + * XmlPullParserException(String s, int row, int column) { super(s); this.row = row; this.column = column; } + */ - public XmlPullParserException(String s, int row, int column) { - super(s); - this.row = row; - this.column = column; - } - */ - - public XmlPullParserException(String msg, XmlPullParser parser, Throwable chain) { - super ((msg == null ? "" : msg+" ") - + (parser == null ? "" : "(position:"+parser.getPositionDescription()+") ") - + (chain == null ? "" : "caused by: "+chain)); + public XmlPullParserException( String msg, XmlPullParser parser, Throwable chain ) + { + super( ( msg == null ? "" : msg + " " ) + + ( parser == null ? "" : "(position:" + parser.getPositionDescription() + ") " ) + + ( chain == null ? "" : "caused by: " + chain ), chain ); - if (parser != null) { + if ( parser != null ) + { this.row = parser.getLineNumber(); this.column = parser.getColumnNumber(); } this.detail = chain; } - public Throwable getDetail() { return detail; } - // public void setDetail(Throwable cause) { this.detail = cause; } - public int getLineNumber() { return row; } - public int getColumnNumber() { return column; } + /** + * @deprecated Use the generic getCause() method + * @return the cause + */ + @Deprecated + public Throwable getDetail() + { + return getCause(); + } - /* - public String getMessage() { - if(detail == null) - return super.getMessage(); - else - return super.getMessage() + "; nested exception is: \n\t" - + detail.getMessage(); + // public void setDetail(Throwable cause) { this.detail = cause; } + public int getLineNumber() + { + return row; + } + + public int getColumnNumber() + { + return column; } - */ - //NOTE: code that prints this and detail is difficult in J2ME - public void printStackTrace() { - if (detail == null) { + /* + * public String getMessage() { if(detail == null) return super.getMessage(); else return super.getMessage() + + * "; nested exception is: \n\t" + detail.getMessage(); } + */ + + // NOTE: code that prints this and detail is difficult in J2ME + @Override + public void printStackTrace() + { + if ( getCause() == null ) + { super.printStackTrace(); - } else { - synchronized(System.err) { - System.err.println(super.getMessage() + "; nested exception is:"); - detail.printStackTrace(); + } + else + { + synchronized ( System.err ) + { + System.err.println( super.getMessage() + "; nested exception is:" ); + getCause().printStackTrace(); } } } } - diff --git a/src/main/java/org/codehaus/plexus/util/xml/pull/XmlSerializer.java b/src/main/java/org/codehaus/plexus/util/xml/pull/XmlSerializer.java index 9ab332d8..46ef492f 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/pull/XmlSerializer.java +++ b/src/main/java/org/codehaus/plexus/util/xml/pull/XmlSerializer.java @@ -8,161 +8,161 @@ import java.io.Writer; /** - * Define an interface to serialization of XML Infoset. - * This interface abstracts away if serialized XML is XML 1.0 compatible text or - * other formats of XML 1.0 serializations (such as binary XML for example with WBXML). - * - *

                    PLEASE NOTE: This interface will be part of XmlPull 1.2 API. - * It is included as basis for discussion. It may change in any way. - * - *

                    Exceptions that may be thrown are: IOException or runtime exception - * (more runtime exceptions can be thrown but are not declared and as such - * have no semantics defined for this interface): + * Define an interface to serialization of XML Infoset. This interface abstracts away if serialized XML is XML 1.0 + * compatible text or other formats of XML 1.0 serializations (such as binary XML for example with WBXML). + *

                    + * PLEASE NOTE: This interface will be part of XmlPull 1.2 API. It is included as basis for discussion. It may + * change in any way. + *

                    + * Exceptions that may be thrown are: IOException or runtime exception (more runtime exceptions can be thrown but are + * not declared and as such have no semantics defined for this interface): *

                      - *
                    • IllegalArgumentException - for almost all methods to signal that - * argument is illegal - *
                    • IllegalStateException - to signal that call has good arguments but - * is not expected here (violation of contract) and for features/properties - * when requesting setting unimplemented feature/property - * (UnsupportedOperationException would be better but it is not in MIDP) - *
                    - * - *

                    NOTE: writing CDSECT, ENTITY_REF, IGNORABLE_WHITESPACE, - * PROCESSING_INSTRUCTION, COMMENT, and DOCDECL in some implementations - * may not be supported (for example when serializing to WBXML). - * In such case IllegalStateException will be thrown and it is recommended - * to use an optional feature to signal that implementation is not - * supporting this kind of output. + *

                  • IllegalArgumentException - for almost all methods to signal that argument is illegal + *
                  • IllegalStateException - to signal that call has good arguments but is not expected here (violation of + * contract) and for features/properties when requesting setting unimplemented feature/property + * (UnsupportedOperationException would be better but it is not in MIDP) + *
                  + *

                  + * NOTE: writing CDSECT, ENTITY_REF, IGNORABLE_WHITESPACE, PROCESSING_INSTRUCTION, COMMENT, and DOCDECL in some + * implementations may not be supported (for example when serializing to WBXML). In such case IllegalStateException will + * be thrown and it is recommended to use an optional feature to signal that implementation is not supporting this kind + * of output. */ -public interface XmlSerializer { +public interface XmlSerializer +{ /** - * Set feature identified by name (recommended to be URI for uniqueness). - * Some well known optional features are defined in - * - * http://www.xmlpull.org/v1/doc/features.html. - * - * If feature is not recognized or can not be set - * then IllegalStateException MUST be thrown. - * + * Set feature identified by name (recommended to be URI for uniqueness). Some well known optional features are + * defined in + * http://www.xmlpull.org/v1/doc/features.html. If feature is not recognized or can not be set then + * IllegalStateException MUST be thrown. + * @param name feature name + * @param state feature state * @exception IllegalStateException If the feature is not supported or can not be set */ - void setFeature(String name, - boolean state) + void setFeature( String name, boolean state ) throws IllegalArgumentException, IllegalStateException; - /** * Return the current value of the feature with given name. - *

                  NOTE: unknown properties are always returned as null + *

                  + * NOTE: unknown properties are always returned as null * * @param name The name of feature to be retrieved. * @return The value of named feature. * @exception IllegalArgumentException if feature string is null */ - boolean getFeature(String name); - + boolean getFeature( String name ); /** - * Set the value of a property. - * (the property name is recommended to be URI for uniqueness). - * Some well known optional properties are defined in - * - * http://www.xmlpull.org/v1/doc/properties.html. - * - * If property is not recognized or can not be set - * then IllegalStateException MUST be thrown. - * + * Set the value of a property. (the property name is recommended to be URI for uniqueness). Some well known + * optional properties are defined in + * http://www.xmlpull.org/v1/doc/properties.html. If property is not recognized or can not be set then + * IllegalStateException MUST be thrown. + * @param name property name + * @param value property value * @exception IllegalStateException if the property is not supported or can not be set */ - void setProperty(String name, - Object value) + void setProperty( String name, Object value ) throws IllegalArgumentException, IllegalStateException; /** - * Look up the value of a property. - * - * The property name is any fully-qualified URI. I - *

                  NOTE: unknown properties are always returned as null + * Look up the value of a property. The property name is any fully-qualified URI. I + *

                  + * NOTE: unknown properties are always returned as null * * @param name The name of property to be retrieved. * @return The value of named property. */ - Object getProperty(String name); + Object getProperty( String name ); /** * Set to use binary output stream with given encoding. + * @param os out + * @param encoding encoding + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ - void setOutput (OutputStream os, String encoding) + void setOutput( OutputStream os, String encoding ) throws IOException, IllegalArgumentException, IllegalStateException; /** - * Set the output to the given writer. - *

                  WARNING no information about encoding is available! + * @param writer Set the output to the given writer. + *

                  + * WARNING no information about encoding is available! + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ - void setOutput (Writer writer) + void setOutput( Writer writer ) throws IOException, IllegalArgumentException, IllegalStateException; /** - * Write <?xml declaration with encoding (if encoding not null) - * and standalone flag (if standalone not null) + * Write <?xml declaration with encoding (if encoding not null) and standalone flag (if standalone not null) * This method can only be called just after setOutput. + * @param encoding document encoding + * @param standalone standalone flag value + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ - void startDocument (String encoding, Boolean standalone) + void startDocument( String encoding, Boolean standalone ) throws IOException, IllegalArgumentException, IllegalStateException; /** - * Finish writing. All unclosed start tags will be closed and output - * will be flushed. After calling this method no more output can be - * serialized until next call to setOutput() + * Finish writing. All unclosed start tags will be closed and output will be flushed. After calling this method no + * more output can be serialized until next call to setOutput() + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ - void endDocument () + void endDocument() throws IOException, IllegalArgumentException, IllegalStateException; /** - * Binds the given prefix to the given namespace. - * This call is valid for the next element including child elements. - * The prefix and namespace MUST be always declared even if prefix - * is not used in element (startTag() or attribute()) - for XML 1.0 - * it must result in declaring xmlns:prefix='namespace' - * (or xmlns:prefix="namespace" depending what character is used - * to quote attribute value). - * - *

                  NOTE: this method MUST be called directly before startTag() - * and if anything but startTag() or setPrefix() is called next there will be exception. - *

                  NOTE: prefixes "xml" and "xmlns" are already bound - * and can not be redefined see: + * Binds the given prefix to the given namespace. This call is valid for the next element including child elements. + * The prefix and namespace MUST be always declared even if prefix is not used in element (startTag() or + * attribute()) - for XML 1.0 it must result in declaring xmlns:prefix='namespace' (or + * xmlns:prefix="namespace" depending what character is used to quote attribute value). + *

                  + * NOTE: this method MUST be called directly before startTag() and if anything but startTag() or setPrefix() + * is called next there will be exception. + *

                  + * NOTE: prefixes "xml" and "xmlns" are already bound and can not be redefined see: * Namespaces in XML Errata. - *

                  NOTE: to set default namespace use as prefix empty string. + *

                  + * NOTE: to set default namespace use as prefix empty string. * * @param prefix must be not null (or IllegalArgumentException is thrown) * @param namespace must be not null + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ - void setPrefix (String prefix, String namespace) + void setPrefix( String prefix, String namespace ) throws IOException, IllegalArgumentException, IllegalStateException; /** - * Return namespace that corresponds to given prefix - * If there is no prefix bound to this namespace return null - * but if generatePrefix is false then return generated prefix. - * - *

                  NOTE: if the prefix is empty string "" and default namespace is bound - * to this prefix then empty string ("") is returned. - * - *

                  NOTE: prefixes "xml" and "xmlns" are already bound - * will have values as defined + * @return namespace that corresponds to given prefix If there is no prefix bound to this namespace return null but + * if generatePrefix is false then return generated prefix. + *

                  + * NOTE: if the prefix is empty string "" and default namespace is bound to this prefix then empty string + * ("") is returned. + *

                  + * NOTE: prefixes "xml" and "xmlns" are already bound will have values as defined * Namespaces in XML specification + * @param namespace the namespace + * @param generatePrefix to generate the missing prefix + * @throws IllegalArgumentException if null */ - String getPrefix (String namespace, boolean generatePrefix) + String getPrefix( String namespace, boolean generatePrefix ) throws IllegalArgumentException; /** - * Returns the current depth of the element. - * Outside the root element, the depth is 0. The - * depth is incremented by 1 when startTag() is called. - * The depth is decremented after the call to endTag() - * event was observed. + * @return the current depth of the element. Outside the root element, the depth is 0. The depth is incremented by 1 + * when startTag() is called. The depth is decremented after the call to endTag() event was observed. * *

                        * <!-- outside -->     0
                  @@ -178,19 +178,19 @@ String getPrefix (String namespace, boolean generatePrefix)
                   
                       /**
                        * Returns the namespace URI of the current element as set by startTag().
                  -     *
                  -     * 

                  NOTE: that means in particular that:

                    + *

                    + * NOTE: that means in particular that: + *

                      *
                    • if there was startTag("", ...) then getNamespace() returns "" *
                    • if there was startTag(null, ...) then getNamespace() returns null *
                    * * @return namespace set by startTag() that is currently in scope */ - String getNamespace (); + String getNamespace(); /** - * Returns the name of the current element as set by startTag(). - * It can only be null before first call to startTag() + * Returns the name of the current element as set by startTag(). It can only be null before first call to startTag() * or when last endTag() is called to close first startTag(). * * @return namespace set by startTag() that is currently in scope @@ -198,132 +198,154 @@ String getPrefix (String namespace, boolean generatePrefix) String getName(); /** - * Writes a start tag with the given namespace and name. - * If there is no prefix defined for the given namespace, - * a prefix will be defined automatically. - * The explicit prefixes for namespaces can be established by calling setPrefix() - * immediately before this method. - * If namespace is null no namespace prefix is printed but just name. - * If namespace is empty string then serializer will make sure that - * default empty namespace is declared (in XML 1.0 xmlns='') - * or throw IllegalStateException if default namespace is already bound - * to non-empty string. + * Writes a start tag with the given namespace and name. If there is no prefix defined for the given namespace, a + * prefix will be defined automatically. The explicit prefixes for namespaces can be established by calling + * setPrefix() immediately before this method. If namespace is null no namespace prefix is printed but just name. If + * namespace is empty string then serializer will make sure that default empty namespace is declared (in XML 1.0 + * xmlns='') or throw IllegalStateException if default namespace is already bound to non-empty string. + * @param namespace ns + * @param name tag name + * @return XmlSerializer + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ - XmlSerializer startTag (String namespace, String name) + XmlSerializer startTag( String namespace, String name ) throws IOException, IllegalArgumentException, IllegalStateException; /** - * Write an attribute. Calls to attribute() MUST follow a call to - * startTag() immediately. If there is no prefix defined for the - * given namespace, a prefix will be defined automatically. - * If namespace is null or empty string - * no namespace prefix is printed but just name. + * Write an attribute. Calls to attribute() MUST follow a call to startTag() immediately. If there is no prefix + * defined for the given namespace, a prefix will be defined automatically. If namespace is null or empty string no + * namespace prefix is printed but just name. + * @param name attribute name + * @param value attribute value + * @param namespace namespace to use + * @return XmlSerializer + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ - XmlSerializer attribute (String namespace, String name, String value) + XmlSerializer attribute( String namespace, String name, String value ) throws IOException, IllegalArgumentException, IllegalStateException; /** * Write end tag. Repetition of namespace and name is just for avoiding errors. - *

                    Background: in kXML endTag had no arguments, and non matching tags were - * very difficult to find... - * If namespace is null no namespace prefix is printed but just name. - * If namespace is empty string then serializer will make sure that - * default empty namespace is declared (in XML 1.0 xmlns=''). + * Background: in kXML endTag had no arguments, and non matching tags were very difficult to find... If + * namespace is null no namespace prefix is printed but just name. If namespace is empty string then serializer will + * make sure that default empty namespace is declared (in XML 1.0 xmlns=''). + * @param namespace ns + * @param name tag name + * @return XmlSerializer + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ - XmlSerializer endTag (String namespace, String name) + XmlSerializer endTag( String namespace, String name ) throws IOException, IllegalArgumentException, IllegalStateException; - - // /** - // * Writes a start tag with the given namespace and name. - // *
                    If there is no prefix defined (prefix == null) for the given namespace, - // * a prefix will be defined automatically. - // *
                    If explicit prefixes is passed (prefix != null) then it will be used - // *and namespace declared if not already declared or - // * throw IllegalStateException the same prefix was already set on this - // * element (setPrefix()) and was bound to different namespace. - // *
                    If namespace is null then prefix must be null too or IllegalStateException is thrown. - // *
                    If namespace is null then no namespace prefix is printed but just name. - // *
                    If namespace is empty string then serializer will make sure that - // * default empty namespace is declared (in XML 1.0 xmlns='') - // * or throw IllegalStateException if default namespace is already bound - // * to non-empty string. - // */ - // XmlSerializer startTag (String prefix, String namespace, String name) - // throws IOException, IllegalArgumentException, IllegalStateException; + // /** + // * Writes a start tag with the given namespace and name. + // *
                    If there is no prefix defined (prefix == null) for the given namespace, + // * a prefix will be defined automatically. + // *
                    If explicit prefixes is passed (prefix != null) then it will be used + // *and namespace declared if not already declared or + // * throw IllegalStateException the same prefix was already set on this + // * element (setPrefix()) and was bound to different namespace. + // *
                    If namespace is null then prefix must be null too or IllegalStateException is thrown. + // *
                    If namespace is null then no namespace prefix is printed but just name. + // *
                    If namespace is empty string then serializer will make sure that + // * default empty namespace is declared (in XML 1.0 xmlns='') + // * or throw IllegalStateException if default namespace is already bound + // * to non-empty string. + // */ + // XmlSerializer startTag (String prefix, String namespace, String name) + // throws IOException, IllegalArgumentException, IllegalStateException; // - // /** - // * Write an attribute. Calls to attribute() MUST follow a call to - // * startTag() immediately. - // *
                    If there is no prefix defined (prefix == null) for the given namespace, - // * a prefix will be defined automatically. - // *
                    If explicit prefixes is passed (prefix != null) then it will be used - // * and namespace declared if not already declared or - // * throw IllegalStateException the same prefix was already set on this - // * element (setPrefix()) and was bound to different namespace. - // *
                    If namespace is null then prefix must be null too or IllegalStateException is thrown. - // *
                    If namespace is null then no namespace prefix is printed but just name. - // *
                    If namespace is empty string then serializer will make sure that - // * default empty namespace is declared (in XML 1.0 xmlns='') - // * or throw IllegalStateException if default namespace is already bound - // * to non-empty string. - // */ - // XmlSerializer attribute (String prefix, String namespace, String name, String value) - // throws IOException, IllegalArgumentException, IllegalStateException; + // /** + // * Write an attribute. Calls to attribute() MUST follow a call to + // * startTag() immediately. + // *
                    If there is no prefix defined (prefix == null) for the given namespace, + // * a prefix will be defined automatically. + // *
                    If explicit prefixes is passed (prefix != null) then it will be used + // * and namespace declared if not already declared or + // * throw IllegalStateException the same prefix was already set on this + // * element (setPrefix()) and was bound to different namespace. + // *
                    If namespace is null then prefix must be null too or IllegalStateException is thrown. + // *
                    If namespace is null then no namespace prefix is printed but just name. + // *
                    If namespace is empty string then serializer will make sure that + // * default empty namespace is declared (in XML 1.0 xmlns='') + // * or throw IllegalStateException if default namespace is already bound + // * to non-empty string. + // */ + // XmlSerializer attribute (String prefix, String namespace, String name, String value) + // throws IOException, IllegalArgumentException, IllegalStateException; // - // /** - // * Write end tag. Repetition of namespace, prefix, and name is just for avoiding errors. - // *
                    If namespace or name arguments are different from corresponding startTag call - // * then IllegalArgumentException is thrown, if prefix argument is not null and is different - // * from corresponding starTag then IllegalArgumentException is thrown. - // *
                    If namespace is null then prefix must be null too or IllegalStateException is thrown. - // *
                    If namespace is null then no namespace prefix is printed but just name. - // *
                    If namespace is empty string then serializer will make sure that - // * default empty namespace is declared (in XML 1.0 xmlns=''). - // *

                    Background: in kXML endTag had no arguments, and non matching tags were - // * very difficult to find...

                    - // */ + // /** + // * Write end tag. Repetition of namespace, prefix, and name is just for avoiding errors. + // *
                    If namespace or name arguments are different from corresponding startTag call + // * then IllegalArgumentException is thrown, if prefix argument is not null and is different + // * from corresponding starTag then IllegalArgumentException is thrown. + // *
                    If namespace is null then prefix must be null too or IllegalStateException is thrown. + // *
                    If namespace is null then no namespace prefix is printed but just name. + // *
                    If namespace is empty string then serializer will make sure that + // * default empty namespace is declared (in XML 1.0 xmlns=''). + // *

                    Background: in kXML endTag had no arguments, and non matching tags were + // * very difficult to find...

                    + // */ // ALEK: This is really optional as prefix in end tag MUST correspond to start tag but good for error checking - // XmlSerializer endTag (String prefix, String namespace, String name) - // throws IOException, IllegalArgumentException, IllegalStateException; + // XmlSerializer endTag (String prefix, String namespace, String name) + // throws IOException, IllegalArgumentException, IllegalStateException; /** - * Writes text, where special XML chars are escaped automatically + * @param text Writes text, where special XML chars are escaped automatically + * @return XmlSerializer + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ - XmlSerializer text (String text) + XmlSerializer text( String text ) throws IOException, IllegalArgumentException, IllegalStateException; /** * Writes text, where special XML chars are escaped automatically + * @param buf characters + * @param len lenght + * @param start start + * @return XmlSerializer + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ - XmlSerializer text (char [] buf, int start, int len) + XmlSerializer text( char[] buf, int start, int len ) throws IOException, IllegalArgumentException, IllegalStateException; - void cdsect (String text) + void cdsect( String text ) throws IOException, IllegalArgumentException, IllegalStateException; - void entityRef (String text) throws IOException, - IllegalArgumentException, IllegalStateException; - void processingInstruction (String text) + + void entityRef( String text ) throws IOException, IllegalArgumentException, IllegalStateException; - void comment (String text) + + void processingInstruction( String text ) throws IOException, IllegalArgumentException, IllegalStateException; - void docdecl (String text) + + void comment( String text ) throws IOException, IllegalArgumentException, IllegalStateException; - void ignorableWhitespace (String text) + + void docdecl( String text ) + throws IOException, IllegalArgumentException, IllegalStateException; + + void ignorableWhitespace( String text ) throws IOException, IllegalArgumentException, IllegalStateException; /** - * Write all pending output to the stream. - * If method startTag() or attribute() was called then start tag is closed (final >) - * before flush() is called on underlying output stream. - * - *

                    NOTE: if there is need to close start tag - * (so no more attribute() calls are allowed) but without flushing output - * call method text() with empty string (text("")). - * + * Write all pending output to the stream. If method startTag() or attribute() was called then start tag is closed + * (final >) before flush() is called on underlying output stream. + *

                    + * NOTE: if there is need to close start tag (so no more attribute() calls are allowed) but without flushing + * output call method text() with empty string (text("")). + * @throws IOException io */ - void flush () + void flush() throws IOException; } - diff --git a/src/main/java10/org/codehaus/plexus/util/BaseIOUtil.java b/src/main/java10/org/codehaus/plexus/util/BaseIOUtil.java new file mode 100644 index 00000000..fc792be3 --- /dev/null +++ b/src/main/java10/org/codehaus/plexus/util/BaseIOUtil.java @@ -0,0 +1,25 @@ +package org.codehaus.plexus.util; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.Reader; +import java.io.Writer; + +/** + * Implementation specific to Java SE 10 version. + */ +abstract class BaseIOUtil +{ + static void copy( final InputStream input, final OutputStream output ) + throws IOException + { + input.transferTo( output ); + } + + static void copy( final Reader input, final Writer output ) + throws IOException + { + input.transferTo( output ); + } +} diff --git a/src/main/java9/org/codehaus/plexus/util/BaseIOUtil.java b/src/main/java9/org/codehaus/plexus/util/BaseIOUtil.java new file mode 100644 index 00000000..7e0826c4 --- /dev/null +++ b/src/main/java9/org/codehaus/plexus/util/BaseIOUtil.java @@ -0,0 +1,27 @@ +package org.codehaus.plexus.util; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.Reader; +import java.io.Writer; + +/** + * Implementation specific to Java SE 9 version. + */ +abstract class BaseIOUtil +{ + private static final int DEFAULT_BUFFER_SIZE = 1024 * 16; + + static void copy( final InputStream input, final OutputStream output ) + throws IOException + { + input.transferTo( output ); + } + + static void copy( final Reader input, final Writer output ) + throws IOException + { + IOUtil.copy( input, output, DEFAULT_BUFFER_SIZE ); + } +} diff --git a/src/main/javadoc/org/codehaus/plexus/util/io/package.html b/src/main/javadoc/org/codehaus/plexus/util/io/package.html new file mode 100644 index 00000000..616b7bc2 --- /dev/null +++ b/src/main/javadoc/org/codehaus/plexus/util/io/package.html @@ -0,0 +1,26 @@ + + + + + + + + + Facades to create {@code InputStream}s representing various kinds of + data sources, identically. + + diff --git a/src/main/javadoc/org/codehaus/plexus/util/package.html b/src/main/javadoc/org/codehaus/plexus/util/package.html index 79bf2c28..e4ff4b2c 100644 --- a/src/main/javadoc/org/codehaus/plexus/util/package.html +++ b/src/main/javadoc/org/codehaus/plexus/util/package.html @@ -1,3 +1,3 @@ -Misc. utilities. - \ No newline at end of file +Miscellaneous utilities, mainly dealing with I/O, strings, and filesystems. + diff --git a/src/main/javadoc/org/codehaus/plexus/util/xml/pull/package.html b/src/main/javadoc/org/codehaus/plexus/util/xml/pull/package.html index 8cf73f2b..a63ad07f 100644 --- a/src/main/javadoc/org/codehaus/plexus/util/xml/pull/package.html +++ b/src/main/javadoc/org/codehaus/plexus/util/xml/pull/package.html @@ -1,7 +1,7 @@ XML Pull Parser interface and implementation. -XML Pull Parser is an interface that defines parsing functionlity provided +XML Pull Parser is an interface that defines parsing functionality provided in XMLPULL V1 API (visit this website to learn more about API and its implementations). \ No newline at end of file diff --git a/src/main/resources/licenses/extreme.indiana.edu.license.TXT b/src/main/resources/licenses/extreme.indiana.edu.license.TXT index c7431555..4598bfab 100644 --- a/src/main/resources/licenses/extreme.indiana.edu.license.TXT +++ b/src/main/resources/licenses/extreme.indiana.edu.license.TXT @@ -24,13 +24,13 @@ are met: Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. -4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab" +4. The names "Indiana University" and "Indiana University Extreme! Lab" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact http://www.extreme.indiana.edu/. -5. Products derived from this software may not use "Indiana Univeristy" -name nor may "Indiana Univeristy" appear in their name, without prior +5. Products derived from this software may not use "Indiana University" +name nor may "Indiana University" appear in their name, without prior written permission of the Indiana University. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED diff --git a/src/site/site.xml b/src/site/site.xml index 7eb2e54f..38cbad8a 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -1,25 +1,17 @@ - - - Plexus - http://plexus.codehaus.org/ - /images/plexus-logo.png - - - - - - org.codehaus.plexus - plexus-stylus-skin - 1.0-SNAPSHOT - + + + - - - -

                    + + + + + + + + + - + \ No newline at end of file diff --git a/src/test/java/org/codehaus/plexus/util/AbstractTestThread.java b/src/test/java/org/codehaus/plexus/util/AbstractTestThread.java index 6e23e167..ca5ba4ed 100644 --- a/src/test/java/org/codehaus/plexus/util/AbstractTestThread.java +++ b/src/test/java/org/codehaus/plexus/util/AbstractTestThread.java @@ -17,19 +17,23 @@ */ /** - * A thread which is registered with a ThreadRegistry and notifies it when it has completed - * running. Collects any errors and makes it available for analysis. - * - *

                    Created on 1/07/2003

                    + * A thread which is registered with a ThreadRegistry and notifies it when it has completed running. Collects any errors + * and makes it available for analysis. + *

                    + * Created on 1/07/2003 + *

                    * * @author Bert van Brakel - * @version $Revision$ + * @version $Id: $Id + * @since 3.4.0 */ -public abstract class AbstractTestThread implements Runnable +public abstract class AbstractTestThread + implements Runnable { - //~ Instance fields ---------------------------------------------------------------------------- + // ~ Instance fields ---------------------------------------------------------------------------- private String name; + /** Constant DEBUG=true */ public static final boolean DEBUG = true; private boolean isRunning = false; @@ -40,41 +44,49 @@ public abstract class AbstractTestThread implements Runnable /** The registry to notify on completion */ private TestThreadManager registry; - /** The error thrown when running the test. Not neccesarily a test failuer as some tests - * may test for an exception */ + /** + * The error thrown when running the test. Not necessarily a test failure as some tests may test for an exception + */ private Throwable error; /** If the thread has been run */ private boolean hasRun = false; - /** Flag indicating if the test has passed. Some test might require an - * exception so using the error to determine if the test has passed is - * not sufficient. + /** + * Flag indicating if the test has passed. Some test might require an exception so using the error to determine if + * the test has passed is not sufficient. */ private boolean passed = false; - //~ Constructors ------------------------------------------------------------------------------- + // ~ Constructors ------------------------------------------------------------------------------- /** * Constructor - * - *

                    Remember to call setThreadRegistry(ThreadRegistry) + *

                    + * Remember to call setThreadRegistry(ThreadRegistry) */ public AbstractTestThread() { super(); } + /** + *

                    Constructor for AbstractTestThread.

                    + * + * @param registry a {@link org.codehaus.plexus.util.TestThreadManager} object. + */ public AbstractTestThread( TestThreadManager registry ) { super(); setThreadRegistry( registry ); } - //~ Methods ------------------------------------------------------------------------------------ + // ~ Methods ------------------------------------------------------------------------------------ /** - * @return + *

                    Getter for the field error.

                    + * + * @return a {@link java.lang.Throwable} object. */ public Throwable getError() { @@ -82,15 +94,12 @@ public Throwable getError() } /** - * Resets the test back to it's state before starting. If the test - * is currently running this method will block until the test has - * finished running. Subclasses should call this method if - * overriding it. - * - * */ + * Resets the test back to it's state before starting. If the test is currently running this method will block until + * the test has finished running. Subclasses should call this method if overriding it. + */ public void reset() { - //shouldn't reset until the test has finished running + // shouldn't reset until the test has finished running synchronized ( this ) { while ( isRunning ) @@ -112,13 +121,11 @@ public void reset() } /** - * Start this TestThread running. If the test is currently running then - * this method does nothing. - * + * Start this TestThread running. If the test is currently running then this method does nothing. */ public final void start() { - //shouldn't have multiple threads running this test at the same time + // shouldn't have multiple threads running this test at the same time synchronized ( this ) { if ( isRunning == false ) @@ -131,7 +138,9 @@ public final void start() } /** - * @return + *

                    Getter for the field errorMsg.

                    + * + * @return a {@link java.lang.String} object. */ public String getErrorMsg() { @@ -139,7 +148,9 @@ public String getErrorMsg() } /** - * @return + *

                    hasFailed.

                    + * + * @return a boolean. */ public boolean hasFailed() { @@ -180,8 +191,8 @@ public final void run() registry.completed( this ); hasRun = true; isRunning = false; - //notify objects with blocked methods which are waiting - //on this test to complete running + // notify objects with blocked methods which are waiting + // on this test to complete running synchronized ( this ) { notifyAll(); @@ -191,14 +202,15 @@ public final void run() /** * Override this to run your custom test * - * @throws Throwable + * @throws java.lang.Throwable */ - public abstract void doRun() throws Throwable; + public abstract void doRun() + throws Throwable; /** * Set the registry this thread should notify when it has completed running * - * @param registry + * @param registry a {@link org.codehaus.plexus.util.TestThreadManager} object. */ public void setThreadRegistry( TestThreadManager registry ) @@ -209,7 +221,7 @@ public void setThreadRegistry( TestThreadManager registry ) /** * Test if the test has run * - * @return + * @return a boolean. */ public boolean hasRun() { @@ -217,7 +229,9 @@ public boolean hasRun() } /** - * @param throwable + *

                    Setter for the field error.

                    + * + * @param throwable a {@link java.lang.Throwable} object. */ public void setError( Throwable throwable ) { @@ -225,7 +239,9 @@ public void setError( Throwable throwable ) } /** - * @param string + *

                    Setter for the field errorMsg.

                    + * + * @param string a {@link java.lang.String} object. */ public void setErrorMsg( String string ) { @@ -233,7 +249,9 @@ public void setErrorMsg( String string ) } /** - * @param b + *

                    Setter for the field passed.

                    + * + * @param b a boolean. */ public void setPassed( boolean b ) { @@ -241,7 +259,9 @@ public void setPassed( boolean b ) } /** - * @return + *

                    Getter for the field name.

                    + * + * @return a {@link java.lang.String} object. */ public String getName() { @@ -249,7 +269,9 @@ public String getName() } /** - * @param string + *

                    Setter for the field name.

                    + * + * @param string a {@link java.lang.String} object. */ public void setName( String string ) { diff --git a/src/test/java/org/codehaus/plexus/util/CollectionUtilsTest.java b/src/test/java/org/codehaus/plexus/util/CollectionUtilsTest.java index 1a7d5411..70add088 100644 --- a/src/test/java/org/codehaus/plexus/util/CollectionUtilsTest.java +++ b/src/test/java/org/codehaus/plexus/util/CollectionUtilsTest.java @@ -16,20 +16,34 @@ * limitations under the License. */ +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; -import junit.framework.TestCase; +import org.junit.Test; +/** + *

                    CollectionUtilsTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ public class CollectionUtilsTest - extends TestCase { + /** + *

                    testMergeMaps.

                    + */ + @Test public void testMergeMaps() { - Map dominantMap = new HashMap(); + Map dominantMap = new HashMap(); dominantMap.put( "a", "a" ); dominantMap.put( "b", "b" ); dominantMap.put( "c", "c" ); @@ -37,7 +51,7 @@ public void testMergeMaps() dominantMap.put( "e", "e" ); dominantMap.put( "f", "f" ); - Map recessiveMap = new HashMap(); + Map recessiveMap = new HashMap(); recessiveMap.put( "a", "invalid" ); recessiveMap.put( "b", "invalid" ); recessiveMap.put( "c", "invalid" ); @@ -45,7 +59,7 @@ public void testMergeMaps() recessiveMap.put( "y", "y" ); recessiveMap.put( "z", "z" ); - Map result = CollectionUtils.mergeMaps( dominantMap, recessiveMap ); + Map result = CollectionUtils.mergeMaps( dominantMap, recessiveMap ); // We should have 9 elements assertEquals( 9, result.keySet().size() ); @@ -62,80 +76,66 @@ public void testMergeMaps() assertEquals( "z", result.get( "z" ) ); } + /** + *

                    testMergeMapArray.

                    + */ + @SuppressWarnings( "unchecked" ) + @Test public void testMergeMapArray() { // Test empty array of Maps - Map result0 = CollectionUtils.mergeMaps( new Map[] - { - } ); + Map result0 = CollectionUtils.mergeMaps( new Map[] {} ); assertNull( result0 ); // Test with an array with a single element. - Map map1 = new HashMap(); + Map map1 = new HashMap(); map1.put( "a", "a" ); - Map result1 = CollectionUtils.mergeMaps( new Map[] - { - map1 - } ); + Map result1 = CollectionUtils.mergeMaps( new Map[] { map1 } ); assertEquals( "a", result1.get( "a" ) ); // Test with an array with two elements. - Map map2 = new HashMap(); + Map map2 = new HashMap(); map2.put( "a", "aa" ); map2.put( "b", "bb" ); - Map result2 = CollectionUtils.mergeMaps( new Map[] - { - map1, - map2 - } ); + Map result2 = CollectionUtils.mergeMaps( new Map[] { map1, map2 } ); assertEquals( "a", result2.get( "a" ) ); assertEquals( "bb", result2.get( "b" ) ); // Now swap the dominant order. - Map result3 = CollectionUtils.mergeMaps( new Map[] - { - map2, - map1 - } ); + Map result3 = CollectionUtils.mergeMaps( new Map[] { map2, map1 } ); assertEquals( "aa", result3.get( "a" ) ); assertEquals( "bb", result3.get( "b" ) ); // Test with an array with three elements. - Map map3 = new HashMap(); + Map map3 = new HashMap(); map3.put( "a", "aaa" ); map3.put( "b", "bbb" ); map3.put( "c", "ccc" ); - Map result4 = CollectionUtils.mergeMaps( new Map[] - { - map1, - map2, - map3 - } ); + Map result4 = CollectionUtils.mergeMaps( new Map[] { map1, map2, map3 } ); assertEquals( "a", result4.get( "a" ) ); assertEquals( "bb", result4.get( "b" ) ); assertEquals( "ccc", result4.get( "c" ) ); // Now swap the dominant order. - Map result5 = CollectionUtils.mergeMaps( new Map[] - { - map3, - map2, - map1 - } ); + Map result5 = CollectionUtils.mergeMaps( new Map[] { map3, map2, map1 } ); assertEquals( "aaa", result5.get( "a" ) ); assertEquals( "bbb", result5.get( "b" ) ); assertEquals( "ccc", result5.get( "c" ) ); } + /** + *

                    testMavenPropertiesLoading.

                    + */ + @Test public void testMavenPropertiesLoading() { // Mimic MavenSession properties loading. Properties listed @@ -174,14 +174,8 @@ public void testMavenPropertiesLoading() driverProperties.setProperty( "maven.repo.remote.enabled", "true" ); driverProperties.setProperty( "maven.repo.local", "${maven.home}/artifact" ); - Map result = CollectionUtils.mergeMaps( new Map[] - { - systemProperties, - userBuildProperties, - projectBuildProperties, - projectProperties, - driverProperties - } ); + Map result = CollectionUtils.mergeMaps( new Map[] { systemProperties, userBuildProperties, + projectBuildProperties, projectProperties, driverProperties } ); // Values that should be taken from systemProperties. assertEquals( "/projects/maven", (String) result.get( "maven.home" ) ); @@ -198,15 +192,19 @@ public void testMavenPropertiesLoading() assertEquals( mavenRepoRemote, (String) result.get( "maven.repo.remote" ) ); } + /** + *

                    testIteratorToListWithAPopulatedList.

                    + */ + @Test public void testIteratorToListWithAPopulatedList() { - List original = new ArrayList(); + List original = new ArrayList(); original.add( "en" ); original.add( "to" ); original.add( "tre" ); - List copy = CollectionUtils.iteratorToList( original.iterator() ); + List copy = CollectionUtils.iteratorToList( original.iterator() ); assertNotNull( copy ); @@ -217,11 +215,15 @@ public void testIteratorToListWithAPopulatedList() assertEquals( "tre", copy.get( 2 ) ); } + /** + *

                    testIteratorToListWithAEmptyList.

                    + */ + @Test public void testIteratorToListWithAEmptyList() { - List original = new ArrayList(); + List original = new ArrayList(); - List copy = CollectionUtils.iteratorToList( original.iterator() ); + List copy = CollectionUtils.iteratorToList( original.iterator() ); assertNotNull( copy ); diff --git a/src/test/java/org/codehaus/plexus/util/DirectoryScannerTest.java b/src/test/java/org/codehaus/plexus/util/DirectoryScannerTest.java index 71fe269f..86c6dd20 100644 --- a/src/test/java/org/codehaus/plexus/util/DirectoryScannerTest.java +++ b/src/test/java/org/codehaus/plexus/util/DirectoryScannerTest.java @@ -16,42 +16,206 @@ * limitations under the License. */ +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import static org.junit.Assume.assumeTrue; + import java.io.File; import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; import java.util.List; +import java.util.Set; -import org.codehaus.plexus.util.FileUtils; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TestName; /** * Base class for testcases doing tests with files. * * @author Dan T. Tran + * @version $Id: $Id + * @since 3.4.0 */ public class DirectoryScannerTest extends FileBasedTestCase { - private static String testDir = getTestDirectory().getPath() ; + @Rule + public TestName name = new TestName(); + + private static String testDir = getTestDirectory().getPath(); + + /** + *

                    setUp.

                    + */ + @Before + public void setUp() + { + try + { + FileUtils.deleteDirectory( testDir ); + } + catch ( IOException e ) + { + fail( "Could not delete directory " + testDir ); + } + } + + /** + *

                    testCrossPlatformIncludesString.

                    + * + * @throws java.io.IOException if any. + * @throws java.net.URISyntaxException if any. + */ + @Test + public void testCrossPlatformIncludesString() + throws IOException, URISyntaxException + { + DirectoryScanner ds = new DirectoryScanner(); + ds.setBasedir( new File( getTestResourcesDir() + File.separator + "directory-scanner" ).getCanonicalFile() ); + + String fs; + if ( File.separatorChar == '/' ) + { + fs = "\\"; + } + else + { + fs = "/"; + } + + ds.setIncludes( new String[] { "foo" + fs } ); + ds.addDefaultExcludes(); + ds.scan(); + + String[] files = ds.getIncludedFiles(); + assertEquals( 1, files.length ); + } + + /** + *

                    testCrossPlatformExcludesString.

                    + * + * @throws java.io.IOException if any. + * @throws java.net.URISyntaxException if any. + */ + @Test + public void testCrossPlatformExcludesString() + throws IOException, URISyntaxException + { + DirectoryScanner ds = new DirectoryScanner(); + ds.setBasedir( new File( getTestResourcesDir() + File.separator + "directory-scanner" ).getCanonicalFile() ); + ds.setIncludes( new String[] { "**" } ); + + String fs; + if ( File.separatorChar == '/' ) + { + fs = "\\"; + } + else + { + fs = "/"; + } + + ds.setExcludes( new String[] { "foo" + fs } ); + ds.addDefaultExcludes(); + ds.scan(); + + String[] files = ds.getIncludedFiles(); + assertEquals( 0, files.length ); + } + + private String getTestResourcesDir() + throws URISyntaxException + { + ClassLoader cloader = Thread.currentThread().getContextClassLoader(); + URL resource = cloader.getResource( "test.txt" ); + if ( resource == null ) + { + fail( "Cannot locate test-resources directory containing 'test.txt' in the classloader." ); + } + + File file = new File( new URI( resource.toExternalForm() ).normalize().getPath() ); + + return file.getParent(); + } private void createTestFiles() throws IOException { FileUtils.mkdir( testDir ); - this.createFile( new File ( testDir + "/scanner1.dat") , 0 ); - this.createFile( new File ( testDir + "/scanner2.dat") , 0 ); - this.createFile( new File ( testDir + "/scanner3.dat") , 0 ); - this.createFile( new File ( testDir + "/scanner4.dat") , 0 ); - this.createFile( new File ( testDir + "/scanner5.dat") , 0 ); + this.createFile( new File( testDir + "/scanner1.dat" ), 0 ); + this.createFile( new File( testDir + "/scanner2.dat" ), 0 ); + this.createFile( new File( testDir + "/scanner3.dat" ), 0 ); + this.createFile( new File( testDir + "/scanner4.dat" ), 0 ); + this.createFile( new File( testDir + "/scanner5.dat" ), 0 ); + } + + /** + * Check if 'src/test/resources/symlinks/src/sym*' test files (start with 'sym') exist and are symlinks.
                    + * On some OS (like Windows 10), the 'git clone' requires to be executed with admin permissions and the + * 'core.symlinks=true' git option. + * + * @return true If files here and symlinks, false otherwise + */ + private boolean checkTestFilesSymlinks() + { + File symlinksDirectory = new File( "src/test/resources/symlinks/src" ); + try + { + List symlinks = + FileUtils.getFileAndDirectoryNames( symlinksDirectory, "sym*", null, true, true, true, true ); + if ( symlinks.isEmpty() ) + { + throw new IOException( "Symlinks files/directories are not present" ); + } + for ( String symLink : symlinks ) + { + if ( !Files.isSymbolicLink( Paths.get( symLink ) ) ) + { + throw new IOException( String.format( "Path is not a symlink: %s", symLink ) ); + } + } + return true; + } + catch ( IOException e ) + { + System.err.println( String.format( "The unit test '%s.%s' will be skipped, reason: %s", + this.getClass().getSimpleName(), name.getMethodName(), + e.getMessage() ) ); + System.out.println( String.format( "This test requires symlinks files in '%s' directory.", + symlinksDirectory.getPath() ) ); + System.out.println( "On some OS (like Windows 10), files are present only if the clone/checkout is done" + + " in administrator mode, and correct (symlinks and not flat file/directory)" + + " if symlinks option are used (for git: git clone -c core.symlinks=true [url])" ); + return false; + } } + /** + *

                    testGeneral.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testGeneral() - throws IOException + throws IOException { this.createTestFiles(); - String includes = "scanner1.dat,scanner2.dat,scanner3.dat,scanner4.dat,scanner5.dat" ; - String excludes = "scanner1.dat,scanner2.dat" ; + String includes = "scanner1.dat,scanner2.dat,scanner3.dat,scanner4.dat,scanner5.dat"; + String excludes = "scanner1.dat,scanner2.dat"; - List fileNames = FileUtils.getFiles( new File ( testDir ), includes, excludes, false ); + List fileNames = FileUtils.getFiles( new File( testDir ), includes, excludes, false ); assertEquals( "Wrong number of results.", 3, fileNames.size() ); assertTrue( "3 not found.", fileNames.contains( new File( "scanner3.dat" ) ) ); @@ -60,16 +224,22 @@ public void testGeneral() } + /** + *

                    testIncludesExcludesWithWhiteSpaces.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testIncludesExcludesWithWhiteSpaces() - throws IOException + throws IOException { this.createTestFiles(); - String includes = "scanner1.dat,\n \n,scanner2.dat \n\r, scanner3.dat\n, \tscanner4.dat,scanner5.dat\n," ; + String includes = "scanner1.dat,\n \n,scanner2.dat \n\r, scanner3.dat\n, \tscanner4.dat,scanner5.dat\n,"; - String excludes = "scanner1.dat,\n \n,scanner2.dat \n\r,," ; + String excludes = "scanner1.dat,\n \n,scanner2.dat \n\r,,"; - List fileNames = FileUtils.getFiles( new File ( testDir ), includes, excludes, false ); + List fileNames = FileUtils.getFiles( new File( testDir ), includes, excludes, false ); assertEquals( "Wrong number of results.", 3, fileNames.size() ); assertTrue( "3 not found.", fileNames.contains( new File( "scanner3.dat" ) ) ); @@ -77,6 +247,70 @@ public void testIncludesExcludesWithWhiteSpaces() assertTrue( "5 not found.", fileNames.contains( new File( "scanner5.dat" ) ) ); } + /** + *

                    testFollowSymlinksFalse.

                    + */ + @Test + public void testFollowSymlinksFalse() + { + assumeTrue( checkTestFilesSymlinks() ); + + DirectoryScanner ds = new DirectoryScanner(); + ds.setBasedir( new File( "src/test/resources/symlinks/src/" ) ); + ds.setFollowSymlinks( false ); + ds.scan(); + List included = Arrays.asList( ds.getIncludedFiles() ); + assertAlwaysIncluded( included ); + assertEquals( 9, included.size() ); + List includedDirs = Arrays.asList( ds.getIncludedDirectories() ); + assertTrue( includedDirs.contains( "" ) ); // w00t ! + assertTrue( includedDirs.contains( "aRegularDir" ) ); + assertTrue( includedDirs.contains( "symDir" ) ); + assertTrue( includedDirs.contains( "symLinkToDirOnTheOutside" ) ); + assertTrue( includedDirs.contains( "targetDir" ) ); + assertEquals( 5, includedDirs.size() ); + } + + private void assertAlwaysIncluded( List included ) + { + assertTrue( included.contains( "aRegularDir" + File.separator + "aRegularFile.txt" ) ); + assertTrue( included.contains( "targetDir" + File.separator + "targetFile.txt" ) ); + assertTrue( included.contains( "fileR.txt" ) ); + assertTrue( included.contains( "fileW.txt" ) ); + assertTrue( included.contains( "fileX.txt" ) ); + assertTrue( included.contains( "symR" ) ); + assertTrue( included.contains( "symW" ) ); + assertTrue( included.contains( "symX" ) ); + assertTrue( included.contains( "symLinkToFileOnTheOutside" ) ); + } + + /** + *

                    testFollowSymlinks.

                    + */ + @Test + public void testFollowSymlinks() + { + assumeTrue( checkTestFilesSymlinks() ); + + DirectoryScanner ds = new DirectoryScanner(); + ds.setBasedir( new File( "src/test/resources/symlinks/src/" ) ); + ds.setFollowSymlinks( true ); + ds.scan(); + List included = Arrays.asList( ds.getIncludedFiles() ); + assertAlwaysIncluded( included ); + assertTrue( included.contains( "symDir" + File.separator + "targetFile.txt" ) ); + assertTrue( included.contains( "symLinkToDirOnTheOutside" + File.separator + "FileInDirOnTheOutside.txt" ) ); + assertEquals( 11, included.size() ); + + List includedDirs = Arrays.asList( ds.getIncludedDirectories() ); + assertTrue( includedDirs.contains( "" ) ); // w00t ! + assertTrue( includedDirs.contains( "aRegularDir" ) ); + assertTrue( includedDirs.contains( "symDir" ) ); + assertTrue( includedDirs.contains( "symLinkToDirOnTheOutside" ) ); + assertTrue( includedDirs.contains( "targetDir" ) ); + assertEquals( 5, includedDirs.size() ); + } + private void createTestDirectories() throws IOException { @@ -92,6 +326,12 @@ private void createTestDirectories() + File.separator + "file1.dat" ), 0 ); } + /** + *

                    testDirectoriesWithHyphens.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testDirectoriesWithHyphens() throws IOException { @@ -109,4 +349,407 @@ public void testDirectoriesWithHyphens() String[] files = ds.getIncludedFiles(); assertEquals( "Wrong number of results.", 3, files.length ); } + + /** + *

                    testAntExcludesOverrideIncludes.

                    + * + * @throws java.io.IOException if any. + */ + @Test + public void testAntExcludesOverrideIncludes() + throws IOException + { + printTestHeader(); + + File dir = new File( testDir, "regex-dir" ); + dir.mkdirs(); + + String[] excludedPaths = { "target/foo.txt" }; + + createFiles( dir, excludedPaths ); + + String[] includedPaths = { "src/main/resources/project/target/foo.txt" }; + + createFiles( dir, includedPaths ); + + DirectoryScanner ds = new DirectoryScanner(); + + String[] includes = { "**/target/*" }; + String[] excludes = { "target/*" }; + + // This doesn't work, since excluded patterns refine included ones, meaning they operate on + // the list of paths that passed the included patterns, and can override them. + // String[] includes = {"**src/**/target/**/*" }; + // String[] excludes = { "**/target/**/*" }; + + ds.setIncludes( includes ); + ds.setExcludes( excludes ); + ds.setBasedir( dir ); + ds.scan(); + + assertInclusionsAndExclusions( ds.getIncludedFiles(), excludedPaths, includedPaths ); + } + + /** + *

                    testAntExcludesOverrideIncludesWithExplicitAntPrefix.

                    + * + * @throws java.io.IOException if any. + */ + @Test + public void testAntExcludesOverrideIncludesWithExplicitAntPrefix() + throws IOException + { + printTestHeader(); + + File dir = new File( testDir, "regex-dir" ); + dir.mkdirs(); + + String[] excludedPaths = { "target/foo.txt" }; + + createFiles( dir, excludedPaths ); + + String[] includedPaths = { "src/main/resources/project/target/foo.txt" }; + + createFiles( dir, includedPaths ); + + DirectoryScanner ds = new DirectoryScanner(); + + String[] includes = + { SelectorUtils.ANT_HANDLER_PREFIX + "**/target/**/*" + SelectorUtils.PATTERN_HANDLER_SUFFIX }; + String[] excludes = { SelectorUtils.ANT_HANDLER_PREFIX + "target/**/*" + SelectorUtils.PATTERN_HANDLER_SUFFIX }; + + // This doesn't work, since excluded patterns refine included ones, meaning they operate on + // the list of paths that passed the included patterns, and can override them. + // String[] includes = {"**src/**/target/**/*" }; + // String[] excludes = { "**/target/**/*" }; + + ds.setIncludes( includes ); + ds.setExcludes( excludes ); + ds.setBasedir( dir ); + ds.scan(); + + assertInclusionsAndExclusions( ds.getIncludedFiles(), excludedPaths, includedPaths ); + } + + /** + *

                    testRegexIncludeWithExcludedPrefixDirs.

                    + * + * @throws java.io.IOException if any. + */ + @Test + public void testRegexIncludeWithExcludedPrefixDirs() + throws IOException + { + printTestHeader(); + + File dir = new File( testDir, "regex-dir" ); + dir.mkdirs(); + + String[] excludedPaths = { "src/main/foo.txt" }; + + createFiles( dir, excludedPaths ); + + String[] includedPaths = { "src/main/resources/project/target/foo.txt" }; + + createFiles( dir, includedPaths ); + + String regex = ".+/target.*"; + + DirectoryScanner ds = new DirectoryScanner(); + + String includeExpr = SelectorUtils.REGEX_HANDLER_PREFIX + regex + SelectorUtils.PATTERN_HANDLER_SUFFIX; + + String[] includes = { includeExpr }; + ds.setIncludes( includes ); + ds.setBasedir( dir ); + ds.scan(); + + assertInclusionsAndExclusions( ds.getIncludedFiles(), excludedPaths, includedPaths ); + } + + /** + *

                    testRegexExcludeWithNegativeLookahead.

                    + * + * @throws java.io.IOException if any. + */ + @Test + public void testRegexExcludeWithNegativeLookahead() + throws IOException + { + printTestHeader(); + + File dir = new File( testDir, "regex-dir" ); + try + { + FileUtils.deleteDirectory( dir ); + } + catch ( IOException e ) + { + } + + dir.mkdirs(); + + String[] excludedPaths = { "target/foo.txt" }; + + createFiles( dir, excludedPaths ); + + String[] includedPaths = { "src/main/resources/project/target/foo.txt" }; + + createFiles( dir, includedPaths ); + + String regex = "(?!.*src/).*target.*"; + + DirectoryScanner ds = new DirectoryScanner(); + + String excludeExpr = SelectorUtils.REGEX_HANDLER_PREFIX + regex + SelectorUtils.PATTERN_HANDLER_SUFFIX; + + String[] excludes = { excludeExpr }; + ds.setExcludes( excludes ); + ds.setBasedir( dir ); + ds.scan(); + + assertInclusionsAndExclusions( ds.getIncludedFiles(), excludedPaths, includedPaths ); + } + + /** + *

                    testRegexWithSlashInsideCharacterClass.

                    + * + * @throws java.io.IOException if any. + */ + @Test + public void testRegexWithSlashInsideCharacterClass() + throws IOException + { + printTestHeader(); + + File dir = new File( testDir, "regex-dir" ); + try + { + FileUtils.deleteDirectory( dir ); + } + catch ( IOException e ) + { + } + + dir.mkdirs(); + + String[] excludedPaths = { "target/foo.txt", "target/src/main/target/foo.txt" }; + + createFiles( dir, excludedPaths ); + + String[] includedPaths = { "module/src/main/target/foo.txt" }; + + createFiles( dir, includedPaths ); + + // NOTE: The portion "[^/]" is the interesting part of this pattern. + String regex = "(?!((?!target/)[^/]+/)*src/).*target.*"; + + DirectoryScanner ds = new DirectoryScanner(); + + String excludeExpr = SelectorUtils.REGEX_HANDLER_PREFIX + regex + SelectorUtils.PATTERN_HANDLER_SUFFIX; + + String[] excludes = { excludeExpr }; + ds.setExcludes( excludes ); + ds.setBasedir( dir ); + ds.scan(); + + assertInclusionsAndExclusions( ds.getIncludedFiles(), excludedPaths, includedPaths ); + } + + /** + * Test that the directory scanning does not enter into not matching directories. + * + * @see Issue #63 + * @throws java.io.IOException if occurs an I/O error. + */ + @Test + public void testDoNotScanUnnecesaryDirectories() + throws IOException + { + createTestDirectories(); + + // create additional directories 'anotherDir1', 'anotherDir2' and 'anotherDir3' with a 'file1.dat' file + FileUtils.mkdir( testDir + File.separator + "directoryTest" + File.separator + "testDir123" + File.separator + + "anotherDir1" ); + FileUtils.mkdir( testDir + File.separator + "directoryTest" + File.separator + "test_dir_123" + File.separator + + "anotherDir2" ); + FileUtils.mkdir( testDir + File.separator + "directoryTest" + File.separator + "test-dir-123" + File.separator + + "anotherDir3" ); + + this.createFile( new File( testDir + File.separator + "directoryTest" + File.separator + "testDir123" + + File.separator + "anotherDir1" + File.separator + "file1.dat" ), 0 ); + this.createFile( new File( testDir + File.separator + "directoryTest" + File.separator + "test_dir_123" + + File.separator + "anotherDir2" + File.separator + "file1.dat" ), 0 ); + this.createFile( new File( testDir + File.separator + "directoryTest" + File.separator + "test-dir-123" + + File.separator + "anotherDir3" + File.separator + "file1.dat" ), 0 ); + + String[] excludedPaths = { + "directoryTest" + File.separator + "testDir123" + File.separator + "anotherDir1" + File.separator + + "file1.dat", + "directoryTest" + File.separator + "test_dir_123" + File.separator + "anotherDir2" + File.separator + + "file1.dat", + "directoryTest" + File.separator + "test-dir-123" + File.separator + "anotherDir3" + File.separator + + "file1.dat" + }; + + String[] includedPaths = { + "directoryTest" + File.separator + "testDir123" + File.separator + "file1.dat", + "directoryTest" + File.separator + "test_dir_123" + File.separator + "file1.dat", + "directoryTest" + File.separator + "test-dir-123" + File.separator + "file1.dat" + }; + + final Set scannedDirSet = new HashSet(); + + DirectoryScanner ds = new DirectoryScanner() + { + @Override + protected void scandir( File dir, String vpath, boolean fast ) + { + scannedDirSet.add( dir.getName() ); + super.scandir( dir, vpath, fast ); + } + + }; + + // one '*' matches only ONE directory level + String[] includes = { "directoryTest" + File.separator + "*" + File.separator + "file1.dat" }; + ds.setIncludes( includes ); + ds.setBasedir( new File( testDir ) ); + ds.scan(); + + assertInclusionsAndExclusions( ds.getIncludedFiles(), excludedPaths, includedPaths ); + + Set expectedScannedDirSet = + new HashSet( Arrays.asList( "io", "directoryTest", "testDir123", "test_dir_123", "test-dir-123" ) ); + + assertEquals( expectedScannedDirSet, scannedDirSet ); + } + + /** + *

                    testIsSymbolicLink.

                    + * + * @throws java.io.IOException if any. + */ + @Test + public void testIsSymbolicLink() + throws IOException + { + assumeTrue( checkTestFilesSymlinks() ); + + final File directory = new File( "src/test/resources/symlinks/src" ); + DirectoryScanner ds = new DirectoryScanner(); + assertTrue( ds.isSymbolicLink( directory, "symR" ) ); + assertTrue( ds.isSymbolicLink( directory, "symDir" ) ); + assertFalse( ds.isSymbolicLink( directory, "fileR.txt" ) ); + assertFalse( ds.isSymbolicLink( directory, "aRegularDir" ) ); + } + + /** + *

                    testIsParentSymbolicLink.

                    + * + * @throws java.io.IOException if any. + */ + @Test + public void testIsParentSymbolicLink() + throws IOException + { + assumeTrue( checkTestFilesSymlinks() ); + + final File directory = new File( "src/test/resources/symlinks/src" ); + DirectoryScanner ds = new DirectoryScanner(); + assertFalse( ds.isParentSymbolicLink( directory, "symR" ) ); + assertFalse( ds.isParentSymbolicLink( directory, "symDir" ) ); + assertFalse( ds.isParentSymbolicLink( directory, "fileR.txt" ) ); + assertFalse( ds.isParentSymbolicLink( directory, "aRegularDir" ) ); + assertFalse( ds.isParentSymbolicLink( new File( directory, "aRegularDir" ), "aRegulatFile.txt" ) ); + assertTrue( ds.isParentSymbolicLink( new File( directory, "symDir" ), "targetFile.txt" ) ); + assertTrue( ds.isParentSymbolicLink( new File( directory, "symLinkToDirOnTheOutside" ), + "FileInDirOnTheOutside.txt" ) ); + } + + private void printTestHeader() + { + StackTraceElement ste = new Throwable().getStackTrace()[1]; + System.out.println( "Test: " + ste.getMethodName() ); + } + + private void assertInclusionsAndExclusions( String[] files, String[] excludedPaths, String... includedPaths ) + { + Arrays.sort( files ); + + System.out.println( "Included files: " ); + for ( String file : files ) + { + System.out.println( file ); + } + + List failedToExclude = new ArrayList(); + for ( String excludedPath : excludedPaths ) + { + String alt = excludedPath.replace( '/', '\\' ); + System.out.println( "Searching for exclusion as: " + excludedPath + "\nor: " + alt ); + if ( Arrays.binarySearch( files, excludedPath ) > -1 || Arrays.binarySearch( files, alt ) > -1 ) + { + failedToExclude.add( excludedPath ); + } + } + + List failedToInclude = new ArrayList(); + for ( String includedPath : includedPaths ) + { + String alt = includedPath.replace( '/', '\\' ); + System.out.println( "Searching for inclusion as: " + includedPath + "\nor: " + alt ); + if ( Arrays.binarySearch( files, includedPath ) < 0 && Arrays.binarySearch( files, alt ) < 0 ) + { + failedToInclude.add( includedPath ); + } + } + + StringBuilder buffer = new StringBuilder(); + if ( !failedToExclude.isEmpty() ) + { + buffer.append( "Should NOT have included:\n" ).append( StringUtils.join( failedToExclude.iterator(), + "\n\t- " ) ); + } + + if ( !failedToInclude.isEmpty() ) + { + if ( buffer.length() > 0 ) + { + buffer.append( "\n\n" ); + } + + buffer.append( "Should have included:\n" ).append( StringUtils.join( failedToInclude.iterator(), + "\n\t- " ) ); + } + + if ( buffer.length() > 0 ) + { + fail( buffer.toString() ); + } + } + + private void createFiles( File dir, String... paths ) + throws IOException + { + for ( String path1 : paths ) + { + String path = path1.replace( '/', File.separatorChar ).replace( '\\', File.separatorChar ); + File file = new File( dir, path ); + + if ( path.endsWith( File.separator ) ) + { + file.mkdirs(); + } + else + { + if ( file.getParentFile() != null ) + { + file.getParentFile().mkdirs(); + } + + createFile( file, 0 ); + } + } + } } diff --git a/src/test/java/org/codehaus/plexus/util/DirectoryWalkerTest.java b/src/test/java/org/codehaus/plexus/util/DirectoryWalkerTest.java index a6080d65..757ce718 100644 --- a/src/test/java/org/codehaus/plexus/util/DirectoryWalkerTest.java +++ b/src/test/java/org/codehaus/plexus/util/DirectoryWalkerTest.java @@ -16,18 +16,34 @@ * limitations under the License. */ +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + import java.io.File; -import junit.framework.TestCase; +import org.junit.Test; -public class DirectoryWalkerTest extends TestCase { +/** + *

                    DirectoryWalkerTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ +public class DirectoryWalkerTest +{ + /** + *

                    testDirectoryWalk.

                    + */ + @Test public void testDirectoryWalk() { DirectoryWalker walker = new DirectoryWalker(); walker.addSCMExcludes(); - walker.setBaseDir( new File("src/test/resources/directorywalker") ); + walker.setBaseDir( new File( "src/test/resources/directorywalker" ) ); WalkCollector collector = new WalkCollector(); walker.addDirectoryWalkListener( collector ); diff --git a/src/test/java/org/codehaus/plexus/util/FileBasedTestCase.java b/src/test/java/org/codehaus/plexus/util/FileBasedTestCase.java index 90c82131..3e111b4e 100644 --- a/src/test/java/org/codehaus/plexus/util/FileBasedTestCase.java +++ b/src/test/java/org/codehaus/plexus/util/FileBasedTestCase.java @@ -16,30 +16,38 @@ * limitations under the License. */ +import static org.junit.Assert.assertTrue; + import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.io.PrintStream; +import java.io.PrintWriter; import java.io.Writer; +import java.nio.file.Files; import java.util.Arrays; import junit.framework.AssertionFailedError; -import junit.framework.TestCase; - -import org.codehaus.plexus.util.FileUtils; /** * Base class for testcases doing tests with files. * * @author Jeremias Maerki + * @version $Id: $Id + * @since 3.4.0 */ public abstract class FileBasedTestCase - extends TestCase { private static File testDir; + /** + *

                    getTestDirectory.

                    + * + * @return a {@link java.io.File} object. + */ public static File getTestDirectory() { if ( testDir == null ) @@ -49,6 +57,14 @@ public static File getTestDirectory() return testDir; } + /** + *

                    createFile.

                    + * + * @param file a {@link java.io.File} object. + * @param size a long. + * @return an array of {@link byte} objects. + * @throws java.io.IOException if any. + */ protected byte[] createFile( final File file, final long size ) throws IOException { @@ -59,7 +75,7 @@ protected byte[] createFile( final File file, final long size ) byte[] data = generateTestData( size ); - final BufferedOutputStream output = new BufferedOutputStream( new java.io.FileOutputStream( file ) ); + final BufferedOutputStream output = new BufferedOutputStream( Files.newOutputStream( file.toPath() ) ); try { @@ -73,6 +89,13 @@ protected byte[] createFile( final File file, final long size ) } } + /** + *

                    createSymlink.

                    + * + * @param link a {@link java.io.File} object. + * @param target a {@link java.io.File} object. + * @return a boolean. + */ protected boolean createSymlink( final File link, final File target ) { try @@ -81,7 +104,9 @@ protected boolean createSymlink( final File link, final File target ) Process process = Runtime.getRuntime().exec( args ); process.waitFor(); if ( 0 != process.exitValue() ) + { return false; + } } catch ( Exception e ) { @@ -91,6 +116,12 @@ protected boolean createSymlink( final File link, final File target ) return true; } + /** + *

                    generateTestData.

                    + * + * @param size a long. + * @return an array of {@link byte} objects. + */ protected byte[] generateTestData( final long size ) { try @@ -105,25 +136,39 @@ protected byte[] generateTestData( final long size ) } } + /** + *

                    generateTestData.

                    + * + * @param out a {@link java.io.OutputStream} object. + * @param size a long. + * @throws java.io.IOException if any. + */ protected void generateTestData( final OutputStream out, final long size ) throws IOException { for ( int i = 0; i < size; i++ ) { - //output.write((byte)'X'); + // output.write((byte)'X'); // nice varied byte pattern compatible with Readers and Writers out.write( (byte) ( ( i % 127 ) + 1 ) ); } } - protected File newFile( String filename ) throws IOException + /** + *

                    newFile.

                    + * + * @param filename a {@link java.lang.String} object. + * @return a {@link java.io.File} object. + * @throws java.io.IOException if any. + */ + protected File newFile( String filename ) + throws IOException { final File destination = new File( getTestDirectory(), filename ); /* - assertTrue( filename + "Test output data file shouldn't previously exist", - !destination.exists() ); - */ + * assertTrue( filename + "Test output data file shouldn't previously exist", !destination.exists() ); + */ if ( destination.exists() ) { FileUtils.forceDelete( destination ); @@ -131,6 +176,13 @@ protected File newFile( String filename ) throws IOException return destination; } + /** + *

                    checkFile.

                    + * + * @param file a {@link java.io.File} object. + * @param referenceFile a {@link java.io.File} object. + * @throws java.lang.Exception if any. + */ protected void checkFile( final File file, final File referenceFile ) throws Exception { @@ -138,36 +190,52 @@ protected void checkFile( final File file, final File referenceFile ) assertEqualContent( referenceFile, file ); } - protected void checkWrite( final OutputStream output ) throws Exception + /** + *

                    checkWrite.

                    + * + * @param output a {@link java.io.OutputStream} object. + * @throws java.lang.Exception if any. + */ + protected void checkWrite( final OutputStream output ) + throws Exception { try { - new java.io.PrintStream( output ).write( 0 ); + new PrintStream( output ).write( 0 ); } catch ( final Throwable t ) { - throw new AssertionFailedError( - "The copy() method closed the stream " - + "when it shouldn't have. " + throw new AssertionFailedError( "The copy() method closed the stream " + "when it shouldn't have. " + t.getMessage() ); } } - protected void checkWrite( final Writer output ) throws Exception + /** + *

                    checkWrite.

                    + * + * @param output a {@link java.io.Writer} object. + * @throws java.lang.Exception if any. + */ + protected void checkWrite( final Writer output ) + throws Exception { try { - new java.io.PrintWriter( output ).write( 'a' ); + new PrintWriter( output ).write( 'a' ); } catch ( final Throwable t ) { - throw new AssertionFailedError( - "The copy() method closed the stream " - + "when it shouldn't have. " + throw new AssertionFailedError( "The copy() method closed the stream " + "when it shouldn't have. " + t.getMessage() ); } } + /** + *

                    deleteFile.

                    + * + * @param file a {@link java.io.File} object. + * @throws java.lang.Exception if any. + */ protected void deleteFile( final File file ) throws Exception { @@ -185,16 +253,15 @@ protected void deleteFile( final File file ) private void assertEqualContent( final File f0, final File f1 ) throws IOException { - /* This doesn't work because the filesize isn't updated until the file - * is closed. - assertTrue( "The files " + f0 + " and " + f1 + - " have differing file sizes (" + f0.length() + - " vs " + f1.length() + ")", ( f0.length() == f1.length() ) ); - */ - final InputStream is0 = new java.io.FileInputStream( f0 ); + /* + * This doesn't work because the filesize isn't updated until the file is closed. assertTrue( "The files " + f0 + * + " and " + f1 + " have differing file sizes (" + f0.length() + " vs " + f1.length() + ")", ( f0.length() == + * f1.length() ) ); + */ + final InputStream is0 = Files.newInputStream( f0.toPath() ); try { - final InputStream is1 = new java.io.FileInputStream( f1 ); + final InputStream is1 = Files.newInputStream( f1.toPath() ); try { final byte[] buf0 = new byte[1024]; @@ -206,12 +273,11 @@ private void assertEqualContent( final File f0, final File f1 ) { n0 = is0.read( buf0 ); n1 = is1.read( buf1 ); - assertTrue( "The files " + f0 + " and " + f1 + - " have differing number of bytes available (" + n0 + - " vs " + n1 + ")", ( n0 == n1 ) ); + assertTrue( "The files " + f0 + " and " + f1 + " have differing number of bytes available (" + n0 + + " vs " + n1 + ")", ( n0 == n1 ) ); - assertTrue( "The files " + f0 + " and " + f1 + - " have different content", Arrays.equals( buf0, buf1 ) ); + assertTrue( "The files " + f0 + " and " + f1 + " have different content", + Arrays.equals( buf0, buf1 ) ); } } finally @@ -225,21 +291,24 @@ private void assertEqualContent( final File f0, final File f1 ) } } - /** Assert that the content of a file is equal to that in a byte[]. */ + /** + * Assert that the content of a file is equal to that in a byte[]. + * + * @param b0 an array of {@link byte} objects. + * @param file a {@link java.io.File} object. + * @throws java.io.IOException if any. + */ protected void assertEqualContent( final byte[] b0, final File file ) throws IOException { - final InputStream is = new java.io.FileInputStream( file ); + final InputStream is = Files.newInputStream( file.toPath() ); try { byte[] b1 = new byte[b0.length]; int numRead = is.read( b1 ); assertTrue( "Different number of bytes", numRead == b0.length && is.available() == 0 ); - for ( int i = 0; - i < numRead; - assertTrue( "Byte " + i + " differs (" + b0[i] + " != " + b1[i] + ")", - b0[i] == b1[i] ), i++ - ) + for ( int i = 0; i < numRead; assertTrue( "Byte " + i + " differs (" + b0[i] + " != " + b1[i] + ")", + b0[i] == b1[i] ), i++ ) ; } finally @@ -248,6 +317,11 @@ protected void assertEqualContent( final byte[] b0, final File file ) } } + /** + *

                    assertIsDirectory.

                    + * + * @param file a {@link java.io.File} object. + */ protected void assertIsDirectory( File file ) { assertTrue( "The File doesn't exists: " + file.getAbsolutePath(), file.exists() ); @@ -255,6 +329,11 @@ protected void assertIsDirectory( File file ) assertTrue( "The File isn't a directory: " + file.getAbsolutePath(), file.isDirectory() ); } + /** + *

                    assertIsFile.

                    + * + * @param file a {@link java.io.File} object. + */ protected void assertIsFile( File file ) { assertTrue( "The File doesn't exists: " + file.getAbsolutePath(), file.exists() ); diff --git a/src/test/java/org/codehaus/plexus/util/FileUtilsTest.java b/src/test/java/org/codehaus/plexus/util/FileUtilsTest.java index 6baed082..4e9093d0 100644 --- a/src/test/java/org/codehaus/plexus/util/FileUtilsTest.java +++ b/src/test/java/org/codehaus/plexus/util/FileUtilsTest.java @@ -16,10 +16,15 @@ * limitations under the License. */ +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import java.io.ByteArrayInputStream; import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -27,19 +32,29 @@ import java.io.Reader; import java.io.Writer; import java.net.URL; +import java.nio.file.Files; import java.util.Properties; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TestName; + /** * This is used to test FileUtils for correctness. * * @author Peter Donald * @author Matthew Hawthorne - * @version $Id$ * @see FileUtils + * @version $Id: $Id + * @since 3.4.0 */ public final class FileUtilsTest extends FileBasedTestCase { + @Rule + public TestName name = new TestName(); + // Test data /** @@ -55,6 +70,11 @@ public final class FileUtilsTest private static int testFile2Size; + /** + *

                    Constructor for FileUtilsTest.

                    + * + * @throws java.lang.Exception if any. + */ public FileUtilsTest() throws Exception { @@ -66,9 +86,12 @@ public FileUtilsTest() } /** - * @see junit.framework.TestCase#setUp() + *

                    setUp.

                    + * + * @throws java.lang.Exception if any. */ - protected void setUp() + @Before + public void setUp() throws Exception { getTestDirectory().mkdirs(); @@ -82,6 +105,10 @@ protected void setUp() // byteCountToDisplaySize + /** + *

                    testByteCountToDisplaySize.

                    + */ + @Test public void testByteCountToDisplaySize() { assertEquals( FileUtils.byteCountToDisplaySize( 0 ), "0 bytes" ); @@ -92,6 +119,10 @@ public void testByteCountToDisplaySize() // waitFor + /** + *

                    testWaitFor.

                    + */ + @Test public void testWaitFor() { FileUtils.waitFor( "", -1 ); @@ -99,6 +130,12 @@ public void testWaitFor() FileUtils.waitFor( "", 2 ); } + /** + *

                    testToFile.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testToFile() throws Exception { @@ -108,6 +145,12 @@ public void testToFile() assertEquals( "name #%20?{}[]<>.txt", file.getName() ); } + /** + *

                    testToFileBadProtocol.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testToFileBadProtocol() throws Exception { @@ -116,6 +159,12 @@ public void testToFileBadProtocol() assertNull( file ); } + /** + *

                    testToFileNull.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testToFileNull() throws Exception { @@ -124,15 +173,21 @@ public void testToFileNull() } // Hacked to sanity by Trygve + /** + *

                    testToURLs.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testToURLs() throws Exception { - File[] files = new File[]{new File( "file1" ), new File( "file2" ),}; + File[] files = new File[] { new File( "file1" ), new File( "file2" ), }; URL[] urls = FileUtils.toURLs( files ); - assertEquals( "The length of the generated URL's is not equals to the length of files. " + "Was " + files - .length + ", expected " + urls.length, files.length, urls.length ); + assertEquals( "The length of the generated URL's is not equals to the length of files. " + "Was " + files.length + + ", expected " + urls.length, files.length, urls.length ); for ( int i = 0; i < urls.length; i++ ) { @@ -140,6 +195,10 @@ public void testToURLs() } } + /** + *

                    testGetFilesFromExtension.

                    + */ + @Test public void testGetFilesFromExtension() { // TODO I'm not sure what is supposed to happen here @@ -147,22 +206,23 @@ public void testGetFilesFromExtension() // Non-existent files final String[] emptyFileNames = - FileUtils.getFilesFromExtension( getTestDirectory().getAbsolutePath(), new String[]{"java"} ); + FileUtils.getFilesFromExtension( getTestDirectory().getAbsolutePath(), new String[] { "java" } ); assertTrue( emptyFileNames.length == 0 ); // Existing files // TODO Figure out how to test this /* - final String[] fileNames = - FileUtils.getFilesFromExtension( - getClass().getResource("/java/util/").getFile(), - new String[] { "class" }); - assertTrue(fileNames.length > 0); - */ + * final String[] fileNames = FileUtils.getFilesFromExtension( getClass().getResource("/java/util/").getFile(), + * new String[] { "class" }); assertTrue(fileNames.length > 0); + */ } // mkdir + /** + *

                    testMkdir.

                    + */ + @Test public void testMkdir() { final File dir = new File( getTestDirectory(), "testdir" ); @@ -178,7 +238,7 @@ public void testMkdir() FileUtils.mkdir( winFile.getAbsolutePath() ); assertTrue( false ); } - catch ( IllegalArgumentException e) + catch ( IllegalArgumentException e ) { assertTrue( true ); } @@ -187,11 +247,17 @@ public void testMkdir() // contentEquals + /** + *

                    testContentEquals.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testContentEquals() throws Exception { // Non-existent files - final File file = new File( getTestDirectory(), getName() ); + final File file = new File( getTestDirectory(), name.getMethodName() ); assertTrue( FileUtils.contentEquals( file, file ) ); // TODO Should comparing 2 directories throw an Exception instead of returning false? @@ -199,11 +265,11 @@ public void testContentEquals() assertTrue( !FileUtils.contentEquals( getTestDirectory(), getTestDirectory() ) ); // Different files - final File objFile1 = new File( getTestDirectory(), getName() + ".object" ); + final File objFile1 = new File( getTestDirectory(), name.getMethodName() + ".object" ); objFile1.deleteOnExit(); FileUtils.copyURLToFile( getClass().getResource( "/java/lang/Object.class" ), objFile1 ); - final File objFile2 = new File( getTestDirectory(), getName() + ".collection" ); + final File objFile2 = new File( getTestDirectory(), name.getMethodName() + ".collection" ); objFile2.deleteOnExit(); FileUtils.copyURLToFile( getClass().getResource( "/java/util/Collection.class" ), objFile2 ); @@ -216,35 +282,51 @@ public void testContentEquals() // removePath + /** + *

                    testRemovePath.

                    + */ + @Test public void testRemovePath() { - final String fileName = FileUtils.removePath( new File( getTestDirectory(), getName() ).getAbsolutePath() ); - assertEquals( getName(), fileName ); + final String fileName = + FileUtils.removePath( new File( getTestDirectory(), name.getMethodName() ).getAbsolutePath() ); + assertEquals( name.getMethodName(), fileName ); } // getPath + /** + *

                    testGetPath.

                    + */ + @Test public void testGetPath() { - final String fileName = FileUtils.getPath( new File( getTestDirectory(), getName() ).getAbsolutePath() ); + final String fileName = + FileUtils.getPath( new File( getTestDirectory(), name.getMethodName() ).getAbsolutePath() ); assertEquals( getTestDirectory().getAbsolutePath(), fileName ); } // copyURLToFile + /** + *

                    testCopyURLToFile.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCopyURLToFile() throws Exception { // Creates file - final File file = new File( getTestDirectory(), getName() ); + final File file = new File( getTestDirectory(), name.getMethodName() ); file.deleteOnExit(); // Loads resource final String resourceName = "/java/lang/Object.class"; FileUtils.copyURLToFile( getClass().getResource( resourceName ), file ); - // Tests that resuorce was copied correctly - final FileInputStream fis = new FileInputStream( file ); + // Tests that resource was copied correctly + final InputStream fis = Files.newInputStream( file.toPath() ); try { assertTrue( "Content is not equal.", @@ -258,11 +340,15 @@ public void testCopyURLToFile() // catPath + /** + *

                    testCatPath.

                    + */ + @Test public void testCatPath() { // TODO StringIndexOutOfBoundsException thrown if file doesn't contain slash. // Is this acceptable? - //assertEquals("", FileUtils.catPath("a", "b")); + // assertEquals("", FileUtils.catPath("a", "b")); assertEquals( "/a/c", FileUtils.catPath( "/a/b", "c" ) ); assertEquals( "/a/d", FileUtils.catPath( "/a/b/c", "../d" ) ); @@ -270,6 +356,12 @@ public void testCatPath() // forceMkdir + /** + *

                    testForceMkdir.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testForceMkdir() throws Exception { @@ -277,7 +369,7 @@ public void testForceMkdir() FileUtils.forceMkdir( getTestDirectory() ); // Creates test file - final File testFile = new File( getTestDirectory(), getName() ); + final File testFile = new File( getTestDirectory(), name.getMethodName() ); testFile.deleteOnExit(); testFile.createNewFile(); assertTrue( "Test file does not exist.", testFile.exists() ); @@ -307,7 +399,7 @@ public void testForceMkdir() FileUtils.forceMkdir( winFile ); assertTrue( false ); } - catch ( IllegalArgumentException e) + catch ( IllegalArgumentException e ) { assertTrue( true ); } @@ -316,10 +408,16 @@ public void testForceMkdir() // sizeOfDirectory + /** + *

                    testSizeOfDirectory.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testSizeOfDirectory() throws Exception { - final File file = new File( getTestDirectory(), getName() ); + final File file = new File( getTestDirectory(), name.getMethodName() ); // Non-existent file try @@ -356,11 +454,20 @@ public void testSizeOfDirectory() // TODO Finish test + /** + *

                    XtestIsFileNewer.

                    + */ public void XtestIsFileNewer() { } // copyFile + /** + *

                    testCopyFile1.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCopyFile1() throws Exception { @@ -370,6 +477,12 @@ public void testCopyFile1() assertTrue( "Check Full copy", destination.length() == testFile1Size ); } + /** + *

                    testCopyFile2.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCopyFile2() throws Exception { @@ -379,8 +492,88 @@ public void testCopyFile2() assertTrue( "Check Full copy", destination.length() == testFile2Size ); } + /** + * ensure we create directory tree for destination + * + * @throws java.lang.Exception + */ + @Test + public void testCopyFile3() + throws Exception + { + File destDirectory = new File( getTestDirectory(), "foo/bar/testcopy" ); + if ( destDirectory.exists() ) + { + destDirectory.delete(); + } + final File destination = new File( destDirectory, "copy2.txt" ); + FileUtils.copyFile( testFile1, destination ); + assertTrue( "Check Exist", destination.exists() ); + assertTrue( "Check Full copy", destination.length() == testFile2Size ); + } + + // linkFile + /** + *

                    testLinkFile1.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testLinkFile1() + throws Exception + { + final File destination = new File( getTestDirectory(), "link1.txt" ); + FileUtils.linkFile( testFile1, destination ); + assertTrue( "Check Exist", destination.exists() ); + assertTrue( "Check File length", destination.length() == testFile1Size ); + assertTrue( "Check is link", Files.isSymbolicLink(destination.toPath())); + } + + /** + *

                    testLinkFile2.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testLinkFile2() + throws Exception + { + final File destination = new File( getTestDirectory(), "link2.txt" ); + FileUtils.linkFile( testFile1, destination ); + assertTrue( "Check Exist", destination.exists() ); + assertTrue( "Check File length", destination.length() == testFile2Size ); + assertTrue( "Check is link", Files.isSymbolicLink(destination.toPath())); + } + + /** + * ensure we create directory tree for destination + * + * @throws java.lang.Exception + */ + @Test + public void testLinkFile3() + throws Exception + { + File destDirectory = new File( getTestDirectory(), "foo/bar/testlink" ); + if ( destDirectory.exists() ) + { + destDirectory.delete(); + } + final File destination = new File( destDirectory, "link2.txt" ); + FileUtils.linkFile( testFile1, destination ); + assertTrue( "Check Exist", destination.exists() ); + assertTrue( "Check File length", destination.length() == testFile2Size ); + assertTrue( "Check is link", Files.isSymbolicLink(destination.toPath())); + } + // copyFileIfModified + /** + *

                    testCopyIfModifiedWhenSourceIsNewer.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCopyIfModifiedWhenSourceIsNewer() throws Exception { @@ -391,17 +584,24 @@ public void testCopyIfModifiedWhenSourceIsNewer() FileUtils.copyFile( testFile1, destination ); // Make sure source is newer - Thread.sleep( 1000 ); + reallySleep( 1000 ); // Place source File source = new File( getTestDirectory(), "copy1.txt" ); FileUtils.copyFile( testFile1, source ); + source.setLastModified( System.currentTimeMillis() ); // Copy will occur when source is newer assertTrue( "Failed copy. Target file should have been updated.", FileUtils.copyFileIfModified( source, destination ) ); } + /** + *

                    testCopyIfModifiedWhenSourceIsOlder.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCopyIfModifiedWhenSourceIsOlder() throws Exception { @@ -411,19 +611,48 @@ public void testCopyIfModifiedWhenSourceIsOlder() File source = new File( getTestDirectory() + "copy1.txt" ); FileUtils.copyFile( testFile1, source ); - // Make sure desintation is newer - Thread.sleep( 1000 ); + // Make sure destination is newer + reallySleep( 1000 ); // Place destination - File desintation = new File( getTestDirectory(), "/temp/copy1.txt" ); - FileUtils.copyFile( testFile1, desintation ); + File destination = new File( getTestDirectory(), "/temp/copy1.txt" ); + FileUtils.copyFile( testFile1, destination ); + + // Copy will occur when destination is newer + assertFalse( "Source file should not have been copied.", FileUtils.copyFileIfModified( source, destination ) ); + } - // Copy will occur when desintation is newer - assertFalse( "Source file should not have been copied.", FileUtils.copyFileIfModified( source, desintation ) ); + /** + *

                    testCopyIfModifiedWhenSourceHasZeroDate.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testCopyIfModifiedWhenSourceHasZeroDate() + throws Exception + { + FileUtils.forceMkdir( new File( getTestDirectory(), "temp" ) ); + + // Source modified on 1970-01-01T00:00Z + File source = new File( getTestDirectory(), "copy1.txt" ); + FileUtils.copyFile( testFile1, source ); + source.setLastModified( 0L ); + + // A non existing destination + File destination = new File( getTestDirectory(), "temp/copy1.txt" ); + + // Should copy the source to the non existing destination. + assertTrue( "Source file should have been copied.", FileUtils.copyFileIfModified( source, destination ) ); } // forceDelete + /** + *

                    testForceDeleteAFile1.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testForceDeleteAFile1() throws Exception { @@ -434,6 +663,12 @@ public void testForceDeleteAFile1() assertTrue( "Check No Exist", !destination.exists() ); } + /** + *

                    testForceDeleteAFile2.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testForceDeleteAFile2() throws Exception { @@ -446,6 +681,12 @@ public void testForceDeleteAFile2() // copyFileToDirectory + /** + *

                    testCopyFile1ToDir.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCopyFile1ToDir() throws Exception { @@ -460,6 +701,12 @@ public void testCopyFile1ToDir() assertTrue( "Check Full copy", destination.length() == testFile1Size ); } + /** + *

                    testCopyFile2ToDir.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCopyFile2ToDir() throws Exception { @@ -476,6 +723,12 @@ public void testCopyFile2ToDir() // copyFileToDirectoryIfModified + /** + *

                    testCopyFile1ToDirIfModified.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCopyFile1ToDirIfModified() throws Exception { @@ -501,6 +754,12 @@ public void testCopyFile1ToDirIfModified() assertTrue( "Timestamp was changed", timestamp == target.lastModified() ); } + /** + *

                    testCopyFile2ToDirIfModified.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCopyFile2ToDirIfModified() throws Exception { @@ -528,6 +787,12 @@ public void testCopyFile2ToDirIfModified() // forceDelete + /** + *

                    testForceDeleteDir.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testForceDeleteDir() throws Exception { @@ -537,6 +802,12 @@ public void testForceDeleteDir() // resolveFile + /** + *

                    testResolveFileDotDot.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testResolveFileDotDot() throws Exception { @@ -544,6 +815,12 @@ public void testResolveFileDotDot() assertEquals( "Check .. operator", file, getTestDirectory().getParentFile() ); } + /** + *

                    testResolveFileDot.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testResolveFileDot() throws Exception { @@ -553,15 +830,21 @@ public void testResolveFileDot() // normalize + /** + *

                    testNormalize.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testNormalize() throws Exception { - final String[] src = {"", "/", "///", "/foo", "/foo//", "/./", "/foo/./", "/foo/./bar", "/foo/../bar", + final String[] src = { "", "/", "///", "/foo", "/foo//", "/./", "/foo/./", "/foo/./bar", "/foo/../bar", "/foo/../bar/../baz", "/foo/bar/../../baz", "/././", "/foo/./../bar", "/foo/.././bar/", "//foo//./bar", - "/../", "/foo/../../"}; + "/../", "/foo/../../" }; - final String[] dest = {"", "/", "/", "/foo", "/foo/", "/", "/foo/", "/foo/bar", "/bar", "/baz", "/baz", "/", - "/bar", "/bar/", "/foo/bar", null, null}; + final String[] dest = { "", "/", "/", "/foo", "/foo/", "/", "/foo/", "/foo/bar", "/bar", "/baz", "/baz", "/", + "/bar", "/bar/", "/foo/bar", null, null }; assertEquals( "Oops, test writer goofed", src.length, dest.length ); @@ -574,7 +857,7 @@ public void testNormalize() private String replaceAll( String text, String lookFor, String replaceWith ) { - StringBuffer sb = new StringBuffer( text ); + StringBuilder sb = new StringBuilder( text ); while ( true ) { int idx = sb.indexOf( lookFor ); @@ -589,8 +872,11 @@ private String replaceAll( String text, String lookFor, String replaceWith ) /** * Test the FileUtils implementation. + * + * @throws java.lang.Exception if any. */ // Used to exist as IOTestCase class + @Test public void testFileUtils() throws Exception { @@ -600,7 +886,7 @@ public void testFileUtils() assertNotNull( path + " was not found.", url ); String filename = url.getFile(); - //The following line applies a fix for spaces in a path + // The following line applies a fix for spaces in a path filename = replaceAll( filename, "%20", " " ); final String filename2 = "test2.txt"; @@ -628,85 +914,98 @@ public void testFileUtils() } + /** + *

                    testGetExtension.

                    + */ + @Test public void testGetExtension() { final String[][] tests = - {{"filename.ext", "ext"} - , {"README", ""} - , {"domain.dot.com", "com"} - , {"image.jpeg", "jpeg"} - , {"folder" + File.separator + "image.jpeg", "jpeg"} - , {"folder" + File.separator + "README", ""}}; - - for ( int i = 0; i < tests.length; i++ ) + { { "filename.ext", "ext" }, { "README", "" }, { "domain.dot.com", "com" }, { "image.jpeg", "jpeg" }, + { "folder" + File.separator + "image.jpeg", "jpeg" }, { "folder" + File.separator + "README", "" } }; + + for ( String[] test : tests ) { - assertEquals( tests[i][1], FileUtils.getExtension( tests[i][0] ) ); - //assertEquals(tests[i][1], FileUtils.extension(tests[i][0])); + assertEquals( test[1], FileUtils.getExtension( test[0] ) ); + // assertEquals(tests[i][1], FileUtils.extension(tests[i][0])); } } + /** + *

                    testGetExtensionWithPaths.

                    + */ + @Test public void testGetExtensionWithPaths() { // Since the utilities are based on the separator for the platform // running the test, ensure we are using the right separator final String sep = File.separator; - final String[][] testsWithPaths = { - { sep + "tmp" + sep + "foo" + sep + "filename.ext", "ext"} - , {"C:" + sep + "temp" + sep + "foo" + sep + "filename.ext", "ext"} - , {"" + sep + "tmp" + sep + "foo.bar" + sep + "filename.ext", "ext"} - , {"C:" + sep + "temp" + sep + "foo.bar" + sep + "filename.ext", "ext"} - , {"" + sep + "tmp" + sep + "foo.bar" + sep + "README", ""} - , {"C:" + sep + "temp" + sep + "foo.bar" + sep + "README", ""} - , {".." + sep + "filename.ext", "ext"}, {"blabla", ""}}; - for ( int i = 0; i < testsWithPaths.length; i++ ) + final String[][] testsWithPaths = { { sep + "tmp" + sep + "foo" + sep + "filename.ext", "ext" }, + { "C:" + sep + "temp" + sep + "foo" + sep + "filename.ext", "ext" }, + { "" + sep + "tmp" + sep + "foo.bar" + sep + "filename.ext", "ext" }, + { "C:" + sep + "temp" + sep + "foo.bar" + sep + "filename.ext", "ext" }, + { "" + sep + "tmp" + sep + "foo.bar" + sep + "README", "" }, + { "C:" + sep + "temp" + sep + "foo.bar" + sep + "README", "" }, { ".." + sep + "filename.ext", "ext" }, + { "blabla", "" } }; + for ( String[] testsWithPath : testsWithPaths ) { - assertEquals( testsWithPaths[i][1], FileUtils.getExtension( testsWithPaths[i][0] ) ); - //assertEquals(testsWithPaths[i][1], FileUtils.extension(testsWithPaths[i][0])); + assertEquals( testsWithPath[1], FileUtils.getExtension( testsWithPath[0] ) ); + // assertEquals(testsWithPaths[i][1], FileUtils.extension(testsWithPaths[i][0])); } } + /** + *

                    testRemoveExtension.

                    + */ + @Test public void testRemoveExtension() { - final String[][] tests = {{"filename.ext", "filename"}, {"first.second.third.ext", "first.second.third"}, - {"README", "README"}, {"domain.dot.com", "domain.dot"}, {"image.jpeg", "image"}}; + final String[][] tests = { { "filename.ext", "filename" }, { "first.second.third.ext", "first.second.third" }, + { "README", "README" }, { "domain.dot.com", "domain.dot" }, { "image.jpeg", "image" } }; - for ( int i = 0; i < tests.length; i++ ) + for ( String[] test : tests ) { - assertEquals( tests[i][1], FileUtils.removeExtension( tests[i][0] ) ); - //assertEquals(tests[i][1], FileUtils.basename(tests[i][0])); + assertEquals( test[1], FileUtils.removeExtension( test[0] ) ); + // assertEquals(tests[i][1], FileUtils.basename(tests[i][0])); } } /* TODO: Reenable this test */ + /** + *

                    testRemoveExtensionWithPaths.

                    + */ + @Test public void testRemoveExtensionWithPaths() { // Since the utilities are based on the separator for the platform // running the test, ensure we are using the right separator final String sep = File.separator; - final String[][] testsWithPaths = - {{sep + "tmp" + sep + "foo" + sep + "filename.ext" - , sep + "tmp" + sep + "foo" + sep + "filename"} - , {"C:" + sep + "temp" + sep + "foo" + sep + "filename.ext" - , "C:" + sep + "temp" + sep + "foo" + sep + "filename"} - , {sep + "tmp" + sep + "foo.bar" + sep + "filename.ext" - , sep + "tmp" + sep + "foo.bar" + sep + "filename"} - , {"C:" + sep + "temp" + sep + "foo.bar" + sep + "filename.ext" - , "C:" + sep + "temp" + sep + "foo.bar" + sep + "filename"} - , {sep + "tmp" + sep + "foo.bar" + sep + "README" - , sep + "tmp" + sep + "foo.bar" + sep + "README"} - , {"C:" + sep + "temp" + sep + "foo.bar" + sep + "README" - , "C:" + sep + "temp" + sep + "foo.bar" + sep + "README"} - , {".." + sep + "filename.ext" - , ".." + sep + "filename"}}; - - for ( int i = 0; i < testsWithPaths.length; i++ ) + final String[][] testsWithPaths = { + { sep + "tmp" + sep + "foo" + sep + "filename.ext", sep + "tmp" + sep + "foo" + sep + "filename" }, + { "C:" + sep + "temp" + sep + "foo" + sep + "filename.ext", + "C:" + sep + "temp" + sep + "foo" + sep + "filename" }, + { sep + "tmp" + sep + "foo.bar" + sep + "filename.ext", sep + "tmp" + sep + "foo.bar" + sep + "filename" }, + { "C:" + sep + "temp" + sep + "foo.bar" + sep + "filename.ext", + "C:" + sep + "temp" + sep + "foo.bar" + sep + "filename" }, + { sep + "tmp" + sep + "foo.bar" + sep + "README", sep + "tmp" + sep + "foo.bar" + sep + "README" }, + { "C:" + sep + "temp" + sep + "foo.bar" + sep + "README", + "C:" + sep + "temp" + sep + "foo.bar" + sep + "README" }, + { ".." + sep + "filename.ext", ".." + sep + "filename" } }; + + for ( String[] testsWithPath : testsWithPaths ) { - assertEquals( testsWithPaths[i][1], FileUtils.removeExtension( testsWithPaths[i][0] ) ); - //assertEquals(testsWithPaths[i][1], FileUtils.basename(testsWithPaths[i][0])); + assertEquals( testsWithPath[1], FileUtils.removeExtension( testsWithPath[0] ) ); + // assertEquals(testsWithPaths[i][1], FileUtils.basename(testsWithPaths[i][0])); } } - public void testCopyDirectoryStructureWithAEmptyDirectoryStruture() + /** + *

                    testCopyDirectoryStructureWithAEmptyDirectoryStructure.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testCopyDirectoryStructureWithAEmptyDirectoryStructure() throws Exception { File from = new File( getTestDirectory(), "from" ); @@ -722,6 +1021,12 @@ public void testCopyDirectoryStructureWithAEmptyDirectoryStruture() FileUtils.copyDirectoryStructure( from, to ); } + /** + *

                    testCopyDirectoryStructureWithAPopulatedStructure.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCopyDirectoryStructureWithAPopulatedStructure() throws Exception { @@ -781,6 +1086,12 @@ public void testCopyDirectoryStructureWithAPopulatedStructure() checkFile( f2_1, new File( to, "2/2_1/2_1.txt" ) ); } + /** + *

                    testCopyDirectoryStructureIfModified.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCopyDirectoryStructureIfModified() throws Exception { @@ -825,9 +1136,9 @@ public void testCopyDirectoryStructureIfModified() FileUtils.copyDirectoryStructureIfModified( from, to ); - File files[] = {new File( to, "root.txt" ), new File( to, "2/2.txt" ), new File( to, "2/2_1/2_1.txt" )}; + File files[] = { new File( to, "root.txt" ), new File( to, "2/2.txt" ), new File( to, "2/2_1/2_1.txt" ) }; - long timestamps[] = {files[0].lastModified(), files[1].lastModified(), files[2].lastModified()}; + long timestamps[] = { files[0].lastModified(), files[1].lastModified(), files[2].lastModified() }; checkFile( fRoot, files[0] ); @@ -860,6 +1171,12 @@ public void testCopyDirectoryStructureIfModified() } + /** + *

                    testCopyDirectoryStructureToSelf.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCopyDirectoryStructureToSelf() throws Exception { @@ -901,13 +1218,17 @@ public void testCopyDirectoryStructureToSelf() } } + /** + *

                    testFilteredFileCopy.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testFilteredFileCopy() throws Exception { File compareFile = new File( getTestDirectory(), "compare.txt" ); - OutputStream compareStream = new FileOutputStream( compareFile ); - compareStream.write( "This is a test. Test sample text\n".getBytes() ); - compareStream.flush(); + FileUtils.fileWrite( compareFile.getAbsolutePath(), "UTF-8", "This is a test. Test sample text\n" ); File destFile = new File( getTestDirectory(), "target.txt" ); @@ -915,20 +1236,18 @@ public void testFilteredFileCopy() filterProperties.setProperty( "s", "sample text" ); // test ${token} - FileUtils.FilterWrapper[] wrappers1 = new FileUtils.FilterWrapper[]{new FileUtils.FilterWrapper() + FileUtils.FilterWrapper[] wrappers1 = new FileUtils.FilterWrapper[] { new FileUtils.FilterWrapper() { public Reader getReader( Reader reader ) { return new InterpolationFilterReader( reader, filterProperties, "${", "}" ); } - }}; + } }; File srcFile = new File( getTestDirectory(), "root.txt" ); - OutputStream os = new FileOutputStream( srcFile ); - os.write( ( "This is a test. Test ${s}\n" ).getBytes() ); - os.flush(); + FileUtils.fileWrite( srcFile.getAbsolutePath(), "UTF-8", "This is a test. Test ${s}\n" ); - FileUtils.copyFile( srcFile, destFile, System.getProperty( "file.encoding" ), wrappers1 ); + FileUtils.copyFile( srcFile, destFile, "UTF-8", wrappers1 ); assertTrue( "Files should be equal.", FileUtils.contentEquals( compareFile, destFile ) ); srcFile.delete(); @@ -936,14 +1255,18 @@ public Reader getReader( Reader reader ) compareFile.delete(); } + /** + *

                    testFilteredWithoutFilterAndOlderFile.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testFilteredWithoutFilterAndOlderFile() throws Exception { String content = "This is a test."; File sourceFile = new File( getTestDirectory(), "source.txt" ); - OutputStream contentStream = new FileOutputStream( sourceFile ); - contentStream.write( content.getBytes() ); - contentStream.flush(); + FileUtils.fileWrite( sourceFile.getAbsolutePath(), "UTF-8", content ); File destFile = new File( getTestDirectory(), "target.txt" ); if ( destFile.exists() ) @@ -951,33 +1274,34 @@ public void testFilteredWithoutFilterAndOlderFile() destFile.delete(); } FileUtils.copyFile( sourceFile, destFile, null, null ); - assertEqualContent( content.getBytes(), destFile ); + assertEqualContent( content.getBytes( "UTF-8" ), destFile ); String newercontent = "oldercontent"; File olderFile = new File( getTestDirectory(), "oldersource.txt" ); - OutputStream olderContentStream = new FileOutputStream( olderFile ); - olderContentStream.write( newercontent.getBytes() ); - olderContentStream.flush(); + FileUtils.fileWrite( olderFile.getAbsolutePath(), "UTF-8", newercontent ); // very old file ;-) olderFile.setLastModified( 1 ); destFile = new File( getTestDirectory(), "target.txt" ); FileUtils.copyFile( olderFile, destFile, null, null ); - String destFileContent = IOUtil.toString( new FileInputStream( destFile ) ); + String destFileContent = FileUtils.fileRead( destFile, "UTF-8" ); assertEquals( content, destFileContent ); } - + /** + *

                    testFilteredWithoutFilterAndOlderFileAndOverwrite.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testFilteredWithoutFilterAndOlderFileAndOverwrite() throws Exception { String content = "This is a test."; File sourceFile = new File( getTestDirectory(), "source.txt" ); - OutputStream contentStream = new FileOutputStream( sourceFile ); - contentStream.write( content.getBytes() ); - contentStream.flush(); + FileUtils.fileWrite( sourceFile.getAbsolutePath(), "UTF-8", content ); File destFile = new File( getTestDirectory(), "target.txt" ); if ( destFile.exists() ) @@ -985,25 +1309,30 @@ public void testFilteredWithoutFilterAndOlderFileAndOverwrite() destFile.delete(); } FileUtils.copyFile( sourceFile, destFile, null, null ); - assertEqualContent( content.getBytes(), destFile ); + assertEqualContent( content.getBytes( "UTF-8" ), destFile ); String newercontent = "oldercontent"; File olderFile = new File( getTestDirectory(), "oldersource.txt" ); - OutputStream olderContentStream = new FileOutputStream( olderFile ); - olderContentStream.write( newercontent.getBytes() ); - olderContentStream.flush(); + FileUtils.fileWrite( olderFile.getAbsolutePath(), "UTF-8", newercontent ); // very old file ;-) olderFile.setLastModified( 1 ); destFile = new File( getTestDirectory(), "target.txt" ); FileUtils.copyFile( olderFile, destFile, null, null, true ); - String destFileContent = IOUtil.toString( new FileInputStream( destFile ) ); + String destFileContent = FileUtils.fileRead( destFile, "UTF-8" ); assertEquals( newercontent, destFileContent ); } - public void testFileRead() throws IOException + /** + *

                    testFileRead.

                    + * + * @throws java.io.IOException if any. + */ + @Test + public void testFileRead() + throws IOException { File testFile = new File( getTestDirectory(), "testFileRead.txt" ); String testFileName = testFile.getAbsolutePath(); @@ -1017,7 +1346,7 @@ public void testFileRead() throws IOException Writer writer = null; try { - writer = new OutputStreamWriter( new FileOutputStream( testFile ) ); + writer = new OutputStreamWriter( Files.newOutputStream( testFile.toPath() ) ); writer.write( testString ); writer.flush(); } @@ -1030,7 +1359,14 @@ public void testFileRead() throws IOException testFile.delete(); } - public void testFileReadWithEncoding() throws IOException + /** + *

                    testFileReadWithEncoding.

                    + * + * @throws java.io.IOException if any. + */ + @Test + public void testFileReadWithEncoding() + throws IOException { String encoding = "UTF-8"; File testFile = new File( getTestDirectory(), "testFileRead.txt" ); @@ -1040,7 +1376,7 @@ public void testFileReadWithEncoding() throws IOException Writer writer = null; try { - writer = new OutputStreamWriter( new FileOutputStream( testFile ), encoding ); + writer = new OutputStreamWriter( Files.newOutputStream( testFile.toPath() ), encoding ); writer.write( testString ); writer.flush(); } @@ -1053,7 +1389,14 @@ public void testFileReadWithEncoding() throws IOException testFile.delete(); } - public void testFileAppend() throws IOException + /** + *

                    testFileAppend.

                    + * + * @throws java.io.IOException if any. + */ + @Test + public void testFileAppend() + throws IOException { String baseString = "abc"; File testFile = new File( getTestDirectory(), "testFileAppend.txt" ); @@ -1061,7 +1404,7 @@ public void testFileAppend() throws IOException Writer writer = null; try { - writer = new OutputStreamWriter( new FileOutputStream( testFile ) ); + writer = new OutputStreamWriter( Files.newOutputStream( testFile.toPath() ) ); writer.write( baseString ); writer.flush(); } @@ -1076,7 +1419,14 @@ public void testFileAppend() throws IOException testFile.delete(); } - public void testFileAppendWithEncoding() throws IOException + /** + *

                    testFileAppendWithEncoding.

                    + * + * @throws java.io.IOException if any. + */ + @Test + public void testFileAppendWithEncoding() + throws IOException { String baseString = "abc"; String encoding = "UTF-8"; @@ -1085,7 +1435,7 @@ public void testFileAppendWithEncoding() throws IOException Writer writer = null; try { - writer = new OutputStreamWriter( new FileOutputStream( testFile ), encoding ); + writer = new OutputStreamWriter( Files.newOutputStream( testFile.toPath() ), encoding ); writer.write( baseString ); writer.flush(); } @@ -1100,7 +1450,14 @@ public void testFileAppendWithEncoding() throws IOException testFile.delete(); } - public void testFileWrite() throws IOException + /** + *

                    testFileWrite.

                    + * + * @throws java.io.IOException if any. + */ + @Test + public void testFileWrite() + throws IOException { File testFile = new File( getTestDirectory(), "testFileWrite.txt" ); String testFileName = testFile.getAbsolutePath(); @@ -1111,7 +1468,14 @@ public void testFileWrite() throws IOException testFile.delete(); } - public void testFileWriteWithEncoding() throws IOException + /** + *

                    testFileWriteWithEncoding.

                    + * + * @throws java.io.IOException if any. + */ + @Test + public void testFileWriteWithEncoding() + throws IOException { String encoding = "UTF-8"; File testFile = new File( getTestDirectory(), "testFileWrite.txt" ); @@ -1126,12 +1490,12 @@ public void testFileWriteWithEncoding() throws IOException /** * Workaround for the following Sun bugs. They are fixed in JDK 6u1 and JDK 5u11. * + * @throws java.lang.Exception * @see Sun bug id=4403166 * @see Sun bug id=6182812 * @see Sun bug id=6481955 - * - * @throws Exception */ + @Test public void testDeleteLongPathOnWindows() throws Exception { @@ -1145,7 +1509,7 @@ public void testDeleteLongPathOnWindows() File a1 = new File( a, "a" ); a1.mkdir(); - StringBuffer path = new StringBuffer( "" ); + StringBuilder path = new StringBuilder( "" ); for ( int i = 0; i < 100; i++ ) { path.append( "../a/" ); @@ -1154,7 +1518,7 @@ public void testDeleteLongPathOnWindows() File f = new File( a1, path.toString() + "test.txt" ); InputStream is = new ByteArrayInputStream( "Blabla".getBytes( "UTF-8" ) ); - OutputStream os = new FileOutputStream( f.getCanonicalFile() ); + OutputStream os = Files.newOutputStream( f.getCanonicalFile().toPath() ); IOUtil.copy( is, os ); IOUtil.close( is ); IOUtil.close( os ); @@ -1168,7 +1532,13 @@ public void testDeleteLongPathOnWindows() } } - //Test for bug PLXUTILS-10 + // Test for bug PLXUTILS-10 + /** + *

                    testCopyFileOnSameFile.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testCopyFileOnSameFile() throws IOException { @@ -1185,21 +1555,21 @@ public void testCopyFileOnSameFile() assertTrue( theFile.length() > 0 ); } + /** + *

                    testExtensions.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testExtensions() throws Exception { - String[][] values = { - { "fry.frozen", "frozen" }, - { "fry", "" }, - { "fry.", "" }, - { "/turanga/leela/meets.fry", "fry" }, - { "/3000/turanga.leela.fry/zoidberg.helps", "helps" }, - { "/3000/turanga.leela.fry/zoidberg.", "" }, - { "/3000/turanga.leela.fry/zoidberg", "" }, - { "/3000/leela.fry.bender/", "" }, - { "/3000/leela.fry.bdner/.", "" }, - { "/3000/leela.fry.bdner/foo.bar.txt", "txt" } }; + String[][] values = + { { "fry.frozen", "frozen" }, { "fry", "" }, { "fry.", "" }, { "/turanga/leela/meets.fry", "fry" }, + { "/3000/turanga.leela.fry/zoidberg.helps", "helps" }, { "/3000/turanga.leela.fry/zoidberg.", "" }, + { "/3000/turanga.leela.fry/zoidberg", "" }, { "/3000/leela.fry.bender/", "" }, + { "/3000/leela.fry.bdner/.", "" }, { "/3000/leela.fry.bdner/foo.bar.txt", "txt" } }; for ( int i = 0; i < values.length; i++ ) { @@ -1210,6 +1580,12 @@ public void testExtensions() } } + /** + *

                    testIsValidWindowsFileName.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testIsValidWindowsFileName() throws Exception { @@ -1235,6 +1611,12 @@ public void testIsValidWindowsFileName() } } + /** + *

                    testDeleteDirectoryWithValidFileSymlink.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testDeleteDirectoryWithValidFileSymlink() throws Exception { @@ -1256,6 +1638,12 @@ public void testDeleteDirectoryWithValidFileSymlink() assertTrue( "Failed to delete test directory", !getTestDirectory().exists() ); } + /** + *

                    testDeleteDirectoryWithValidDirSymlink.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testDeleteDirectoryWithValidDirSymlink() throws Exception { @@ -1277,6 +1665,12 @@ public void testDeleteDirectoryWithValidDirSymlink() assertTrue( "Failed to delete test directory", !getTestDirectory().exists() ); } + /** + *

                    testDeleteDirectoryWithDanglingSymlink.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testDeleteDirectoryWithDanglingSymlink() throws Exception { @@ -1297,6 +1691,12 @@ public void testDeleteDirectoryWithDanglingSymlink() assertTrue( "Failed to delete test directory", !getTestDirectory().exists() ); } + /** + *

                    testcopyDirectoryLayoutWithExcludesIncludes.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testcopyDirectoryLayoutWithExcludesIncludes() throws Exception { @@ -1316,9 +1716,8 @@ public void testcopyDirectoryLayoutWithExcludesIncludes() File[] childs = destination.listFiles(); assertEquals( 2, childs.length ); - for ( int i = 0, size = childs.length; i < size; i++ ) + for ( File current : childs ) { - File current = childs[i]; if ( current.getName().endsWith( "empty-dir" ) || current.getName().endsWith( "dir1" ) ) { if ( current.getName().endsWith( "dir1" ) ) @@ -1335,19 +1734,38 @@ public void testcopyDirectoryLayoutWithExcludesIncludes() } /** - * Be sure that {@link FileUtils#createTempFile(String, String, File)} is always unique. - * @throws Exception if any + * Be sure that {@link org.codehaus.plexus.util.FileUtils#createTempFile(String, String, File)} is always unique. + * + * @throws java.lang.Exception if any */ + @Test public void testCreateTempFile() throws Exception { File last = FileUtils.createTempFile( "unique", ".tmp", null ); - for (int i = 0; i < 10; i ++ ) + for ( int i = 0; i < 10; i++ ) { File current = FileUtils.createTempFile( "unique", ".tmp", null ); - assertTrue( "No unique name: " + current.getName(), - !current.getName().equals( last.getName() ) ); + assertTrue( "No unique name: " + current.getName(), !current.getName().equals( last.getName() ) ); last = current; } } + + /** + * Because windows(tm) quite frequently sleeps less than the advertised time + * + * @param time The amount of time to sleep + * @throws InterruptedException + */ + private void reallySleep( int time ) + throws InterruptedException + { + long until = System.currentTimeMillis() + time; + Thread.sleep( time ); + while ( System.currentTimeMillis() < until ) + { + Thread.sleep( time / 10 ); + Thread.yield(); + } + } } diff --git a/src/test/java/org/codehaus/plexus/util/IOUtilTest.java b/src/test/java/org/codehaus/plexus/util/IOUtilTest.java index dc0ae630..4179a20e 100644 --- a/src/test/java/org/codehaus/plexus/util/IOUtilTest.java +++ b/src/test/java/org/codehaus/plexus/util/IOUtilTest.java @@ -16,12 +16,12 @@ * limitations under the License. */ +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import java.io.BufferedOutputStream; import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.FileReader; -import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -29,40 +29,45 @@ import java.io.PrintWriter; import java.io.Reader; import java.io.Writer; +import java.nio.file.Files; import java.util.Arrays; -import junit.framework.AssertionFailedError; -import junit.framework.TestCase; +import org.junit.Before; +import org.junit.Test; /** * This is used to test IOUtil for correctness. The following checks are performed: *
                      - *
                    • The return must not be null, must be the same type and equals() to the method's second arg
                    • - *
                    • All bytes must have been read from the source (available() == 0)
                    • - *
                    • The source and destination content must be identical (byte-wise comparison check)
                    • - *
                    • The output stream must not have been closed (a byte/char is written to test this, and - * subsequent size checked)
                    • + *
                    • The return must not be null, must be the same type and equals() to the method's second arg
                    • + *
                    • All bytes must have been read from the source (available() == 0)
                    • + *
                    • The source and destination content must be identical (byte-wise comparison check)
                    • + *
                    • The output stream must not have been closed (a byte/char is written to test this, and subsequent size + * checked)
                    • *
                    - * Due to interdependencies in IOUtils and IOUtilsTestlet, one bug may cause - * multiple tests to fail. + * Due to interdependencies in IOUtils and IOUtilsTestlet, one bug may cause multiple tests to fail. * * @author Jeff Turner + * @version $Id: $Id + * @since 3.4.0 */ public final class IOUtilTest - extends TestCase { /* - * Note: this is not particularly beautiful code. A better way to check for - * flush and close status would be to implement "trojan horse" wrapper - * implementations of the various stream classes, which set a flag when - * relevant methods are called. (JT) + * Note: this is not particularly beautiful code. A better way to check for flush and close status would be to + * implement "trojan horse" wrapper implementations of the various stream classes, which set a flag when relevant + * methods are called. (JT) */ private int FILE_SIZE = 1024 * 4 + 1; private File testDirectory; + private File testFile; + /** + *

                    setUp.

                    + */ + @Before public void setUp() { try @@ -83,22 +88,19 @@ public void setUp() } } + /** + *

                    tearDown.

                    + */ public void tearDown() { testFile.delete(); testDirectory.delete(); } - public IOUtilTest( String name ) - { - super( name ); - } - private void createFile( File file, long size ) throws IOException { - BufferedOutputStream output = - new BufferedOutputStream( new FileOutputStream( file ) ); + BufferedOutputStream output = new BufferedOutputStream( Files.newOutputStream( file.toPath() ) ); for ( int i = 0; i < size; i++ ) { @@ -118,8 +120,8 @@ private void assertEqualContent( byte[] b0, byte[] b1 ) private void assertEqualContent( File f0, File f1 ) throws IOException { - FileInputStream is0 = new FileInputStream( f0 ); - FileInputStream is1 = new FileInputStream( f1 ); + InputStream is0 = Files.newInputStream( f0.toPath() ); + InputStream is1 = Files.newInputStream( f1.toPath() ); byte[] buf0 = new byte[FILE_SIZE]; byte[] buf1 = new byte[FILE_SIZE]; int n0 = 0; @@ -127,16 +129,14 @@ private void assertEqualContent( File f0, File f1 ) try { - while ( -1 != n0 ) + while ( 0 <= n0 ) { n0 = is0.read( buf0 ); n1 = is1.read( buf1 ); - assertTrue( "The files " + f0 + " and " + f1 + - " have differing number of bytes available (" + n0 + - " vs " + n1 + ")", ( n0 == n1 ) ); + assertTrue( "The files " + f0 + " and " + f1 + " have differing number of bytes available (" + n0 + + " vs " + n1 + ")", ( n0 == n1 ) ); - assertTrue( "The files " + f0 + " and " + f1 + - " have different content", Arrays.equals( buf0, buf1 ) ); + assertTrue( "The files " + f0 + " and " + f1 + " have different content", Arrays.equals( buf0, buf1 ) ); } } finally @@ -150,24 +150,28 @@ private void assertEqualContent( File f0, File f1 ) private void assertEqualContent( byte[] b0, File file ) throws IOException { - FileInputStream is = new FileInputStream( file ); + InputStream is = Files.newInputStream( file.toPath() ); byte[] b1 = new byte[b0.length]; int numRead = is.read( b1 ); assertTrue( "Different number of bytes", numRead == b0.length && is.available() == 0 ); - for ( int i = 0; - i < numRead; - assertTrue( "Byte " + i + " differs (" + b0[i] + " != " + b1[i] + ")", b0[i] == b1[i] ), i++ - ) + for ( int i = 0; i < numRead; assertTrue( "Byte " + i + " differs (" + b0[i] + " != " + b1[i] + ")", + b0[i] == b1[i] ), i++ ) ; is.close(); } + /** + *

                    testInputStreamToOutputStream.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testInputStreamToOutputStream() throws Exception { File destination = newFile( "copy1.txt" ); - FileInputStream fin = new FileInputStream( testFile ); - FileOutputStream fout = new FileOutputStream( destination ); + InputStream fin = Files.newInputStream( testFile.toPath() ); + OutputStream fout = Files.newOutputStream( destination.toPath() ); IOUtil.copy( fin, fout ); assertTrue( "Not all bytes were read", fin.available() == 0 ); @@ -180,12 +184,18 @@ public void testInputStreamToOutputStream() deleteFile( destination ); } + /** + *

                    testInputStreamToWriter.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testInputStreamToWriter() throws Exception { File destination = newFile( "copy2.txt" ); - FileInputStream fin = new FileInputStream( testFile ); - FileWriter fout = new FileWriter( destination ); + InputStream fin = Files.newInputStream( testFile.toPath() ); + Writer fout = Files.newBufferedWriter( destination.toPath() ); IOUtil.copy( fin, fout ); @@ -199,30 +209,41 @@ public void testInputStreamToWriter() deleteFile( destination ); } + /** + *

                    testInputStreamToString.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testInputStreamToString() throws Exception { - FileInputStream fin = new FileInputStream( testFile ); + InputStream fin = Files.newInputStream( testFile.toPath() ); String out = IOUtil.toString( fin ); assertNotNull( out ); assertTrue( "Not all bytes were read", fin.available() == 0 ); - assertTrue( "Wrong output size: out.length()=" + out.length() + - "!=" + FILE_SIZE, out.length() == FILE_SIZE ); + assertTrue( "Wrong output size: out.length()=" + out.length() + "!=" + FILE_SIZE, out.length() == FILE_SIZE ); fin.close(); } + /** + *

                    testReaderToOutputStream.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testReaderToOutputStream() throws Exception { File destination = newFile( "copy3.txt" ); - FileReader fin = new FileReader( testFile ); - FileOutputStream fout = new FileOutputStream( destination ); + Reader fin = Files.newBufferedReader( testFile.toPath() ); + OutputStream fout = Files.newOutputStream( destination.toPath() ); IOUtil.copy( fin, fout ); - //Note: this method *does* flush. It is equivalent to: - // OutputStreamWriter _out = new OutputStreamWriter(fout); - // IOUtil.copy( fin, _out, 4096 ); // copy( Reader, Writer, int ); - // _out.flush(); - // out = fout; + // Note: this method *does* flush. It is equivalent to: + // OutputStreamWriter _out = new OutputStreamWriter(fout); + // IOUtil.copy( fin, _out, 4096 ); // copy( Reader, Writer, int ); + // _out.flush(); + // out = fout; // Note: rely on the method to flush checkFile( destination ); @@ -232,12 +253,18 @@ public void testReaderToOutputStream() deleteFile( destination ); } + /** + *

                    testReaderToWriter.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testReaderToWriter() throws Exception { File destination = newFile( "copy4.txt" ); - FileReader fin = new FileReader( testFile ); - FileWriter fout = new FileWriter( destination ); + Reader fin = Files.newBufferedReader( testFile.toPath() ); + Writer fout = Files.newBufferedWriter( destination.toPath() ); IOUtil.copy( fin, fout ); fout.flush(); @@ -248,32 +275,42 @@ public void testReaderToWriter() deleteFile( destination ); } + /** + *

                    testReaderToString.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testReaderToString() throws Exception { - FileReader fin = new FileReader( testFile ); + Reader fin = Files.newBufferedReader( testFile.toPath() ); String out = IOUtil.toString( fin ); assertNotNull( out ); - assertTrue( "Wrong output size: out.length()=" + - out.length() + "!=" + FILE_SIZE, - out.length() == FILE_SIZE ); + assertTrue( "Wrong output size: out.length()=" + out.length() + "!=" + FILE_SIZE, out.length() == FILE_SIZE ); fin.close(); } + /** + *

                    testStringToOutputStream.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testStringToOutputStream() throws Exception { File destination = newFile( "copy5.txt" ); - FileReader fin = new FileReader( testFile ); + Reader fin = Files.newBufferedReader( testFile.toPath() ); // Create our String. Rely on testReaderToString() to make sure this is valid. String str = IOUtil.toString( fin ); - FileOutputStream fout = new FileOutputStream( destination ); + OutputStream fout = Files.newOutputStream( destination.toPath() ); IOUtil.copy( str, fout ); - //Note: this method *does* flush. It is equivalent to: - // OutputStreamWriter _out = new OutputStreamWriter(fout); - // IOUtil.copy( str, _out, 4096 ); // copy( Reader, Writer, int ); - // _out.flush(); - // out = fout; + // Note: this method *does* flush. It is equivalent to: + // OutputStreamWriter _out = new OutputStreamWriter(fout); + // IOUtil.copy( str, _out, 4096 ); // copy( Reader, Writer, int ); + // _out.flush(); + // out = fout; // note: we don't flush here; this IOUtils method does it for us checkFile( destination ); @@ -283,14 +320,20 @@ public void testStringToOutputStream() deleteFile( destination ); } + /** + *

                    testStringToWriter.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testStringToWriter() throws Exception { File destination = newFile( "copy6.txt" ); - FileReader fin = new FileReader( testFile ); + Reader fin = Files.newBufferedReader( testFile.toPath() ); // Create our String. Rely on testReaderToString() to make sure this is valid. String str = IOUtil.toString( fin ); - FileWriter fout = new FileWriter( destination ); + Writer fout = Files.newBufferedWriter( destination.toPath() ); IOUtil.copy( str, fout ); fout.flush(); @@ -302,23 +345,34 @@ public void testStringToWriter() deleteFile( destination ); } + /** + *

                    testInputStreamToByteArray.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testInputStreamToByteArray() throws Exception { - FileInputStream fin = new FileInputStream( testFile ); + InputStream fin = Files.newInputStream( testFile.toPath() ); byte[] out = IOUtil.toByteArray( fin ); assertNotNull( out ); assertTrue( "Not all bytes were read", fin.available() == 0 ); - assertTrue( "Wrong output size: out.length=" + out.length + - "!=" + FILE_SIZE, out.length == FILE_SIZE ); + assertTrue( "Wrong output size: out.length=" + out.length + "!=" + FILE_SIZE, out.length == FILE_SIZE ); assertEqualContent( out, testFile ); fin.close(); } + /** + *

                    testStringToByteArray.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testStringToByteArray() throws Exception { - FileReader fin = new FileReader( testFile ); + Reader fin = Files.newBufferedReader( testFile.toPath() ); // Create our String. Rely on testReaderToString() to make sure this is valid. String str = IOUtil.toString( fin ); @@ -328,12 +382,18 @@ public void testStringToByteArray() fin.close(); } + /** + *

                    testByteArrayToWriter.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testByteArrayToWriter() throws Exception { File destination = newFile( "copy7.txt" ); - FileWriter fout = new FileWriter( destination ); - FileInputStream fin = new FileInputStream( testFile ); + Writer fout = Files.newBufferedWriter( destination.toPath() ); + InputStream fin = Files.newInputStream( testFile.toPath() ); // Create our byte[]. Rely on testInputStreamToByteArray() to make sure this is valid. byte[] in = IOUtil.toByteArray( fin ); @@ -346,10 +406,16 @@ public void testByteArrayToWriter() deleteFile( destination ); } + /** + *

                    testByteArrayToString.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testByteArrayToString() throws Exception { - FileInputStream fin = new FileInputStream( testFile ); + InputStream fin = Files.newInputStream( testFile.toPath() ); byte[] in = IOUtil.toByteArray( fin ); // Create our byte[]. Rely on testInputStreamToByteArray() to make sure this is valid. String str = IOUtil.toString( in ); @@ -357,12 +423,18 @@ public void testByteArrayToString() fin.close(); } + /** + *

                    testByteArrayToOutputStream.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testByteArrayToOutputStream() throws Exception { File destination = newFile( "copy8.txt" ); - FileOutputStream fout = new FileOutputStream( destination ); - FileInputStream fin = new FileInputStream( testFile ); + OutputStream fout = Files.newOutputStream( destination.toPath() ); + InputStream fin = Files.newInputStream( testFile.toPath() ); // Create our byte[]. Rely on testInputStreamToByteArray() to make sure this is valid. byte[] in = IOUtil.toByteArray( fin ); @@ -382,6 +454,12 @@ public void testByteArrayToOutputStream() // Test closeXXX() // ---------------------------------------------------------------------- + /** + *

                    testCloseInputStream.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCloseInputStream() throws Exception { @@ -394,6 +472,12 @@ public void testCloseInputStream() assertTrue( inputStream.closed ); } + /** + *

                    testCloseOutputStream.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCloseOutputStream() throws Exception { @@ -406,6 +490,12 @@ public void testCloseOutputStream() assertTrue( outputStream.closed ); } + /** + *

                    testCloseReader.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCloseReader() throws Exception { @@ -418,6 +508,12 @@ public void testCloseReader() assertTrue( reader.closed ); } + /** + *

                    testCloseWriter.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCloseWriter() throws Exception { @@ -511,8 +607,7 @@ private File newFile( String filename ) throws Exception { File destination = new File( testDirectory, filename ); - assertTrue( filename + "Test output data file shouldn't previously exist", - !destination.exists() ); + assertTrue( filename + "Test output data file shouldn't previously exist", !destination.exists() ); return destination; } @@ -533,8 +628,8 @@ private void checkWrite( OutputStream output ) } catch ( Throwable t ) { - throw new AssertionFailedError( "The copy() method closed the stream " + - "when it shouldn't have. " + t.getMessage() ); + throw new Exception( "The copy() method closed the stream " + "when it shouldn't have. " + + t.getMessage() ); } } @@ -547,16 +642,15 @@ private void checkWrite( Writer output ) } catch ( Throwable t ) { - throw new AssertionFailedError( "The copy() method closed the stream " + - "when it shouldn't have. " + t.getMessage() ); + throw new Exception( "The copy() method closed the stream " + "when it shouldn't have. " + + t.getMessage() ); } } private void deleteFile( File file ) throws Exception { - assertTrue( "Wrong output size: file.length()=" + - file.length() + "!=" + FILE_SIZE + 1, + assertTrue( "Wrong output size: file.length()=" + file.length() + "!=" + FILE_SIZE + 1, file.length() == FILE_SIZE + 1 ); assertTrue( "File would not delete", ( file.delete() || ( !file.exists() ) ) ); diff --git a/src/test/java/org/codehaus/plexus/util/InterpolationFilterReaderTest.java b/src/test/java/org/codehaus/plexus/util/InterpolationFilterReaderTest.java index b82cb494..1d190b4d 100644 --- a/src/test/java/org/codehaus/plexus/util/InterpolationFilterReaderTest.java +++ b/src/test/java/org/codehaus/plexus/util/InterpolationFilterReaderTest.java @@ -15,24 +15,38 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +import static org.junit.Assert.assertEquals; + import java.io.StringReader; import java.util.HashMap; import java.util.Map; -import junit.framework.TestCase; +import org.junit.Test; +/** + *

                    InterpolationFilterReaderTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ public class InterpolationFilterReaderTest - extends TestCase { /* - * Added and commented by jdcasey@03-Feb-2005 because it is a bug in the - * InterpolationFilterReader. + * Added and commented by jdcasey@03-Feb-2005 because it is a bug in the InterpolationFilterReader. * kenneyw@15-04-2005 fixed the bug. */ + /** + *

                    testShouldNotInterpolateExpressionAtEndOfDataWithInvalidEndToken.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testShouldNotInterpolateExpressionAtEndOfDataWithInvalidEndToken() throws Exception { - Map m = new HashMap(); + Map m = new HashMap(); m.put( "test", "TestValue" ); String testStr = "This is a ${test"; @@ -43,10 +57,16 @@ public void testShouldNotInterpolateExpressionAtEndOfDataWithInvalidEndToken() /* * kenneyw@14-04-2005 Added test to check above fix. */ + /** + *

                    testShouldNotInterpolateExpressionWithMissingEndToken.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testShouldNotInterpolateExpressionWithMissingEndToken() throws Exception { - Map m = new HashMap(); + Map m = new HashMap(); m.put( "test", "TestValue" ); String testStr = "This is a ${test, really"; @@ -54,10 +74,16 @@ public void testShouldNotInterpolateExpressionWithMissingEndToken() assertEquals( "This is a ${test, really", interpolate( testStr, m ) ); } + /** + *

                    testShouldNotInterpolateWithMalformedStartToken.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testShouldNotInterpolateWithMalformedStartToken() throws Exception { - Map m = new HashMap(); + Map m = new HashMap(); m.put( "test", "testValue" ); String foo = "This is a $!test} again"; @@ -65,10 +91,16 @@ public void testShouldNotInterpolateWithMalformedStartToken() assertEquals( "This is a $!test} again", interpolate( foo, m ) ); } + /** + *

                    testShouldNotInterpolateWithMalformedEndToken.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testShouldNotInterpolateWithMalformedEndToken() throws Exception { - Map m = new HashMap(); + Map m = new HashMap(); m.put( "test", "testValue" ); String foo = "This is a ${test!} again"; @@ -76,10 +108,16 @@ public void testShouldNotInterpolateWithMalformedEndToken() assertEquals( "This is a ${test!} again", interpolate( foo, m, "${", "$}" ) ); } + /** + *

                    testInterpolationWithMulticharDelimiters.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testInterpolationWithMulticharDelimiters() throws Exception { - Map m = new HashMap(); + Map m = new HashMap(); m.put( "test", "testValue" ); String foo = "This is a ${test$} again"; @@ -87,12 +125,16 @@ public void testInterpolationWithMulticharDelimiters() assertEquals( "This is a testValue again", interpolate( foo, m, "${", "$}" ) ); } - - + /** + *

                    testDefaultInterpolationWithNonInterpolatedValueAtEnd.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testDefaultInterpolationWithNonInterpolatedValueAtEnd() throws Exception { - Map m = new HashMap(); + Map m = new HashMap(); m.put( "name", "jason" ); m.put( "noun", "asshole" ); @@ -101,10 +143,16 @@ public void testDefaultInterpolationWithNonInterpolatedValueAtEnd() assertEquals( "jason is an asshole. ${not.interpolated}", interpolate( foo, m ) ); } + /** + *

                    testDefaultInterpolationWithInterpolatedValueAtEnd.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testDefaultInterpolationWithInterpolatedValueAtEnd() throws Exception { - Map m = new HashMap(); + Map m = new HashMap(); m.put( "name", "jason" ); m.put( "noun", "asshole" ); @@ -113,10 +161,16 @@ public void testDefaultInterpolationWithInterpolatedValueAtEnd() assertEquals( "jason is an asshole", interpolate( foo, m ) ); } + /** + *

                    testInterpolationWithSpecifiedBoundaryTokens.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testInterpolationWithSpecifiedBoundaryTokens() throws Exception { - Map m = new HashMap(); + Map m = new HashMap(); m.put( "name", "jason" ); m.put( "noun", "asshole" ); @@ -125,10 +179,16 @@ public void testInterpolationWithSpecifiedBoundaryTokens() assertEquals( "jason is an asshole. @not.interpolated@ baby @foo@. @bar@", interpolate( foo, m, "@", "@" ) ); } + /** + *

                    testInterpolationWithSpecifiedBoundaryTokensWithNonInterpolatedValueAtEnd.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testInterpolationWithSpecifiedBoundaryTokensWithNonInterpolatedValueAtEnd() throws Exception { - Map m = new HashMap(); + Map m = new HashMap(); m.put( "name", "jason" ); m.put( "noun", "asshole" ); @@ -137,10 +197,16 @@ public void testInterpolationWithSpecifiedBoundaryTokensWithNonInterpolatedValue assertEquals( "jason is an @foobarred@", interpolate( foo, m, "@", "@" ) ); } + /** + *

                    testInterpolationWithSpecifiedBoundaryTokensWithInterpolatedValueAtEnd.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testInterpolationWithSpecifiedBoundaryTokensWithInterpolatedValueAtEnd() throws Exception { - Map m = new HashMap(); + Map m = new HashMap(); m.put( "name", "jason" ); m.put( "noun", "asshole" ); @@ -149,17 +215,23 @@ public void testInterpolationWithSpecifiedBoundaryTokensWithInterpolatedValueAtE assertEquals( "jason is an asshole", interpolate( foo, m, "@", "@" ) ); } + /** + *

                    testInterpolationWithSpecifiedBoundaryTokensAndAdditionalTokenCharacter.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testInterpolationWithSpecifiedBoundaryTokensAndAdditionalTokenCharacter() throws Exception { - Map m = new HashMap(); + Map m = new HashMap(); m.put( "name", "jason" ); m.put( "noun", "asshole" ); String foo = "@name@ (known as jason@somewhere) is an @noun@"; assertEquals( "jason (known as jason@somewhere) is an asshole", interpolate( foo, m, "@", "@" ) ); - } + } // ---------------------------------------------------------------------- // @@ -168,13 +240,13 @@ public void testInterpolationWithSpecifiedBoundaryTokensAndAdditionalTokenCharac private String interpolate( String input, Map context ) throws Exception { - return IOUtil.toString( new InterpolationFilterReader( new StringReader( input ), context ) ); + return IOUtil.toString( new InterpolationFilterReader( new StringReader( input ), context ) ); } private String interpolate( String input, Map context, String startToken, String endToken ) throws Exception { - return IOUtil.toString( new InterpolationFilterReader( new StringReader( input ), - context, startToken, endToken ) ); + return IOUtil.toString( new InterpolationFilterReader( new StringReader( input ), context, startToken, + endToken ) ); } } diff --git a/src/test/java/org/codehaus/plexus/util/LineOrientedInterpolatingReaderTest.java b/src/test/java/org/codehaus/plexus/util/LineOrientedInterpolatingReaderTest.java index 9852b5bd..6ff112db 100644 --- a/src/test/java/org/codehaus/plexus/util/LineOrientedInterpolatingReaderTest.java +++ b/src/test/java/org/codehaus/plexus/util/LineOrientedInterpolatingReaderTest.java @@ -16,6 +16,8 @@ * limitations under the License. */ +import static org.junit.Assert.assertEquals; + import java.io.BufferedReader; import java.io.IOException; import java.io.StringReader; @@ -24,48 +26,34 @@ import java.util.HashMap; import java.util.Map; -import junit.framework.TestCase; +import org.junit.Test; /** - * Generated by JUnitDoclet, a tool provided by ObjectFab GmbH under LGPL. - * Please see www.junitdoclet.org, www.gnu.org and www.objectfab.de for - * informations about the tool, the licence and the authors. + * Generated by JUnitDoclet, a tool provided by ObjectFab GmbH under LGPL. Please see www.junitdoclet.org, www.gnu.org + * and www.objectfab.de for informations about the tool, the licence and the authors. + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 */ public class LineOrientedInterpolatingReaderTest - extends TestCase { - public LineOrientedInterpolatingReaderTest( String name ) - { - super( name ); - } - - /** - * The JUnit setup method + /* + * Added and commented by jdcasey@03-Feb-2005 because it is a bug in the InterpolationFilterReader. */ - protected void setUp() throws Exception - { - } - /** - * The teardown method for JUnit + *

                    testShouldInterpolateExpressionAtEndOfDataWithInvalidEndToken.

                    + * + * @throws java.io.IOException if any. */ - protected void tearDown() throws Exception - { - } - - /* - * Added and commented by jdcasey@03-Feb-2005 because it is a bug in the - * InterpolationFilterReader. - */ - public void testShouldInterpolateExpressionAtEndOfDataWithInvalidEndToken() throws IOException + @Test + public void testShouldInterpolateExpressionAtEndOfDataWithInvalidEndToken() + throws IOException { String testStr = "This is a ${test"; - LineOrientedInterpolatingReader iReader = new LineOrientedInterpolatingReader( - new StringReader( testStr ), - Collections - .singletonMap( - "test", - "TestValue" ) ); + LineOrientedInterpolatingReader iReader = + new LineOrientedInterpolatingReader( new StringReader( testStr ), + Collections.singletonMap( "test", "TestValue" ) ); BufferedReader reader = new BufferedReader( iReader ); String result = reader.readLine(); @@ -73,11 +61,16 @@ public void testShouldInterpolateExpressionAtEndOfDataWithInvalidEndToken() thro assertEquals( "This is a ${test", result ); } - public void testDefaultInterpolationWithNonInterpolatedValueAtEnd() throws Exception + /** + *

                    testDefaultInterpolationWithNonInterpolatedValueAtEnd.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testDefaultInterpolationWithNonInterpolatedValueAtEnd() + throws Exception { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); + Map m = getStandardMap(); String foo = "${name} is an ${noun}. ${not.interpolated}"; @@ -90,11 +83,24 @@ public void testDefaultInterpolationWithNonInterpolatedValueAtEnd() throws Excep assertEquals( "jason is an asshole. ${not.interpolated}", bar ); } - public void testDefaultInterpolationWithEscapedExpression() throws Exception + private Map getStandardMap() { - Map m = new HashMap(); + Map m = new HashMap(); m.put( "name", "jason" ); m.put( "noun", "asshole" ); + return m; + } + + /** + *

                    testDefaultInterpolationWithEscapedExpression.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testDefaultInterpolationWithEscapedExpression() + throws Exception + { + Map m = getStandardMap(); String foo = "${name} is an ${noun}. \\${noun} value"; @@ -107,11 +113,16 @@ public void testDefaultInterpolationWithEscapedExpression() throws Exception assertEquals( "jason is an asshole. ${noun} value", bar ); } - public void testDefaultInterpolationWithInterpolatedValueAtEnd() throws Exception + /** + *

                    testDefaultInterpolationWithInterpolatedValueAtEnd.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testDefaultInterpolationWithInterpolatedValueAtEnd() + throws Exception { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); + Map m = getStandardMap(); String foo = "${name} is an ${noun}"; @@ -124,16 +135,21 @@ public void testDefaultInterpolationWithInterpolatedValueAtEnd() throws Exceptio assertEquals( "jason is an asshole", bar ); } - public void testInterpolationWithSpecifiedBoundaryTokens() throws Exception + /** + *

                    testInterpolationWithSpecifiedBoundaryTokens.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testInterpolationWithSpecifiedBoundaryTokens() + throws Exception { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); + Map m = getStandardMap(); String foo = "@name@ is an @noun@. @not.interpolated@ baby @foo@. @bar@"; - LineOrientedInterpolatingReader reader = new LineOrientedInterpolatingReader( new StringReader( foo ), m, "@", - "@" ); + LineOrientedInterpolatingReader reader = + new LineOrientedInterpolatingReader( new StringReader( foo ), m, "@", "@" ); StringWriter writer = new StringWriter(); IOUtil.copy( reader, writer ); @@ -142,16 +158,21 @@ public void testInterpolationWithSpecifiedBoundaryTokens() throws Exception assertEquals( "jason is an asshole. @not.interpolated@ baby @foo@. @bar@", bar ); } - public void testInterpolationWithSpecifiedBoundaryTokensWithNonInterpolatedValueAtEnd() throws Exception + /** + *

                    testInterpolationWithSpecifiedBoundaryTokensWithNonInterpolatedValueAtEnd.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testInterpolationWithSpecifiedBoundaryTokensWithNonInterpolatedValueAtEnd() + throws Exception { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); + Map m = getStandardMap(); String foo = "@name@ is an @foobarred@"; - LineOrientedInterpolatingReader reader = new LineOrientedInterpolatingReader( new StringReader( foo ), m, "@", - "@" ); + LineOrientedInterpolatingReader reader = + new LineOrientedInterpolatingReader( new StringReader( foo ), m, "@", "@" ); StringWriter writer = new StringWriter(); IOUtil.copy( reader, writer ); @@ -160,16 +181,21 @@ public void testInterpolationWithSpecifiedBoundaryTokensWithNonInterpolatedValue assertEquals( "jason is an @foobarred@", bar ); } - public void testInterpolationWithSpecifiedBoundaryTokensWithInterpolatedValueAtEnd() throws Exception + /** + *

                    testInterpolationWithSpecifiedBoundaryTokensWithInterpolatedValueAtEnd.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testInterpolationWithSpecifiedBoundaryTokensWithInterpolatedValueAtEnd() + throws Exception { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); + Map m = getStandardMap(); String foo = "@name@ is an @noun@"; - LineOrientedInterpolatingReader reader = new LineOrientedInterpolatingReader( new StringReader( foo ), m, "@", - "@" ); + LineOrientedInterpolatingReader reader = + new LineOrientedInterpolatingReader( new StringReader( foo ), m, "@", "@" ); StringWriter writer = new StringWriter(); IOUtil.copy( reader, writer ); @@ -177,4 +203,4 @@ public void testInterpolationWithSpecifiedBoundaryTokensWithInterpolatedValueAtE String bar = writer.toString(); assertEquals( "jason is an asshole", bar ); } -} \ No newline at end of file +} diff --git a/src/test/java/org/codehaus/plexus/util/MatchPatternTest.java b/src/test/java/org/codehaus/plexus/util/MatchPatternTest.java new file mode 100644 index 00000000..bd523457 --- /dev/null +++ b/src/test/java/org/codehaus/plexus/util/MatchPatternTest.java @@ -0,0 +1,66 @@ +package org.codehaus.plexus.util; + +/* + * Copyright The Codehaus Foundation. + * + * Licensed 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. + */ + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + *

                    MatchPatternTest class.

                    + * + * @author Kristian Rosenvold + * @version $Id: $Id + * @since 3.4.0 + */ +public class MatchPatternTest +{ + /** + *

                    testMatchPath.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testMatchPath() + throws Exception + { + MatchPattern mp = MatchPattern.fromString( "ABC*" ); + assertTrue( mp.matchPath( "ABCD", true ) ); + } + + /** + *

                    testMatchPatternStart.

                    + * + * @see Issue #63 + */ + @Test + public void testMatchPatternStart() + { + MatchPattern mp = MatchPattern.fromString( "ABC*" ); + + assertTrue( mp.matchPatternStart( "ABCD", true ) ); + assertFalse( mp.matchPatternStart( "AbCD", true ) ); + + assertTrue( mp.matchPatternStart( "ABCD", false ) ); + assertTrue( mp.matchPatternStart( "AbCD", false ) ); + + assertFalse( mp.matchPatternStart( "XXXX", true ) ); + assertFalse( mp.matchPatternStart( "XXXX", false ) ); + } + +} diff --git a/src/main/java/org/codehaus/plexus/util/io/FileInputStreamFacade.java b/src/test/java/org/codehaus/plexus/util/MatchPatternsTest.java similarity index 50% rename from src/main/java/org/codehaus/plexus/util/io/FileInputStreamFacade.java rename to src/test/java/org/codehaus/plexus/util/MatchPatternsTest.java index 70a452e1..a10e340e 100644 --- a/src/main/java/org/codehaus/plexus/util/io/FileInputStreamFacade.java +++ b/src/test/java/org/codehaus/plexus/util/MatchPatternsTest.java @@ -1,4 +1,4 @@ -package org.codehaus.plexus.util.io; +package org.codehaus.plexus.util; /* * Copyright The Codehaus Foundation. @@ -16,28 +16,32 @@ * limitations under the License. */ -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; /** - * Implementation of {@link InputStreamFacade} for files. + *

                    MatchPatternsTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 */ -public class FileInputStreamFacade implements InputStreamFacade { - private final File file; - +public class MatchPatternsTest +{ /** - * Creates a new instance. + *

                    testMatches.

                    + * + * @throws java.lang.Exception if any. */ - public FileInputStreamFacade( File file ) + @Test + public void testMatches() + throws Exception { - this.file = file; + MatchPatterns from = MatchPatterns.from( "ABC**", "CDE**" ); + assertTrue( from.matches( "ABCDE", true ) ); + assertTrue( from.matches( "CDEF", true ) ); + assertFalse( from.matches( "XYZ", true ) ); } - - public InputStream getInputStream() throws IOException { - return new FileInputStream( file ); - } - - } diff --git a/src/test/java/org/codehaus/plexus/util/OsTest.java b/src/test/java/org/codehaus/plexus/util/OsTest.java index 9a170576..572d4a56 100644 --- a/src/test/java/org/codehaus/plexus/util/OsTest.java +++ b/src/test/java/org/codehaus/plexus/util/OsTest.java @@ -16,29 +16,44 @@ * limitations under the License. */ +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + import java.util.Iterator; -import junit.framework.TestCase; +import org.junit.Test; /** * Test Case for Os + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 */ public class OsTest - extends TestCase { + /** + *

                    testUndefinedFamily.

                    + */ + @Test public void testUndefinedFamily() { assertFalse( Os.isFamily( "bogus family" ) ); } + /** + *

                    testOs.

                    + */ + @Test public void testOs() { - Iterator iter = Os.getValidFamilies().iterator(); + Iterator iter = Os.getValidFamilies().iterator(); String currentFamily = null; String notCurrentFamily = null; while ( iter.hasNext() && ( currentFamily == null || notCurrentFamily == null ) ) { - String fam = (String) iter.next(); + String fam = iter.next(); if ( Os.isFamily( fam ) ) { currentFamily = fam; @@ -49,7 +64,7 @@ public void testOs() } } - //make sure the OS_FAMILY is set right. + // make sure the OS_FAMILY is set right. assertEquals( currentFamily, Os.OS_FAMILY ); // check the current family and one of the others @@ -71,12 +86,16 @@ public void testOs() // check the version assertTrue( Os.isOs( currentFamily, Os.OS_NAME, Os.OS_ARCH, Os.OS_VERSION ) ); - assertFalse( Os.isOs( currentFamily, Os.OS_NAME, Os.OS_ARCH, "myversion" ) ); + assertFalse( Os.isOs( currentFamily, Os.OS_NAME, Os.OS_ARCH, "myversion" ) ); } + /** + *

                    testValidList.

                    + */ + @Test public void testValidList() { - assertTrue(Os.isValidFamily( "dos" ) ); + assertTrue( Os.isValidFamily( "dos" ) ); assertFalse( Os.isValidFamily( "" ) ); assertFalse( Os.isValidFamily( null ) ); diff --git a/src/test/java/org/codehaus/plexus/util/PathToolTest.java b/src/test/java/org/codehaus/plexus/util/PathToolTest.java index d73c8b87..0a6d011e 100644 --- a/src/test/java/org/codehaus/plexus/util/PathToolTest.java +++ b/src/test/java/org/codehaus/plexus/util/PathToolTest.java @@ -16,18 +16,25 @@ * limitations under the License. */ -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; + +import org.junit.Test; /** + *

                    PathToolTest class.

                    + * * @author Vincent Siveton - * @version $Id$ + * @version $Id: $Id + * @since 3.4.0 */ public class PathToolTest - extends TestCase { /** - * @throws Exception + *

                    testGetRelativePath.

                    + * + * @throws java.lang.Exception */ + @Test public void testGetRelativePath() throws Exception { @@ -40,8 +47,11 @@ public void testGetRelativePath() } /** - * @throws Exception + *

                    testGetDirectoryComponent.

                    + * + * @throws java.lang.Exception */ + @Test public void testGetDirectoryComponent() throws Exception { @@ -52,8 +62,11 @@ public void testGetDirectoryComponent() } /** - * @throws Exception + *

                    testCalculateLink.

                    + * + * @throws java.lang.Exception */ + @Test public void testCalculateLink() throws Exception { @@ -69,8 +82,11 @@ public void testCalculateLink() } /** - * @throws Exception + *

                    testGetRelativeWebPath.

                    + * + * @throws java.lang.Exception */ + @Test public void testGetRelativeWebPath() throws Exception { @@ -81,12 +97,16 @@ public void testGetRelativeWebPath() "http://plexus.codehaus.org/plexus-utils/index.html" ), "plexus-utils/index.html" ); assertEquals( PathTool.getRelativeWebPath( "http://plexus.codehaus.org/plexus-utils/index.html", - "http://plexus.codehaus.org/" ), "../../" ); + "http://plexus.codehaus.org/" ), + "../../" ); } /** - * @throws Exception + *

                    testGetRelativeFilePath.

                    + * + * @throws java.lang.Exception */ + @Test public void testGetRelativeFilePath() throws Exception { diff --git a/src/test/java/org/codehaus/plexus/util/PerfTest.java b/src/test/java/org/codehaus/plexus/util/PerfTest.java new file mode 100644 index 00000000..595c7272 --- /dev/null +++ b/src/test/java/org/codehaus/plexus/util/PerfTest.java @@ -0,0 +1,71 @@ +package org.codehaus.plexus.util; + +/* + * Copyright 2011 The Codehaus Foundation. + * + * Licensed 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. + */ + +import org.junit.Test; + +/** + *

                    PerfTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ +public class PerfTest +{ + String src = "012345578901234556789012345678901234456789012345678901234567890"; + + private final int oops = 100; + + /** + *

                    testSubString.

                    + */ + @Test + public void testSubString() + { + StringBuilder res = new StringBuilder(); + int len = src.length(); + for ( int cnt = 0; cnt < oops; cnt++ ) + { + for ( int i = 0; i < len - 5; i++ ) + { + res.append( src.substring( i, i + 4 ) ); + } + } + int i = res.length(); + System.out.println( "i = " + i ); + } + + /** + *

                    testResDir.

                    + */ + @Test + public void testResDir() + { + StringBuilder res = new StringBuilder(); + int len = src.length(); + for ( int cnt = 0; cnt < oops; cnt++ ) + { + for ( int i = 0; i < len - 5; i++ ) + { + res.append( src, i, i + 4 ); + } + } + int i = res.length(); + System.out.println( "i = " + i ); + } +} diff --git a/src/test/java/org/codehaus/plexus/util/ReflectionUtilsTest.java b/src/test/java/org/codehaus/plexus/util/ReflectionUtilsTest.java index 72545944..32699154 100644 --- a/src/test/java/org/codehaus/plexus/util/ReflectionUtilsTest.java +++ b/src/test/java/org/codehaus/plexus/util/ReflectionUtilsTest.java @@ -16,9 +16,12 @@ * limitations under the License. */ -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; import java.util.Map; + +import org.junit.Test; + import java.util.HashMap; /** @@ -27,74 +30,96 @@ * @author Jesse McConnell * @version $Id:$ * @see org.codehaus.plexus.util.ReflectionUtils + * @since 3.4.0 */ public final class ReflectionUtilsTest - extends TestCase { public ReflectionUtilsTestClass testClass = new ReflectionUtilsTestClass(); - protected void setUp() throws Exception - { - - } - + /** + *

                    testSimpleVariableAccess.

                    + * + * @throws java.lang.IllegalAccessException if any. + */ + @Test public void testSimpleVariableAccess() throws IllegalAccessException { - assertEquals("woohoo", (String)ReflectionUtils.getValueIncludingSuperclasses( "myString", testClass ) ); + assertEquals( "woohoo", (String) ReflectionUtils.getValueIncludingSuperclasses( "myString", testClass ) ); } + /** + *

                    testComplexVariableAccess.

                    + * + * @throws java.lang.IllegalAccessException if any. + */ + @Test public void testComplexVariableAccess() throws IllegalAccessException { - Map map = (Map)ReflectionUtils.getVariablesAndValuesIncludingSuperclasses( testClass ); + Map map = ReflectionUtils.getVariablesAndValuesIncludingSuperclasses( testClass ); - Map myMap = (Map)map.get( "myMap" ); + Map myMap = (Map) map.get( "myMap" ); - assertEquals( "myValue", (String)myMap.get( "myKey" ) ); - assertEquals( "myOtherValue", (String)myMap.get( "myOtherKey") ); + assertEquals( "myValue", (String) myMap.get( "myKey" ) ); + assertEquals( "myOtherValue", (String) myMap.get( "myOtherKey" ) ); } + /** + *

                    testSuperClassVariableAccess.

                    + * + * @throws java.lang.IllegalAccessException if any. + */ + @Test public void testSuperClassVariableAccess() throws IllegalAccessException { - assertEquals("super-duper", (String)ReflectionUtils.getValueIncludingSuperclasses( "mySuperString", testClass ) ); + assertEquals( "super-duper", + (String) ReflectionUtils.getValueIncludingSuperclasses( "mySuperString", testClass ) ); } + /** + *

                    testSettingVariableValue.

                    + * + * @throws java.lang.IllegalAccessException if any. + */ + @Test public void testSettingVariableValue() throws IllegalAccessException { ReflectionUtils.setVariableValueInObject( testClass, "mySettableString", "mySetString" ); - assertEquals("mySetString", (String)ReflectionUtils.getValueIncludingSuperclasses( "mySettableString", testClass ) ); - + assertEquals( "mySetString", + (String) ReflectionUtils.getValueIncludingSuperclasses( "mySettableString", testClass ) ); ReflectionUtils.setVariableValueInObject( testClass, "myParentsSettableString", "myParentsSetString" ); - assertEquals("myParentsSetString", (String)ReflectionUtils.getValueIncludingSuperclasses( "myParentsSettableString", testClass ) ); + assertEquals( "myParentsSetString", + (String) ReflectionUtils.getValueIncludingSuperclasses( "myParentsSettableString", testClass ) ); } - private class ReflectionUtilsTestClass extends AbstractReflectionUtilsTestClass { private String myString = "woohoo"; + private String mySettableString; - private Map myMap = new HashMap(); + + private Map myMap = new HashMap(); public ReflectionUtilsTestClass() { - myMap.put("myKey", "myValue"); - myMap.put( "myOtherKey", "myOtherValue" ); + myMap.put( "myKey", "myValue" ); + myMap.put( "myOtherKey", "myOtherValue" ); } } - private class AbstractReflectionUtilsTestClass { private String mySuperString = "super-duper"; + private String myParentsSettableString; } } diff --git a/src/test/java/org/codehaus/plexus/util/SelectorUtilsTest.java b/src/test/java/org/codehaus/plexus/util/SelectorUtilsTest.java new file mode 100644 index 00000000..ebc2dca0 --- /dev/null +++ b/src/test/java/org/codehaus/plexus/util/SelectorUtilsTest.java @@ -0,0 +1,95 @@ +package org.codehaus.plexus.util; + +/* + * Copyright The Codehaus Foundation. + * + * Licensed 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. + */ + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.io.File; + +import org.junit.Test; + +/** + *

                    SelectorUtilsTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ +public class SelectorUtilsTest +{ + /** + *

                    testMatchPath_DefaultFileSeparator.

                    + */ + @Test + public void testMatchPath_DefaultFileSeparator() + { + String separator = File.separator; + + // Pattern and target start with file separator + assertTrue( SelectorUtils.matchPath( separator + "*" + separator + "a.txt", + separator + "b" + separator + "a.txt" ) ); + // Pattern starts with file separator, target doesn't + assertFalse( SelectorUtils.matchPath( separator + "*" + separator + "a.txt", "b" + separator + "a.txt" ) ); + // Pattern doesn't start with file separator, target does + assertFalse( SelectorUtils.matchPath( "*" + separator + "a.txt", separator + "b" + separator + "a.txt" ) ); + // Pattern and target don't start with file separator + assertTrue( SelectorUtils.matchPath( "*" + separator + "a.txt", "b" + separator + "a.txt" ) ); + } + + /** + *

                    testMatchPath_UnixFileSeparator.

                    + */ + @Test + public void testMatchPath_UnixFileSeparator() + { + String separator = "/"; + + // Pattern and target start with file separator + assertTrue( SelectorUtils.matchPath( separator + "*" + separator + "a.txt", + separator + "b" + separator + "a.txt", separator, false ) ); + // Pattern starts with file separator, target doesn't + assertFalse( SelectorUtils.matchPath( separator + "*" + separator + "a.txt", "b" + separator + "a.txt", + separator, false ) ); + // Pattern doesn't start with file separator, target does + assertFalse( SelectorUtils.matchPath( "*" + separator + "a.txt", separator + "b" + separator + "a.txt", + separator, false ) ); + // Pattern and target don't start with file separator + assertTrue( SelectorUtils.matchPath( "*" + separator + "a.txt", "b" + separator + "a.txt", separator, false ) ); + } + + /** + *

                    testMatchPath_WindowsFileSeparator.

                    + */ + @Test + public void testMatchPath_WindowsFileSeparator() + { + String separator = "\\"; + + // Pattern and target start with file separator + assertTrue( SelectorUtils.matchPath( separator + "*" + separator + "a.txt", + separator + "b" + separator + "a.txt", separator, false ) ); + // Pattern starts with file separator, target doesn't + assertFalse( SelectorUtils.matchPath( separator + "*" + separator + "a.txt", "b" + separator + "a.txt", + separator, false ) ); + // Pattern doesn't start with file separator, target does + assertFalse( SelectorUtils.matchPath( "*" + separator + "a.txt", separator + "b" + separator + "a.txt", + separator, false ) ); + // Pattern and target don't start with file separator + assertTrue( SelectorUtils.matchPath( "*" + separator + "a.txt", "b" + separator + "a.txt", separator, false ) ); + } +} diff --git a/src/test/java/org/codehaus/plexus/util/StringInputStreamTest.java b/src/test/java/org/codehaus/plexus/util/StringInputStreamTest.java index 6c840c3c..0127c741 100644 --- a/src/test/java/org/codehaus/plexus/util/StringInputStreamTest.java +++ b/src/test/java/org/codehaus/plexus/util/StringInputStreamTest.java @@ -19,11 +19,18 @@ import junit.framework.TestCase; /** - * @author Ben Walding - * @version $Id$ + *

                    StringInputStreamTest class.

                    + * + * @author Ben Walding + * @version $Id: $Id + * @since 3.4.0 */ -public class StringInputStreamTest extends TestCase +public class StringInputStreamTest + extends TestCase { + /** + *

                    testFoo.

                    + */ public void testFoo() { } diff --git a/src/test/java/org/codehaus/plexus/util/StringUtilsTest.java b/src/test/java/org/codehaus/plexus/util/StringUtilsTest.java index 1f212129..acabdb9b 100644 --- a/src/test/java/org/codehaus/plexus/util/StringUtilsTest.java +++ b/src/test/java/org/codehaus/plexus/util/StringUtilsTest.java @@ -16,21 +16,29 @@ * limitations under the License. */ +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + import java.util.Arrays; import java.util.Locale; -import junit.framework.TestCase; +import org.junit.Test; /** * Test string utils. * * @author Brett Porter - * @version $Id$ + * @version $Id: $Id + * @since 3.4.0 */ public class StringUtilsTest - extends TestCase { + /** + *

                    testIsEmpty.

                    + */ + @Test public void testIsEmpty() { assertEquals( true, StringUtils.isEmpty( null ) ); @@ -40,6 +48,10 @@ public void testIsEmpty() assertEquals( false, StringUtils.isEmpty( " foo " ) ); } + /** + *

                    testIsNotEmpty.

                    + */ + @Test public void testIsNotEmpty() { assertEquals( false, StringUtils.isNotEmpty( null ) ); @@ -49,6 +61,10 @@ public void testIsNotEmpty() assertEquals( true, StringUtils.isNotEmpty( " foo " ) ); } + /** + *

                    testIsBlank.

                    + */ + @Test public void testIsBlank() { assertEquals( true, StringUtils.isBlank( null ) ); @@ -58,6 +74,10 @@ public void testIsBlank() assertEquals( false, StringUtils.isBlank( " foo " ) ); } + /** + *

                    testIsNotBlank.

                    + */ + @Test public void testIsNotBlank() { assertEquals( false, StringUtils.isNotBlank( null ) ); @@ -67,12 +87,20 @@ public void testIsNotBlank() assertEquals( true, StringUtils.isNotBlank( " foo " ) ); } + /** + *

                    testCapitalizeFirstLetter.

                    + */ + @Test public void testCapitalizeFirstLetter() { assertEquals( "Id", StringUtils.capitalizeFirstLetter( "id" ) ); assertEquals( "Id", StringUtils.capitalizeFirstLetter( "Id" ) ); } + /** + *

                    testCapitalizeFirstLetterTurkish.

                    + */ + @Test public void testCapitalizeFirstLetterTurkish() { Locale l = Locale.getDefault(); @@ -82,12 +110,20 @@ public void testCapitalizeFirstLetterTurkish() Locale.setDefault( l ); } + /** + *

                    testLowerCaseFirstLetter.

                    + */ + @Test public void testLowerCaseFirstLetter() { assertEquals( "id", StringUtils.lowercaseFirstLetter( "id" ) ); assertEquals( "id", StringUtils.lowercaseFirstLetter( "Id" ) ); } + /** + *

                    testLowerCaseFirstLetterTurkish.

                    + */ + @Test public void testLowerCaseFirstLetterTurkish() { Locale l = Locale.getDefault(); @@ -97,12 +133,20 @@ public void testLowerCaseFirstLetterTurkish() Locale.setDefault( l ); } + /** + *

                    testRemoveAndHump.

                    + */ + @Test public void testRemoveAndHump() { assertEquals( "Id", StringUtils.removeAndHump( "id", "-" ) ); assertEquals( "SomeId", StringUtils.removeAndHump( "some-id", "-" ) ); } + /** + *

                    testRemoveAndHumpTurkish.

                    + */ + @Test public void testRemoveAndHumpTurkish() { Locale l = Locale.getDefault(); @@ -112,6 +156,10 @@ public void testRemoveAndHumpTurkish() Locale.setDefault( l ); } + /** + *

                    testQuote_EscapeEmbeddedSingleQuotes.

                    + */ + @Test public void testQuote_EscapeEmbeddedSingleQuotes() { String src = "This \'is a\' test"; @@ -123,6 +171,25 @@ public void testQuote_EscapeEmbeddedSingleQuotes() assertEquals( check, result ); } + /** + *

                    testQuote_EscapeEmbeddedSingleQuotesWithPattern.

                    + */ + @Test + public void testQuote_EscapeEmbeddedSingleQuotesWithPattern() + { + String src = "This \'is a\' test"; + String check = "\'This pre'postis apre'post test\'"; + + char[] escaped = { '\'', '\"' }; + String result = StringUtils.quoteAndEscape( src, '\'', escaped, new char[] { ' ' }, "pre%spost", false ); + + assertEquals( check, result ); + } + + /** + *

                    testQuote_EscapeEmbeddedDoubleQuotesAndSpaces.

                    + */ + @Test public void testQuote_EscapeEmbeddedDoubleQuotesAndSpaces() { String src = "This \"is a\" test"; @@ -134,6 +201,10 @@ public void testQuote_EscapeEmbeddedDoubleQuotesAndSpaces() assertEquals( check, result ); } + /** + *

                    testQuote_DontQuoteIfUnneeded.

                    + */ + @Test public void testQuote_DontQuoteIfUnneeded() { String src = "ThisIsATest"; @@ -144,6 +215,10 @@ public void testQuote_DontQuoteIfUnneeded() assertEquals( src, result ); } + /** + *

                    testQuote_WrapWithSingleQuotes.

                    + */ + @Test public void testQuote_WrapWithSingleQuotes() { String src = "This is a test"; @@ -155,6 +230,10 @@ public void testQuote_WrapWithSingleQuotes() assertEquals( check, result ); } + /** + *

                    testQuote_PreserveExistingQuotes.

                    + */ + @Test public void testQuote_PreserveExistingQuotes() { String src = "\'This is a test\'"; @@ -165,6 +244,10 @@ public void testQuote_PreserveExistingQuotes() assertEquals( src, result ); } + /** + *

                    testQuote_WrapExistingQuotesWhenForceIsTrue.

                    + */ + @Test public void testQuote_WrapExistingQuotesWhenForceIsTrue() { String src = "\'This is a test\'"; @@ -176,6 +259,10 @@ public void testQuote_WrapExistingQuotesWhenForceIsTrue() assertEquals( check, result ); } + /** + *

                    testQuote_ShortVersion_SingleQuotesPreserved.

                    + */ + @Test public void testQuote_ShortVersion_SingleQuotesPreserved() { String src = "\'This is a test\'"; @@ -185,6 +272,10 @@ public void testQuote_ShortVersion_SingleQuotesPreserved() assertEquals( src, result ); } + /** + *

                    testSplit.

                    + */ + @Test public void testSplit() { String[] tokens; @@ -214,6 +305,12 @@ public void testSplit() assertEquals( Arrays.asList( new String[] { "this", "is", "a", "test", "really" } ), Arrays.asList( tokens ) ); } + /** + *

                    testRemoveDuplicateWhitespace.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testRemoveDuplicateWhitespace() throws Exception { @@ -221,8 +318,19 @@ public void testRemoveDuplicateWhitespace() assertEquals( "this is test ", StringUtils.removeDuplicateWhitespace( s ) ); s = "this \r\n is \n \r test "; assertEquals( "this is test ", StringUtils.removeDuplicateWhitespace( s ) ); + s = " this \r\n is \n \r test"; + assertEquals( " this is test", StringUtils.removeDuplicateWhitespace( s ) ); + s = "this \r\n is \n \r test \n "; + assertEquals( "this is test ", StringUtils.removeDuplicateWhitespace( s ) ); + } + /** + *

                    testUnifyLineSeparators.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testUnifyLineSeparators() throws Exception { @@ -233,7 +341,7 @@ public void testUnifyLineSeparators() StringUtils.unifyLineSeparators( s, "abs" ); assertTrue( "Exception NOT catched", false ); } - catch ( IllegalArgumentException e) + catch ( IllegalArgumentException e ) { assertTrue( "Exception catched", true ); } diff --git a/src/test/java/org/codehaus/plexus/util/SweeperPoolTest.java b/src/test/java/org/codehaus/plexus/util/SweeperPoolTest.java index 631d369f..a642b5a2 100644 --- a/src/test/java/org/codehaus/plexus/util/SweeperPoolTest.java +++ b/src/test/java/org/codehaus/plexus/util/SweeperPoolTest.java @@ -16,52 +16,48 @@ * limitations under the License. */ -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotSame; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import java.util.Vector; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + /** * Created on 21/06/2003 * * @author Bert van Brakel - * @version $Revision$ + * @version $Id: $Id + * @since 3.4.0 */ -public class SweeperPoolTest extends TestCase +public class SweeperPoolTest { /** The pool under test */ TestObjectPool pool; + /** A bunch of object to pool */ Object o1; + Object o2; + Object o3; + Object o4; - Object o5; - Object o6; - /** - * Constructor - * - * - */ - public SweeperPoolTest() - { - super(); - } + Object o5; - /** - * Constructor - * - * @param arg0 - */ - public SweeperPoolTest( String arg0 ) - { - super( arg0 ); - } + Object o6; /** * Test the pool limits it's size, and disposes unneeded objects correctly - * */ + @Test public void testMaxSize() { int sweepInterval = 0; @@ -70,72 +66,49 @@ public void testMaxSize() int minSize = 1; int triggerSize = 2; - pool = - new TestObjectPool( - maxSize, - minSize, - initialCapacity, - sweepInterval, - triggerSize ); + pool = new TestObjectPool( maxSize, minSize, initialCapacity, sweepInterval, triggerSize ); Object tmp = pool.get(); assertNull( "Expected object from pool to be null", tmp ); pool.put( o1 ); assertEquals( "Expected pool to contain 1 object", 1, pool.getSize() ); tmp = pool.get(); - assertSame( - "Expected returned pool object to be the same as the one put in", - tmp, - o1 ); + assertSame( "Expected returned pool object to be the same as the one put in", tmp, o1 ); pool.put( o1 ); pool.put( o2 ); assertEquals( "Expected pool to contain 2 objects", 2, pool.getSize() ); pool.put( o3 ); - assertEquals( - "Expected pool to contain only a maximuim of 2 objects.", - 2, - pool.getSize() ); - assertEquals( - "Expected 1 disposed pool object", - 1, - pool.testGetDisposedObjects().size() ); + assertEquals( "Expected pool to contain only a maximum of 2 objects.", 2, pool.getSize() ); + assertEquals( "Expected 1 disposed pool object", 1, pool.testGetDisposedObjects().size() ); tmp = pool.testGetDisposedObjects().iterator().next(); tmp = pool.get(); - assertEquals( - "Expected pool size to be 1 after removing one object", - 1, - pool.getSize() ); + assertEquals( "Expected pool size to be 1 after removing one object", 1, pool.getSize() ); Object tmp2 = pool.get(); - assertEquals( - "Expected pool size to be 0 after removing 2 objects", - 0, - pool.getSize() ); - assertNotSame( "Expected returned objects to be differnet", tmp, tmp2 ); + assertEquals( "Expected pool size to be 0 after removing 2 objects", 0, pool.getSize() ); + assertNotSame( "Expected returned objects to be different", tmp, tmp2 ); } + /** + *

                    testSweepAndTrim1.

                    + */ + @Test public void testSweepAndTrim1() { - //test trigger + // test trigger int sweepInterval = 1; int initialCapacity = 5; int maxSize = 5; int minSize = 1; int triggerSize = 2; - pool = - new TestObjectPool( - maxSize, - minSize, - initialCapacity, - sweepInterval, - triggerSize ); + pool = new TestObjectPool( maxSize, minSize, initialCapacity, sweepInterval, triggerSize ); pool.put( o1 ); pool.put( o2 ); pool.put( o3 ); pool.put( o4 ); - //give the seeper some time to run + // give the sweeper some time to run synchronized ( this ) { try @@ -144,59 +117,52 @@ public void testSweepAndTrim1() } catch ( InterruptedException e ) { - fail( - "Unexpected exception thrown. e=" - + Tracer.traceToString( e ) ); + fail( "Unexpected exception thrown. e=" + Tracer.traceToString( e ) ); } } - assertEquals( - "Expected pool to only contain 1 object", - 1, - pool.getSize() ); - assertEquals( - "Expected 3 diposed objects", - 3, - pool.testGetDisposedObjects().size() ); + assertEquals( "Expected pool to only contain 1 object", 1, pool.getSize() ); + assertEquals( "Expected 3 disposed objects", 3, pool.testGetDisposedObjects().size() ); } /** - * @see junit.framework.TestCase#setUp() + *

                    setUp.

                    + * + * @throws java.lang.Exception if any. */ - protected void setUp() throws Exception + @Before + public void setUp() + throws Exception { - o1 = new Object(); o2 = new Object(); o3 = new Object(); o4 = new Object(); o5 = new Object(); o6 = new Object(); - super.setUp(); } /** - * @see junit.framework.TestCase#tearDown() + *

                    tearDown.

                    + * + * @throws java.lang.Exception if any. */ - protected void tearDown() throws Exception + @After + public void tearDown() + throws Exception { pool.dispose(); assertTrue( pool.isDisposed() ); pool = null; - super.tearDown(); } - class TestObjectPool extends SweeperPool + class TestObjectPool + extends SweeperPool { - private Vector disposedObjects = new Vector(); - - public TestObjectPool( - int maxSize, - int minSize, - int intialCapacity, - int sweepInterval, - int triggerSize ) + private Vector disposedObjects = new Vector(); + + public TestObjectPool( int maxSize, int minSize, int intialCapacity, int sweepInterval, int triggerSize ) { super( maxSize, minSize, intialCapacity, sweepInterval, triggerSize ); } @@ -214,7 +180,7 @@ public void objectDisposed( Object obj ) disposedObjects.add( obj ); } - public Vector testGetDisposedObjects() + public Vector testGetDisposedObjects() { return disposedObjects; } diff --git a/src/test/java/org/codehaus/plexus/util/TestThreadManager.java b/src/test/java/org/codehaus/plexus/util/TestThreadManager.java index 20a24e06..1ee704b2 100644 --- a/src/test/java/org/codehaus/plexus/util/TestThreadManager.java +++ b/src/test/java/org/codehaus/plexus/util/TestThreadManager.java @@ -22,89 +22,106 @@ import java.util.logging.Logger; /** - * Manages a number of test threads, which notify this manager when they have - * completed. Allows TestCases to easily start and manage multiple test threads. - * - *

                    Created on 9/06/2003

                    + * Manages a number of test threads, which notify this manager when they have completed. Allows TestCases to easily + * start and manage multiple test threads. + *

                    + * Created on 9/06/2003 + *

                    * * @author Bert van Brakel - * @version $Revision$ - * + * @version $Id: $Id + * @since 3.4.0 */ public class TestThreadManager { - //~ Instance fields ---------------------------------------------------------------------------- + // ~ Instance fields ---------------------------------------------------------------------------- /** Test threads which have completed running */ - private Collection runThreads = new Vector(); - /** Test threads still needing to be run, or are currently running*/ - private Collection toRunThreads = new Vector(); + private Collection runThreads = new Vector(); + + /** Test threads still needing to be run, or are currently running */ + private Collection toRunThreads = new Vector(); + private Logger logger = null; + /** Any test threads which failed */ - private Vector failedThreads = new Vector(); + private Vector failedThreads = new Vector(); - /**The object to notify when all the test threads have complleted. Clients use this - * to lock on (wait) while waiting for the tests to complete*/ + /** + * The object to notify when all the test threads have completed. Clients use this to lock on (wait) while waiting + * for the tests to complete + */ private Object notify = null; - //~ Constructors ------------------------------------------------------------------------------- + // ~ Constructors ------------------------------------------------------------------------------- + /** + *

                    Constructor for TestThreadManager.

                    + * + * @param notify a {@link java.lang.Object} object. + */ public TestThreadManager( Object notify ) { super(); this.notify = notify; } - //~ Methods ------------------------------------------------------------------------------------ + // ~ Methods ------------------------------------------------------------------------------------ /** - * @return + *

                    Getter for the field runThreads.

                    + * + * @return a {@link java.util.Collection} object. */ - public Collection getRunThreads() + public Collection getRunThreads() { return runThreads; } + /** + *

                    runTestThreads.

                    + */ public void runTestThreads() { failedThreads.clear(); - //use an array as the tests may run very quickly - //and modify the toRunThreads vector and hence - //cause a Concurrent ModificationException on an - //iterator - Object[] threads = toRunThreads.toArray(); - for ( int i = 0; i < threads.length; i++ ) + // use an array as the tests may run very quickly + // and modify the toRunThreads vector and hence + // cause a Concurrent ModificationException on an + // iterator + for ( AbstractTestThread toRunThread : toRunThreads ) { - //System.out.println("Starting thread " + i +" ..." ); - ( (AbstractTestThread) threads[i] ).start(); + toRunThread.start(); } } - public Collection getFailedTests() + /** + *

                    getFailedTests.

                    + * + * @return a {@link java.util.Collection} object. + */ + public Collection getFailedTests() { return failedThreads; } /** - * Return the object which threads can wait on to be notified - * when all the test threads have completed running + * Return the object which threads can wait on to be notified when all the test threads have completed running * - * @return + * @return a {@link java.lang.Object} object. */ public Object getNotifyObject() { return notify; } - + /** + *

                    hasFailedThreads.

                    + * + * @return a boolean. + */ public boolean hasFailedThreads() { - if ( failedThreads.size() == 0 ) - { - return false; - } - else - return true; + return !failedThreads.isEmpty(); } /** @@ -118,9 +135,11 @@ public boolean isStillRunningThreads() } /** - * @return + *

                    Getter for the field toRunThreads.

                    + * + * @return a {@link java.util.Collection} object. */ - public Collection getToRunThreads() + public Collection getToRunThreads() { return toRunThreads; } @@ -135,9 +154,15 @@ public void clear() failedThreads.clear(); } - /* (non-Javadoc) - * @see java.util.Collection#remove(java.lang.Object) - */ + /* + * (non-Javadoc) + * @see java.util.Collection#remove(java.lang.Object) + */ + /** + *

                    completed.

                    + * + * @param thread a {@link org.codehaus.plexus.util.AbstractTestThread} object. + */ public synchronized void completed( AbstractTestThread thread ) { toRunThreads.remove( thread ); @@ -146,8 +171,8 @@ public synchronized void completed( AbstractTestThread thread ) { failedThreads.add( thread ); } - //wakeup thread which is waiting for the threads to complete - //execution + // wakeup thread which is waiting for the threads to complete + // execution if ( toRunThreads.isEmpty() ) { synchronized ( notify ) @@ -158,8 +183,7 @@ public synchronized void completed( AbstractTestThread thread ) } /** - * Overide this to add your own stuff. Called after - * registerThread(Object) + * Override this to add your own stuff. Called after registerThread(Object) * * @param thread DOCUMENT ME! */ @@ -167,6 +191,11 @@ public void doRegisterThread( AbstractTestThread thread ) { } + /** + *

                    registerThread.

                    + * + * @param thread a {@link org.codehaus.plexus.util.AbstractTestThread} object. + */ public final void registerThread( AbstractTestThread thread ) { thread.setThreadRegistry( this ); @@ -179,16 +208,14 @@ public final void registerThread( AbstractTestThread thread ) } /** - * Put all the runThreads back in the que to be run again and - * clear the failedTest collection + * Put all the runThreads back in the que to be run again and clear the failedTest collection */ public void reset() { toRunThreads.clear(); - Iterator iter = runThreads.iterator(); - while ( iter.hasNext() ) + for ( Object runThread : runThreads ) { - AbstractTestThread test = (AbstractTestThread) iter.next(); + AbstractTestThread test = (AbstractTestThread) runThread; test.reset(); registerThread( test ); } diff --git a/src/test/java/org/codehaus/plexus/util/Tracer.java b/src/test/java/org/codehaus/plexus/util/Tracer.java index d378d3e3..5bf4f84d 100644 --- a/src/test/java/org/codehaus/plexus/util/Tracer.java +++ b/src/test/java/org/codehaus/plexus/util/Tracer.java @@ -21,19 +21,19 @@ /** * Convenience class to handle throwable stacktraces - * - *

                    Created on 18/06/2003

                    + *

                    + * Created on 18/06/2003 + *

                    * * @author Bert van Brakel - * @version $Revision$ + * @version $Id: $Id + * @since 3.4.0 */ public class Tracer { /** * Constructor - * - * */ private Tracer() { @@ -42,7 +42,10 @@ private Tracer() /** * Return the throwable stack trace as a string - * */ + * + * @param t a {@link java.lang.Throwable} object. + * @return a {@link java.lang.String} object. + */ public static String traceToString( Throwable t ) { if ( t == null ) diff --git a/src/test/java/org/codehaus/plexus/util/WalkCollector.java b/src/test/java/org/codehaus/plexus/util/WalkCollector.java index 6911d879..c5c4e018 100644 --- a/src/test/java/org/codehaus/plexus/util/WalkCollector.java +++ b/src/test/java/org/codehaus/plexus/util/WalkCollector.java @@ -23,7 +23,7 @@ class WalkCollector implements DirectoryWalkListener { - public List steps; + public List steps; public File startingDir; @@ -35,15 +35,19 @@ class WalkCollector public int percentageHigh; + /** + *

                    Constructor for WalkCollector.

                    + */ public WalkCollector() { - steps = new ArrayList(); + steps = new ArrayList(); startCount = 0; finishCount = 0; percentageLow = 0; percentageHigh = 0; } + /** {@inheritDoc} */ public void directoryWalkStarting( File basedir ) { debug( "Walk Starting: " + basedir ); @@ -51,6 +55,7 @@ public void directoryWalkStarting( File basedir ) startingDir = basedir; } + /** {@inheritDoc} */ public void directoryWalkStep( int percentage, File file ) { percentageLow = Math.min( percentageLow, percentage ); @@ -59,14 +64,18 @@ public void directoryWalkStep( int percentage, File file ) steps.add( file ); } + /** + *

                    directoryWalkFinished.

                    + */ public void directoryWalkFinished() { debug( "Walk Finished." ); finishCount++; } + /** {@inheritDoc} */ public void debug( String message ) { System.out.println( message ); } -} \ No newline at end of file +} diff --git a/src/test/java/org/codehaus/plexus/util/cli/CommandLineUtilsTest.java b/src/test/java/org/codehaus/plexus/util/cli/CommandLineUtilsTest.java index e37268fe..92cdaa2d 100644 --- a/src/test/java/org/codehaus/plexus/util/cli/CommandLineUtilsTest.java +++ b/src/test/java/org/codehaus/plexus/util/cli/CommandLineUtilsTest.java @@ -16,19 +16,32 @@ * limitations under the License. */ +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; + import java.util.Arrays; -import java.util.Iterator; import java.util.Locale; import java.util.Properties; import org.codehaus.plexus.util.Os; +import org.junit.Test; -import junit.framework.TestCase; - +/** + *

                    CommandLineUtilsTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ +@SuppressWarnings( { "JavaDoc", "deprecation" } ) public class CommandLineUtilsTest - extends TestCase { + /** + *

                    testQuoteArguments.

                    + */ + @Test public void testQuoteArguments() { try @@ -59,21 +72,27 @@ public void testQuoteArguments() /** * Tests that case-insensitive environment variables are normalized to upper case. + * + * @throws java.lang.Exception if any. */ + @Test public void testGetSystemEnvVarsCaseInsensitive() throws Exception { Properties vars = CommandLineUtils.getSystemEnvVars( false ); - for ( Iterator it = vars.keySet().iterator(); it.hasNext(); ) + for ( Object o : vars.keySet() ) { - String variable = (String) it.next(); + String variable = (String) o; assertEquals( variable.toUpperCase( Locale.ENGLISH ), variable ); } } /** * Tests that environment variables on Windows are normalized to upper case. Does nothing on Unix platforms. + * + * @throws java.lang.Exception if any. */ + @Test public void testGetSystemEnvVarsWindows() throws Exception { @@ -82,16 +101,19 @@ public void testGetSystemEnvVarsWindows() return; } Properties vars = CommandLineUtils.getSystemEnvVars(); - for ( Iterator it = vars.keySet().iterator(); it.hasNext(); ) + for ( Object o : vars.keySet() ) { - String variable = (String) it.next(); + String variable = (String) o; assertEquals( variable.toUpperCase( Locale.ENGLISH ), variable ); } } /** * Tests the splitting of a command line into distinct arguments. + * + * @throws java.lang.Exception if any. */ + @Test public void testTranslateCommandline() throws Exception { diff --git a/src/test/java/org/codehaus/plexus/util/cli/CommandlineTest.java b/src/test/java/org/codehaus/plexus/util/cli/CommandlineTest.java index 8da3794f..15cb9744 100644 --- a/src/test/java/org/codehaus/plexus/util/cli/CommandlineTest.java +++ b/src/test/java/org/codehaus/plexus/util/cli/CommandlineTest.java @@ -16,43 +16,45 @@ * limitations under the License. */ +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.File; +import java.io.IOException; +import java.io.Writer; +import java.nio.file.Files; +import java.nio.file.Paths; + import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.Os; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.cli.shell.BourneShell; import org.codehaus.plexus.util.cli.shell.CmdShell; import org.codehaus.plexus.util.cli.shell.Shell; +import org.junit.Before; +import org.junit.Test; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.StringWriter; -import java.io.Writer; - -import junit.framework.TestCase; - +/** + *

                    CommandlineTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ public class CommandlineTest - extends TestCase { private String baseDir; /** - * @param testName - */ - public CommandlineTest( final String testName ) - { - super( testName ); - } - - /* - * @see TestCase#setUp() + *

                    setUp.

                    + * + * @throws java.lang.Exception if any. */ + @Before public void setUp() throws Exception { - super.setUp(); baseDir = System.getProperty( "basedir" ); if ( baseDir == null ) @@ -61,143 +63,140 @@ public void setUp() } } + /** + *

                    testCommandlineWithoutCommandInConstructor.

                    + */ + @Test public void testCommandlineWithoutCommandInConstructor() { - try - { - Commandline cmd = new Commandline( new Shell() ); - cmd.setWorkingDirectory( baseDir ); - cmd.createArgument().setValue( "cd" ); - cmd.createArgument().setValue( "." ); + Commandline cmd = new Commandline( new Shell() ); + cmd.setWorkingDirectory( baseDir ); + cmd.createArgument().setValue( "cd" ); + cmd.createArgument().setValue( "." ); - // NOTE: cmd.toString() uses CommandLineUtils.toString( String[] ), which *quotes* the result. - assertEquals( "cd .", cmd.toString() ); - } - catch ( Exception e ) - { - fail( e.getMessage() ); - } + // NOTE: cmd.toString() uses CommandLineUtils.toString( String[] ), which *quotes* the result. + assertEquals( "cd .", cmd.toString() ); } + /** + *

                    testCommandlineWithCommandInConstructor.

                    + */ + @Test public void testCommandlineWithCommandInConstructor() { - try - { - Commandline cmd = new Commandline( "cd .", new Shell() ); - cmd.setWorkingDirectory( baseDir ); + Commandline cmd = new Commandline( "cd .", new Shell() ); + cmd.setWorkingDirectory( baseDir ); - // NOTE: cmd.toString() uses CommandLineUtils.toString( String[] ), which *quotes* the result. - assertEquals( "cd .", cmd.toString() ); - } - catch ( Exception e ) - { - fail( e.getMessage() ); - } + // NOTE: cmd.toString() uses CommandLineUtils.toString( String[] ), which *quotes* the result. + assertEquals( "cd .", cmd.toString() ); } - public void testExecute() + /** + *

                    testExecuteBinaryOnPath.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testExecuteBinaryOnPath() + throws Exception { - try - { - // allow it to detect the proper shell here. - Commandline cmd = new Commandline(); - cmd.setWorkingDirectory( baseDir ); - cmd.setExecutable( "echo" ); - assertEquals( "echo", cmd.getShell().getOriginalExecutable() ); - cmd.createArgument().setValue( "Hello" ); - - StringWriter swriter = new StringWriter(); - Process process = cmd.execute(); - - Reader reader = new InputStreamReader( process.getInputStream() ); - - char[] chars = new char[16]; - int read = -1; - while ( ( read = reader.read( chars ) ) > -1 ) - { - swriter.write( chars, 0, read ); - } + // Maven startup script on PATH is required for this test + Commandline cmd = new Commandline(); + cmd.setWorkingDirectory( baseDir ); + cmd.setExecutable( "mvn" ); + assertEquals( "mvn", cmd.getShell().getOriginalExecutable() ); + cmd.createArg().setValue( "-version" ); + Process process = cmd.execute(); + String out = IOUtil.toString( process.getInputStream() ); + assertTrue( out.contains( "Apache Maven" ) ); + assertTrue( out.contains( "Maven home:" ) ); + assertTrue( out.contains( "Java version:" ) ); + } - String output = swriter.toString().trim(); + /** + *

                    testExecute.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testExecute() + throws Exception + { + // allow it to detect the proper shell here. + Commandline cmd = new Commandline(); + cmd.setWorkingDirectory( baseDir ); + cmd.setExecutable( "echo" ); + assertEquals( "echo", cmd.getShell().getOriginalExecutable() ); + cmd.createArgument().setValue( "Hello" ); - assertEquals( "Hello", output ); - } - catch ( Exception e ) - { - fail( e.getMessage() ); - } + Process process = cmd.execute(); + assertEquals( "Hello", IOUtil.toString( process.getInputStream() ).trim() ); } + /** + *

                    testSetLine.

                    + */ + @Test public void testSetLine() { - try - { - Commandline cmd = new Commandline( new Shell() ); - cmd.setWorkingDirectory( baseDir ); - cmd.setExecutable( "echo" ); - cmd.createArgument().setLine( null ); - cmd.createArgument().setLine( "Hello" ); - - // NOTE: cmd.toString() uses CommandLineUtils.toString( String[] ), which *quotes* the result. - assertEquals( "echo Hello", cmd.toString() ); - } - catch ( Exception e ) - { - fail( e.getMessage() ); - } + Commandline cmd = new Commandline( new Shell() ); + cmd.setWorkingDirectory( baseDir ); + cmd.setExecutable( "echo" ); + cmd.createArgument().setLine( null ); + cmd.createArgument().setLine( "Hello" ); + + // NOTE: cmd.toString() uses CommandLineUtils.toString( String[] ), which *quotes* the result. + assertEquals( "echo Hello", cmd.toString() ); } + /** + *

                    testCreateCommandInReverseOrder.

                    + */ + @Test public void testCreateCommandInReverseOrder() { - try - { - Commandline cmd = new Commandline( new Shell() ); - cmd.setWorkingDirectory( baseDir ); - cmd.createArgument().setValue( "." ); - cmd.createArgument( true ).setValue( "cd" ); + Commandline cmd = new Commandline( new Shell() ); + cmd.setWorkingDirectory( baseDir ); + cmd.createArgument().setValue( "." ); + cmd.createArgument( true ).setValue( "cd" ); - // NOTE: cmd.toString() uses CommandLineUtils.toString( String[] ), which *quotes* the result. - assertEquals( "cd .", cmd.toString() ); - } - catch ( Exception e ) - { - fail( e.getMessage() ); - } + // NOTE: cmd.toString() uses CommandLineUtils.toString( String[] ), which *quotes* the result. + assertEquals( "cd .", cmd.toString() ); } + /** + *

                    testSetFile.

                    + */ + @Test public void testSetFile() { - try + Commandline cmd = new Commandline( new Shell() ); + cmd.setWorkingDirectory( baseDir ); + cmd.createArgument().setValue( "more" ); + File f = new File( "test.txt" ); + cmd.createArgument().setFile( f ); + String fileName = f.getAbsolutePath(); + if ( fileName.contains( " " ) ) { - Commandline cmd = new Commandline( new Shell() ); - cmd.setWorkingDirectory( baseDir ); - cmd.createArgument().setValue( "more" ); - File f = new File( "test.txt" ); - cmd.createArgument().setFile( f ); - String fileName = f.getAbsolutePath(); - if ( fileName.indexOf( " " ) >= 0 ) - { - fileName = "\"" + fileName + "\""; - } - - // NOTE: cmd.toString() uses CommandLineUtils.toString( String[] ), which *quotes* the result. - assertEquals( "more " + fileName, cmd.toString() ); - } - catch ( Exception e ) - { - fail( e.getMessage() ); + fileName = "\"" + fileName + "\""; } + + // NOTE: cmd.toString() uses CommandLineUtils.toString( String[] ), which *quotes* the result. + assertEquals( "more " + fileName, cmd.toString() ); } + /** + *

                    testGetShellCommandLineWindows.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testGetShellCommandLineWindows() throws Exception { Commandline cmd = new Commandline( new CmdShell() ); cmd.setExecutable( "c:\\Program Files\\xxx" ); - cmd.addArguments( new String[] { - "a", - "b" - } ); + cmd.addArguments( new String[] { "a", "b" } ); String[] shellCommandline = cmd.getShellCommandline(); assertEquals( "Command line size", 4, shellCommandline.length ); @@ -205,21 +204,23 @@ public void testGetShellCommandLineWindows() assertEquals( "cmd.exe", shellCommandline[0] ); assertEquals( "/X", shellCommandline[1] ); assertEquals( "/C", shellCommandline[2] ); - String expectedShellCmd = "\"c:" + File.separator + "Program Files" + File.separator - + "xxx\" a b"; + String expectedShellCmd = "\"c:" + File.separator + "Program Files" + File.separator + "xxx\" a b"; expectedShellCmd = "\"" + expectedShellCmd + "\""; assertEquals( expectedShellCmd, shellCommandline[3] ); } + /** + *

                    testGetShellCommandLineWindowsWithSeveralQuotes.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testGetShellCommandLineWindowsWithSeveralQuotes() throws Exception { Commandline cmd = new Commandline( new CmdShell() ); cmd.setExecutable( "c:\\Program Files\\xxx" ); - cmd.addArguments( new String[] { - "c:\\Documents and Settings\\whatever", - "b" - } ); + cmd.addArguments( new String[] { "c:\\Documents and Settings\\whatever", "b" } ); String[] shellCommandline = cmd.getShellCommandline(); assertEquals( "Command line size", 4, shellCommandline.length ); @@ -228,23 +229,23 @@ public void testGetShellCommandLineWindowsWithSeveralQuotes() assertEquals( "/X", shellCommandline[1] ); assertEquals( "/C", shellCommandline[2] ); String expectedShellCmd = "\"c:" + File.separator + "Program Files" + File.separator - + "xxx\" \"c:\\Documents and Settings\\whatever\" b"; + + "xxx\" \"c:\\Documents and Settings\\whatever\" b"; expectedShellCmd = "\"" + expectedShellCmd + "\""; assertEquals( expectedShellCmd, shellCommandline[3] ); } /** * Test the command line generated for the bash shell - * @throws Exception + * + * @throws java.lang.Exception */ + @Test public void testGetShellCommandLineBash() throws Exception { Commandline cmd = new Commandline( new BourneShell() ); cmd.setExecutable( "/bin/echo" ); - cmd.addArguments( new String[] { - "hello world" - } ); + cmd.addArguments( new String[] { "hello world" } ); String[] shellCommandline = cmd.getShellCommandline(); @@ -252,26 +253,26 @@ public void testGetShellCommandLineBash() assertEquals( "/bin/sh", shellCommandline[0] ); assertEquals( "-c", shellCommandline[1] ); - String expectedShellCmd = "/bin/echo \'hello world\'"; + String expectedShellCmd = "'/bin/echo' 'hello world'"; if ( Os.isFamily( Os.FAMILY_WINDOWS ) ) { - expectedShellCmd = "\\bin\\echo \'hello world\'"; + expectedShellCmd = "'\\bin\\echo' \'hello world\'"; } assertEquals( expectedShellCmd, shellCommandline[2] ); } /** - * Test the command line generated for the bash shell - * @throws Exception - */ + * Test the command line generated for the bash shell + * + * @throws java.lang.Exception + */ + @Test public void testGetShellCommandLineBash_WithWorkingDirectory() throws Exception { Commandline cmd = new Commandline( new BourneShell() ); cmd.setExecutable( "/bin/echo" ); - cmd.addArguments( new String[] { - "hello world" - } ); + cmd.addArguments( new String[] { "hello world" } ); File root = File.listRoots()[0]; File workingDirectory = new File( root, "path with spaces" ); cmd.setWorkingDirectory( workingDirectory ); @@ -282,28 +283,26 @@ public void testGetShellCommandLineBash_WithWorkingDirectory() assertEquals( "/bin/sh", shellCommandline[0] ); assertEquals( "-c", shellCommandline[1] ); - String expectedShellCmd = "cd \"" + root.getAbsolutePath() - + "path with spaces\" && /bin/echo \'hello world\'"; + String expectedShellCmd = "cd '" + root.getAbsolutePath() + "path with spaces' && '/bin/echo' 'hello world'"; if ( Os.isFamily( Os.FAMILY_WINDOWS ) ) { - expectedShellCmd = "cd \"" + root.getAbsolutePath() - + "path with spaces\" && \\bin\\echo \'hello world\'"; + expectedShellCmd = "cd '" + root.getAbsolutePath() + "path with spaces' && '\\bin\\echo' 'hello world'"; } assertEquals( expectedShellCmd, shellCommandline[2] ); } /** * Test the command line generated for the bash shell - * @throws Exception + * + * @throws java.lang.Exception */ + @Test public void testGetShellCommandLineBash_WithSingleQuotedArg() throws Exception { Commandline cmd = new Commandline( new BourneShell() ); cmd.setExecutable( "/bin/echo" ); - cmd.addArguments( new String[] { - "\'hello world\'" - } ); + cmd.addArguments( new String[] { "\'hello world\'" } ); String[] shellCommandline = cmd.getShellCommandline(); @@ -311,23 +310,26 @@ public void testGetShellCommandLineBash_WithSingleQuotedArg() assertEquals( "/bin/sh", shellCommandline[0] ); assertEquals( "-c", shellCommandline[1] ); - String expectedShellCmd = "/bin/echo \'hello world\'"; + String expectedShellCmd = "'/bin/echo' ''\"'\"'hello world'\"'\"''"; if ( Os.isFamily( Os.FAMILY_WINDOWS ) ) { - expectedShellCmd = "\\bin\\echo \'hello world\'"; + expectedShellCmd = expectedShellCmd.replace( "/bin/echo", "\\bin\\echo" ); } assertEquals( expectedShellCmd, shellCommandline[2] ); } + /** + *

                    testGetShellCommandLineNonWindows.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testGetShellCommandLineNonWindows() throws Exception { Commandline cmd = new Commandline( new BourneShell() ); cmd.setExecutable( "/usr/bin" ); - cmd.addArguments( new String[] { - "a", - "b" - } ); + cmd.addArguments( new String[] { "a", "b" } ); String[] shellCommandline = cmd.getShellCommandline(); assertEquals( "Command line size", 3, shellCommandline.length ); @@ -337,14 +339,20 @@ public void testGetShellCommandLineNonWindows() if ( Os.isFamily( Os.FAMILY_WINDOWS ) ) { - assertEquals( "\\usr\\bin a b", shellCommandline[2] ); + assertEquals( "'\\usr\\bin' 'a' 'b'", shellCommandline[2] ); } else { - assertEquals( "/usr/bin a b", shellCommandline[2] ); + assertEquals( "'/usr/bin' 'a' 'b'", shellCommandline[2] ); } } + /** + *

                    testEnvironment.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testEnvironment() throws Exception { @@ -353,6 +361,12 @@ public void testEnvironment() assertEquals( "name=value", cmd.getEnvironmentVariables()[0] ); } + /** + *

                    testEnvironmentWitOverrideSystemEnvironment.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testEnvironmentWitOverrideSystemEnvironment() throws Exception { @@ -361,9 +375,9 @@ public void testEnvironmentWitOverrideSystemEnvironment() cmd.addEnvironment( "JAVA_HOME", "/usr/jdk1.5" ); String[] environmentVariables = cmd.getEnvironmentVariables(); - for ( int i = 0, size = environmentVariables.length; i < size; i++ ) + for ( String environmentVariable : environmentVariables ) { - if ( "JAVA_HOME=/usr/jdk1.5".equals( environmentVariables[i] ) ) + if ( "JAVA_HOME=/usr/jdk1.5".equals( environmentVariable ) ) { return; } @@ -375,8 +389,9 @@ public void testEnvironmentWitOverrideSystemEnvironment() /** * Test an executable with a single apostrophe ' in its path * - * @throws Exception + * @throws java.lang.Exception */ + @Test public void testQuotedPathWithSingleApostrophe() throws Exception { @@ -387,11 +402,25 @@ public void testQuotedPathWithSingleApostrophe() createAndCallScript( dir, "echo Quoted" ); } + /** + * Test an executable with shell-expandable content in its path. + * + * @throws java.lang.Exception + */ + @Test + public void testPathWithShellExpansionStrings() + throws Exception + { + File dir = new File( System.getProperty( "basedir" ), "target/test/dollar$test" ); + createAndCallScript( dir, "echo Quoted" ); + } + /** * Test an executable with a single quotation mark \" in its path only for non Windows box. * - * @throws Exception + * @throws java.lang.Exception */ + @Test public void testQuotedPathWithQuotationMark() throws Exception { @@ -412,8 +441,9 @@ public void testQuotedPathWithQuotationMark() * Test an executable with a single quotation mark \" and ' in its path only for non * Windows box. * - * @throws Exception + * @throws java.lang.Exception */ + @Test public void testQuotedPathWithQuotationMarkAndApostrophe() throws Exception { @@ -433,8 +463,9 @@ public void testQuotedPathWithQuotationMarkAndApostrophe() /** * Test an executable with a quote in its path and no space * - * @throws Exception + * @throws java.lang.Exception */ + @Test public void testOnlyQuotedPath() throws Exception { @@ -456,9 +487,21 @@ public void testOnlyQuotedPath() throw new IOException( java.getAbsolutePath() + " doesn't exist" ); } - createAndCallScript( dir, java.getAbsolutePath() + " -version" ); + String javaBinStr = java.getAbsolutePath(); + if ( Os.isFamily( Os.FAMILY_WINDOWS ) && javaBinStr.contains( " " ) ) + { + javaBinStr = "\"" + javaBinStr + "\""; + } + + createAndCallScript( dir, javaBinStr + " -version" ); } + /** + *

                    testDollarSignInArgumentPath.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testDollarSignInArgumentPath() throws Exception { @@ -468,10 +511,10 @@ public void testDollarSignInArgumentPath() assertTrue( "Can't create dir:" + dir.getAbsolutePath(), dir.mkdirs() ); } - FileWriter writer = null; + Writer writer = null; try { - writer = new FileWriter( new File( dir, "test$1.txt" ) ); + writer = Files.newBufferedWriter( dir.toPath().resolve( "test$1.txt" ) ); IOUtil.copy( "Success", writer ); } finally @@ -480,7 +523,7 @@ public void testDollarSignInArgumentPath() } Commandline cmd = new Commandline(); - //cmd.getShell().setShellCommand( "/bin/sh" ); + // cmd.getShell().setShellCommand( "/bin/sh" ); cmd.getShell().setQuotedArgumentsEnabled( true ); cmd.setExecutable( "cat" ); if ( Os.isFamily( Os.FAMILY_WINDOWS ) ) @@ -493,6 +536,47 @@ public void testDollarSignInArgumentPath() executeCommandLine( cmd ); } + /** + *

                    testTimeOutException.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testTimeOutException() + throws Exception + { + File javaHome = new File( System.getProperty( "java.home" ) ); + File java; + if ( Os.isFamily( Os.FAMILY_WINDOWS ) ) + { + java = new File( javaHome, "/bin/java.exe" ); + } + else + { + java = new File( javaHome, "/bin/java" ); + } + + if ( !java.exists() ) + { + throw new IOException( java.getAbsolutePath() + " doesn't exist" ); + } + + Commandline cli = new Commandline(); + cli.setExecutable( java.getAbsolutePath() ); + cli.createArg().setLine( "-version" ); + CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer(); + try + { + // if the os is faster than 1s to execute java -version the unit will fail :-) + CommandLineUtils.executeCommandLine( cli, new DefaultConsumer(), err, 1 ); + } + catch ( CommandLineTimeOutException e ) + { + // it works + } + + } + /** * Make the file executable for Unix box. * @@ -557,7 +641,7 @@ private static void createAndCallScript( File dir, String content ) bat = new File( dir, "echo" ); } - Writer w = new FileWriter( bat ); + Writer w = Files.newBufferedWriter( bat.toPath() ); try { IOUtil.copy( content, w ); @@ -597,7 +681,7 @@ private static void executeCommandLine( Commandline cmd ) if ( exitCode != 0 ) { - StringBuffer msg = new StringBuffer( "Exit code: " + exitCode + " - " + err.getOutput() ); + String msg = "Exit code: " + exitCode + " - " + err.getOutput(); throw new Exception( msg.toString() ); } } diff --git a/src/test/java/org/codehaus/plexus/util/cli/DefaultConsumerTest.java b/src/test/java/org/codehaus/plexus/util/cli/DefaultConsumerTest.java index 3a94f43a..423d30ed 100644 --- a/src/test/java/org/codehaus/plexus/util/cli/DefaultConsumerTest.java +++ b/src/test/java/org/codehaus/plexus/util/cli/DefaultConsumerTest.java @@ -16,30 +16,28 @@ * limitations under the License. */ -import junit.framework.TestCase; +import org.junit.Test; -public class DefaultConsumerTest extends TestCase +/** + *

                    DefaultConsumerTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ +public class DefaultConsumerTest { /** - * @param testName + *

                    testConsumeLine.

                    + * + * @throws java.lang.Exception if any. */ - public DefaultConsumerTest( String testName ) - { - super( testName ); - } - - /* - * @see TestCase#setUp() - */ - public void setUp() throws Exception - { - super.setUp(); - } - + @Test public void testConsumeLine() + throws Exception { DefaultConsumer cons = new DefaultConsumer(); cons.consumeLine( "Test DefaultConsumer consumeLine" ); } -} \ No newline at end of file +} diff --git a/src/test/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizerTest.java b/src/test/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizerTest.java index c0f943a5..05d043f5 100644 --- a/src/test/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizerTest.java +++ b/src/test/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizerTest.java @@ -16,30 +16,28 @@ * limitations under the License. */ -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; -public class EnhancedStringTokenizerTest extends TestCase +import org.junit.Test; + +/** + *

                    EnhancedStringTokenizerTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ +public class EnhancedStringTokenizerTest { /** - * @param testName - */ - public EnhancedStringTokenizerTest( final String testName ) - { - super( testName ); - } - - /* - * @see TestCase#setUp() + *

                    test1.

                    */ - public void setUp() throws Exception - { - super.setUp(); - } - + @Test public void test1() { EnhancedStringTokenizer est = new EnhancedStringTokenizer( "this is a test string" ); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); while ( est.hasMoreTokens() ) { sb.append( est.nextToken() ); @@ -48,6 +46,10 @@ public void test1() assertEquals( "this is a test string ", sb.toString() ); } + /** + *

                    test2.

                    + */ + @Test public void test2() { EnhancedStringTokenizer est = new EnhancedStringTokenizer( "1,,,3,,4", "," ); @@ -59,6 +61,10 @@ public void test2() assertEquals( "Token 6", "4", est.nextToken() ); } + /** + *

                    test3.

                    + */ + @Test public void test3() { EnhancedStringTokenizer est = new EnhancedStringTokenizer( "1,,,3,,4", ",", true ); @@ -75,6 +81,10 @@ public void test3() assertEquals( "Token 11", "4", est.nextToken() ); } + /** + *

                    testMultipleDelim.

                    + */ + @Test public void testMultipleDelim() { EnhancedStringTokenizer est = new EnhancedStringTokenizer( "1 2|3|4", " |", true ); @@ -88,6 +98,10 @@ public void testMultipleDelim() assertEquals( "est.hasMoreTokens()", false, est.hasMoreTokens() ); } + /** + *

                    testEmptyString.

                    + */ + @Test public void testEmptyString() { EnhancedStringTokenizer est = new EnhancedStringTokenizer( "" ); @@ -102,6 +116,10 @@ public void testEmptyString() } } + /** + *

                    testSimpleString.

                    + */ + @Test public void testSimpleString() { EnhancedStringTokenizer est = new EnhancedStringTokenizer( "a " ); diff --git a/src/test/java/org/codehaus/plexus/util/cli/StreamPumperTest.java b/src/test/java/org/codehaus/plexus/util/cli/StreamPumperTest.java index 8a83b4df..eec5def5 100644 --- a/src/test/java/org/codehaus/plexus/util/cli/StreamPumperTest.java +++ b/src/test/java/org/codehaus/plexus/util/cli/StreamPumperTest.java @@ -52,55 +52,55 @@ * limitations under the License. */ +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; import java.io.PrintWriter; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; -import junit.framework.TestCase; +import org.junit.Test; /** + *

                    StreamPumperTest class.

                    + * * @author Paul Julius + * @version $Id: $Id + * @since 3.4.0 */ -public class StreamPumperTest extends TestCase +public class StreamPumperTest { - private String lineSeparator; + private String lineSeparator = System.lineSeparator(); /** - * @param testName - */ - public StreamPumperTest( String testName ) - { - super( testName ); - } - - /* - * @see TestCase#setUp() + *

                    testPumping.

                    */ - public void setUp() throws Exception - { - super.setUp(); - lineSeparator = System.getProperty( "line.separator" ); - } - + @Test public void testPumping() { String line1 = "line1"; String line2 = "line2"; String lines = line1 + "\n" + line2; - ByteArrayInputStream inputStream = - new ByteArrayInputStream( lines.getBytes() ); + ByteArrayInputStream inputStream = new ByteArrayInputStream( lines.getBytes() ); TestConsumer consumer = new TestConsumer(); StreamPumper pumper = new StreamPumper( inputStream, consumer ); new Thread( pumper ).run(); - //Check the consumer to see if it got both lines. + // Check the consumer to see if it got both lines. assertTrue( consumer.wasLineConsumed( line1, 1000 ) ); assertTrue( consumer.wasLineConsumed( line2, 1000 ) ); } + /** + *

                    testPumpingWithPrintWriter.

                    + */ + @Test public void testPumpingWithPrintWriter() { String inputString = "This a test string"; @@ -114,60 +114,150 @@ public void testPumpingWithPrintWriter() assertEquals( "This a test string" + lineSeparator, sw.toString() ); pumper.close(); } -} - -/** - * Used by the test to track whether a line actually got consumed or not. - */ -class TestConsumer implements StreamConsumer -{ - - private List lines = new ArrayList(); /** - * Checks to see if this consumer consumed a particular line. This method - * will wait up to timeout number of milliseconds for the line to get - * consumed. - * - * @param testLine Line to test for. - * @param timeout Number of milliseconds to wait for the line. - * @return true if the line gets consumed, else false. + *

                    testPumperReadsInputStreamUntilEndEvenIfConsumerFails.

                    */ - public boolean wasLineConsumed( String testLine, long timeout ) + @Test + public void testPumperReadsInputStreamUntilEndEvenIfConsumerFails() + { + // the number of bytes generated should surely exceed the read buffer used by the pumper + GeneratorInputStream gis = new GeneratorInputStream( 1024 * 1024 * 4 ); + StreamPumper pumper = new StreamPumper( gis, new FailingConsumer() ); + pumper.run(); + assertEquals( "input stream was not fully consumed, producer deadlocks", gis.size, gis.read ); + assertTrue( gis.closed ); + assertNotNull( pumper.getException() ); + } + + static class GeneratorInputStream + extends InputStream { - long start = System.currentTimeMillis(); - long trialTime = 0; + final int size; + + int read = 0; - do + boolean closed = false; + + public GeneratorInputStream( int size ) { - if ( lines.contains( testLine ) ) + this.size = size; + } + + public int read() + throws IOException + { + if ( read < size ) { - return true; + read++; + return '\n'; } - - //Sleep a bit. - try + else { - Thread.sleep( 10 ); + return -1; } - catch ( InterruptedException e ) + } + + public void close() + throws IOException + { + closed = true; + } + + } + + static class FailingConsumer + implements StreamConsumer + { + + public void consumeLine( String line ) + { + throw new NullPointerException( "too bad, the consumer is badly implemented..." ); + } + + } + + /** + * Used by the test to track whether a line actually got consumed or not. + */ + static class TestConsumer + implements StreamConsumer + { + + private List lines = new ArrayList(); + + /** + * Checks to see if this consumer consumed a particular line. This method will wait up to timeout number of + * milliseconds for the line to get consumed. + * + * @param testLine Line to test for. + * @param timeout Number of milliseconds to wait for the line. + * @return true if the line gets consumed, else false. + */ + public boolean wasLineConsumed( String testLine, long timeout ) + { + + long start = System.currentTimeMillis(); + long trialTime = 0; + + do { - //ignoring... + if ( lines.contains( testLine ) ) + { + return true; + } + + // Sleep a bit. + try + { + Thread.sleep( 10 ); + } + catch ( InterruptedException e ) + { + // ignoring... + } + + // How long have been waiting for the line? + trialTime = System.currentTimeMillis() - start; + } + while ( trialTime < timeout ); - //How long have been waiting for the line? - trialTime = System.currentTimeMillis() - start; + // If we got here, then the line wasn't consumed within the timeout + return false; + } + public void consumeLine( String line ) + { + lines.add( line ); } - while ( trialTime < timeout ); + } - //If we got here, then the line wasn't consume within the timeout - return false; + /** + *

                    testEnabled.

                    + */ + @Test + public void testEnabled() + { + ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( "AB\nCE\nEF".getBytes() ); + TestConsumer streamConsumer = new TestConsumer(); + StreamPumper streamPumper = new StreamPumper( byteArrayInputStream, streamConsumer ); + streamPumper.run(); + assertEquals( 3, streamConsumer.lines.size() ); } - public void consumeLine( String line ) + /** + *

                    testDisabled.

                    + */ + @Test + public void testDisabled() { - lines.add( line ); + ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( "AB\nCE\nEF".getBytes() ); + TestConsumer streamConsumer = new TestConsumer(); + StreamPumper streamPumper = new StreamPumper( byteArrayInputStream, streamConsumer ); + streamPumper.disable(); + streamPumper.run(); + assertEquals( 0, streamConsumer.lines.size() ); } -} \ No newline at end of file +} diff --git a/src/test/java/org/codehaus/plexus/util/cli/shell/BourneShellTest.java b/src/test/java/org/codehaus/plexus/util/cli/shell/BourneShellTest.java index 807bff5b..1480685f 100644 --- a/src/test/java/org/codehaus/plexus/util/cli/shell/BourneShellTest.java +++ b/src/test/java/org/codehaus/plexus/util/cli/shell/BourneShellTest.java @@ -1,13 +1,14 @@ package org.codehaus.plexus.util.cli.shell; + /* - * Copyright 2007 The Codehaus Foundation. + * Copyright The Codehaus Foundation. * * Licensed 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, @@ -16,23 +17,40 @@ * limitations under the License. */ -import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.util.cli.Commandline; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import java.util.Arrays; import java.util.List; -import junit.framework.TestCase; +import org.codehaus.plexus.util.StringUtils; +import org.codehaus.plexus.util.cli.Commandline; +import org.junit.Test; +/** + *

                    BourneShellTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ public class BourneShellTest - extends TestCase { + /** + *

                    newShell.

                    + * + * @return a {@link org.codehaus.plexus.util.cli.shell.Shell} object. + */ protected Shell newShell() { return new BourneShell(); } + /** + *

                    testQuoteWorkingDirectoryAndExecutable.

                    + */ + @Test public void testQuoteWorkingDirectoryAndExecutable() { Shell sh = newShell(); @@ -40,11 +58,15 @@ public void testQuoteWorkingDirectoryAndExecutable() sh.setWorkingDirectory( "/usr/local/bin" ); sh.setExecutable( "chmod" ); - String executable = StringUtils.join( sh.getShellCommandLine( new String[]{} ).iterator(), " " ); + String executable = StringUtils.join( sh.getShellCommandLine( new String[] {} ).iterator(), " " ); - assertEquals( "/bin/sh -c cd /usr/local/bin && chmod", executable ); + assertEquals( "/bin/sh -c cd '/usr/local/bin' && 'chmod'", executable ); } + /** + *

                    testQuoteWorkingDirectoryAndExecutable_WDPathWithSingleQuotes.

                    + */ + @Test public void testQuoteWorkingDirectoryAndExecutable_WDPathWithSingleQuotes() { Shell sh = newShell(); @@ -52,11 +74,15 @@ public void testQuoteWorkingDirectoryAndExecutable_WDPathWithSingleQuotes() sh.setWorkingDirectory( "/usr/local/'something else'" ); sh.setExecutable( "chmod" ); - String executable = StringUtils.join( sh.getShellCommandLine( new String[]{} ).iterator(), " " ); + String executable = StringUtils.join( sh.getShellCommandLine( new String[] {} ).iterator(), " " ); - assertEquals( "/bin/sh -c cd \"/usr/local/\'something else\'\" && chmod", executable ); + assertEquals( "/bin/sh -c cd '/usr/local/'\"'\"'something else'\"'\"'' && 'chmod'", executable ); } + /** + *

                    testQuoteWorkingDirectoryAndExecutable_WDPathWithSingleQuotes_BackslashFileSep.

                    + */ + @Test public void testQuoteWorkingDirectoryAndExecutable_WDPathWithSingleQuotes_BackslashFileSep() { Shell sh = newShell(); @@ -64,11 +90,15 @@ public void testQuoteWorkingDirectoryAndExecutable_WDPathWithSingleQuotes_Backsl sh.setWorkingDirectory( "\\usr\\local\\'something else'" ); sh.setExecutable( "chmod" ); - String executable = StringUtils.join( sh.getShellCommandLine( new String[]{} ).iterator(), " " ); + String executable = StringUtils.join( sh.getShellCommandLine( new String[] {} ).iterator(), " " ); - assertEquals( "/bin/sh -c cd \"\\usr\\local\\\'something else\'\" && chmod", executable ); + assertEquals( "/bin/sh -c cd '\\usr\\local\\\'\"'\"'something else'\"'\"'' && 'chmod'", executable ); } + /** + *

                    testPreserveSingleQuotesOnArgument.

                    + */ + @Test public void testPreserveSingleQuotesOnArgument() { Shell sh = newShell(); @@ -78,13 +108,17 @@ public void testPreserveSingleQuotesOnArgument() String[] args = { "\'some arg with spaces\'" }; - List shellCommandLine = sh.getShellCommandLine( args ); + List shellCommandLine = sh.getShellCommandLine( args ); String cli = StringUtils.join( shellCommandLine.iterator(), " " ); System.out.println( cli ); - assertTrue( cli.endsWith( args[0] ) ); + assertTrue( cli.endsWith( "''\"'\"'some arg with spaces'\"'\"''" ) ); } + /** + *

                    testAddSingleQuotesOnArgumentWithSpaces.

                    + */ + @Test public void testAddSingleQuotesOnArgumentWithSpaces() { Shell sh = newShell(); @@ -94,16 +128,41 @@ public void testAddSingleQuotesOnArgumentWithSpaces() String[] args = { "some arg with spaces" }; - List shellCommandLine = sh.getShellCommandLine( args ); + List shellCommandLine = sh.getShellCommandLine( args ); String cli = StringUtils.join( shellCommandLine.iterator(), " " ); System.out.println( cli ); assertTrue( cli.endsWith( "\'" + args[0] + "\'" ) ); } - + + /** + *

                    testEscapeSingleQuotesOnArgument.

                    + */ + @Test + public void testEscapeSingleQuotesOnArgument() + { + Shell sh = newShell(); + + sh.setWorkingDirectory( "/usr/bin" ); + sh.setExecutable( "chmod" ); + + String[] args = { "arg'withquote" }; + + List shellCommandLine = sh.getShellCommandLine( args ); + + String cli = StringUtils.join( shellCommandLine.iterator(), " " ); + System.out.println( cli ); + assertEquals( "cd '/usr/bin' && 'chmod' 'arg'\"'\"'withquote'", + shellCommandLine.get( shellCommandLine.size() - 1 ) ); + } + + /** + *

                    testArgumentsWithsemicolon.

                    + */ + @Test public void testArgumentsWithsemicolon() { - + System.out.println( "---- semi colon tests ----" ); Shell sh = newShell(); @@ -113,7 +172,7 @@ public void testArgumentsWithsemicolon() String[] args = { ";some&argwithunix$chars" }; - List shellCommandLine = sh.getShellCommandLine( args ); + List shellCommandLine = sh.getShellCommandLine( args ); String cli = StringUtils.join( shellCommandLine.iterator(), " " ); System.out.println( cli ); @@ -130,7 +189,7 @@ public void testArgumentsWithsemicolon() assertEquals( "/bin/sh", lines[0] ); assertEquals( "-c", lines[1] ); - assertEquals( "chmod --password ';password'", lines[2] ); + assertEquals( "'chmod' '--password' ';password'", lines[2] ); commandline = new Commandline( newShell() ); commandline.setExecutable( "chmod" ); @@ -142,7 +201,7 @@ public void testArgumentsWithsemicolon() assertEquals( "/bin/sh", lines[0] ); assertEquals( "-c", lines[1] ); - assertEquals( "chmod --password ';password'", lines[2] ); + assertEquals( "'chmod' '--password' ';password'", lines[2] ); commandline = new Commandline( new CmdShell() ); commandline.getShell().setQuotedArgumentsEnabled( true ); @@ -156,7 +215,13 @@ public void testArgumentsWithsemicolon() assertEquals( "/C", lines[2] ); assertEquals( "\"--password ;password\"", lines[3] ); } - + + /** + *

                    testBourneShellQuotingCharacters.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testBourneShellQuotingCharacters() throws Exception { @@ -190,7 +255,7 @@ public void testBourneShellQuotingCharacters() assertEquals( "/bin/sh", lines[0] ); assertEquals( "-c", lines[1] ); - assertEquals( "chmod ' ' '|' '&&' '||' ';' ';;' '&' '()' '<' '<<' '>' '>>' '*' '?' '[' ']' '{' '}' '`'", + assertEquals( "'chmod' ' ' '|' '&&' '||' ';' ';;' '&' '()' '<' '<<' '>' '>>' '*' '?' '[' ']' '{' '}' '`'", lines[2] ); } diff --git a/src/test/java/org/codehaus/plexus/util/dag/CycleDetectedExceptionTest.java b/src/test/java/org/codehaus/plexus/util/dag/CycleDetectedExceptionTest.java index 46942fb3..5c67eb3f 100644 --- a/src/test/java/org/codehaus/plexus/util/dag/CycleDetectedExceptionTest.java +++ b/src/test/java/org/codehaus/plexus/util/dag/CycleDetectedExceptionTest.java @@ -16,21 +16,29 @@ * limitations under the License. */ -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; import java.util.ArrayList; import java.util.List; +import org.junit.Test; + /** + *

                    CycleDetectedExceptionTest class.

                    + * * @author Jason van Zyl - * @version $Id$ + * @version $Id: $Id + * @since 3.4.0 */ public class CycleDetectedExceptionTest - extends TestCase { + /** + *

                    testException.

                    + */ + @Test public void testException() { - final List cycle = new ArrayList(); + final List cycle = new ArrayList(); cycle.add( "a" ); diff --git a/src/test/java/org/codehaus/plexus/util/dag/CycleDetectorTest.java b/src/test/java/org/codehaus/plexus/util/dag/CycleDetectorTest.java index 7caaf933..76a9c1ff 100644 --- a/src/test/java/org/codehaus/plexus/util/dag/CycleDetectorTest.java +++ b/src/test/java/org/codehaus/plexus/util/dag/CycleDetectorTest.java @@ -16,17 +16,30 @@ * limitations under the License. */ -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import java.util.List; +import org.junit.Test; + /** + *

                    CycleDetectorTest class.

                    + * * @author Michal Maczka - * @version $Id$ + * @version $Id: $Id + * @since 3.4.0 */ -public class CycleDetectorTest extends TestCase +public class CycleDetectorTest { + /** + *

                    testCycyleDetection.

                    + */ + @Test public void testCycyleDetection() { // No cycle @@ -49,10 +62,10 @@ public void testCycyleDetection() } // - // a --> b --->c - // ^ | - // | | - // -----------| + // a --> b --->c + // ^ | + // | | + // -----------| try { @@ -70,7 +83,7 @@ public void testCycyleDetection() catch ( CycleDetectedException e ) { - final List cycle = e.getCycle(); + final List cycle = e.getCycle(); assertNotNull( "Cycle should be not null", cycle ); @@ -82,10 +95,10 @@ public void testCycyleDetection() } - // | --> c - // a --> b - // | | --> d - // ---------> + // | --> c + // a --> b + // | | --> d + // ---------> try { final DAG dag3 = new DAG(); @@ -104,12 +117,12 @@ public void testCycyleDetection() fail( "Cycle should not be detected" ); } - // ------------ - // | | - // V | --> c - // a --> b - // | | --> d - // ---------> + // ------------ + // | | + // V | --> c + // a --> b + // | | --> d + // ---------> try { final DAG dag4 = new DAG(); @@ -129,27 +142,26 @@ public void testCycyleDetection() } catch ( CycleDetectedException e ) { - final List cycle = e.getCycle(); + final List cycle = e.getCycle(); assertNotNull( "Cycle should be not null", cycle ); - assertEquals( "Cycle contains 'a'", "a", ( String ) cycle.get( 0 ) ); + assertEquals( "Cycle contains 'a'", "a", (String) cycle.get( 0 ) ); assertEquals( "Cycle contains 'b'", "b", cycle.get( 1 ) ); assertEquals( "Cycle contains 'c'", "c", cycle.get( 2 ) ); - assertEquals( "Cycle contains 'a'", "a", ( String ) cycle.get( 3 ) ); + assertEquals( "Cycle contains 'a'", "a", (String) cycle.get( 3 ) ); } - - // f --> g --> h - // | - // | - // a --> b ---> c --> d - // ^ | - // | V - // ------------ e + // f --> g --> h + // | + // | + // a --> b ---> c --> d + // ^ | + // | V + // ------------ e final DAG dag5 = new DAG(); @@ -177,40 +189,39 @@ public void testCycyleDetection() } catch ( CycleDetectedException e ) { - final List cycle = e.getCycle(); + final List cycle = e.getCycle(); assertNotNull( "Cycle should be not null", cycle ); assertEquals( "Cycle contains 5 elements", 5, cycle.size() ); - assertEquals( "Cycle contains 'b'", "b", ( String ) cycle.get( 0 ) ); + assertEquals( "Cycle contains 'b'", "b", (String) cycle.get( 0 ) ); assertEquals( "Cycle contains 'c'", "c", cycle.get( 1 ) ); assertEquals( "Cycle contains 'd'", "d", cycle.get( 2 ) ); - assertEquals( "Cycle contains 'e'", "e", ( String ) cycle.get( 3 ) ); + assertEquals( "Cycle contains 'e'", "e", (String) cycle.get( 3 ) ); - assertEquals( "Cycle contains 'b'", "b", ( String ) cycle.get( 4 ) ); + assertEquals( "Cycle contains 'b'", "b", (String) cycle.get( 4 ) ); - assertTrue( "Edge exixst", dag5.hasEdge( "a", "b" ) ); + assertTrue( "Edge exists", dag5.hasEdge( "a", "b" ) ); - assertTrue( "Edge exixst", dag5.hasEdge( "b", "c" ) ); + assertTrue( "Edge exists", dag5.hasEdge( "b", "c" ) ); - assertTrue( "Edge exixst", dag5.hasEdge( "b", "f" ) ); + assertTrue( "Edge exists", dag5.hasEdge( "b", "f" ) ); - assertTrue( "Edge exixst", dag5.hasEdge( "f", "g" ) ); + assertTrue( "Edge exists", dag5.hasEdge( "f", "g" ) ); - assertTrue( "Edge exixst", dag5.hasEdge( "g", "h" ) ); + assertTrue( "Edge exists", dag5.hasEdge( "g", "h" ) ); - assertTrue( "Edge exixst", dag5.hasEdge( "c", "d" ) ); + assertTrue( "Edge exists", dag5.hasEdge( "c", "d" ) ); - assertTrue( "Edge exixst", dag5.hasEdge( "d", "e" ) ); + assertTrue( "Edge exists", dag5.hasEdge( "d", "e" ) ); assertFalse( dag5.hasEdge( "e", "b" ) ); } } - } diff --git a/src/test/java/org/codehaus/plexus/util/dag/DAGTest.java b/src/test/java/org/codehaus/plexus/util/dag/DAGTest.java index 50c1e50f..bf0063eb 100644 --- a/src/test/java/org/codehaus/plexus/util/dag/DAGTest.java +++ b/src/test/java/org/codehaus/plexus/util/dag/DAGTest.java @@ -16,19 +16,31 @@ * limitations under the License. */ -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.List; import java.util.Set; +import org.junit.Test; + /** + *

                    DAGTest class.

                    + * * @author Michal Maczka - * @version $Id$ + * @version $Id: $Id + * @since 3.4.0 */ public class DAGTest - extends TestCase { + /** + *

                    testDAG.

                    + * + * @throws org.codehaus.plexus.util.dag.CycleDetectedException if any. + */ + @Test public void testDAG() throws CycleDetectedException { @@ -36,19 +48,19 @@ public void testDAG() dag.addVertex( "a" ); - assertEquals( 1, dag.getVerticies().size() ); + assertEquals( 1, dag.getVertices().size() ); assertEquals( "a", dag.getVertex( "a" ).getLabel() ); dag.addVertex( "a" ); - assertEquals( 1, dag.getVerticies().size() ); + assertEquals( 1, dag.getVertices().size() ); assertEquals( "a", dag.getVertex( "a" ).getLabel() ); dag.addVertex( "b" ); - assertEquals( 2, dag.getVerticies().size() ); + assertEquals( 2, dag.getVertices().size() ); assertFalse( dag.hasEdge( "a", "b" ) ); @@ -74,7 +86,7 @@ public void testDAG() dag.addEdge( "c", "d" ); - assertEquals( 4, dag.getVerticies().size() ); + assertEquals( 4, dag.getVertices().size() ); final Vertex c = dag.getVertex( "c" ); @@ -98,7 +110,7 @@ public void testDAG() assertFalse( dag.hasEdge( "d", "c" ) ); - final Set labels = dag.getLabels(); + final Set labels = dag.getLabels(); assertEquals( 4, labels.size() ); @@ -131,8 +143,13 @@ public void testDAG() assertTrue( d.getParentLabels().contains( "c" ) ); } - - public void testGetPredessors() + /** + *

                    testGetPredecessors.

                    + * + * @throws org.codehaus.plexus.util.dag.CycleDetectedException if any. + */ + @Test + public void testGetPredecessors() throws CycleDetectedException { final DAG dag = new DAG(); @@ -140,13 +157,13 @@ public void testGetPredessors() dag.addEdge( "a", "b" ); // - // a --> b --> c --> e - // | | | - // | V V - // --> d <-- f --> g + // a --> b --> c --> e + // | | | + // | V V + // --> d <-- f --> g // result d, g, f, c, b, a - //force order of nodes + // force order of nodes dag.addVertex( "c" ); @@ -168,9 +185,9 @@ public void testGetPredessors() dag.addEdge( "f", "g" ); - final List actual = dag.getSuccessorLabels( "b" ); + final List actual = dag.getSuccessorLabels( "b" ); - final List expected = new ArrayList(); + final List expected = new ArrayList(); expected.add( "d" ); diff --git a/src/test/java/org/codehaus/plexus/util/dag/TopologicalSorterTest.java b/src/test/java/org/codehaus/plexus/util/dag/TopologicalSorterTest.java index 67a45722..25ea5b54 100644 --- a/src/test/java/org/codehaus/plexus/util/dag/TopologicalSorterTest.java +++ b/src/test/java/org/codehaus/plexus/util/dag/TopologicalSorterTest.java @@ -16,18 +16,28 @@ * limitations under the License. */ -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; import java.util.ArrayList; import java.util.List; +import org.junit.Test; + /** + *

                    TopologicalSorterTest class.

                    + * * @author Michal Maczka - * @version $Id$ + * @version $Id: $Id + * @since 3.4.0 */ public class TopologicalSorterTest - extends TestCase { + /** + *

                    testDfs.

                    + * + * @throws org.codehaus.plexus.util.dag.CycleDetectedException if any. + */ + @Test public void testDfs() throws CycleDetectedException { @@ -40,7 +50,7 @@ public void testDfs() dag1.addEdge( "b", "c" ); - final List expected1 = new ArrayList(); + final List expected1 = new ArrayList(); expected1.add( "c" ); @@ -48,12 +58,12 @@ public void testDfs() expected1.add( "a" ); - final List actual1 = TopologicalSorter.sort( dag1 ); + final List actual1 = TopologicalSorter.sort( dag1 ); assertEquals( "Order is different then expected", expected1, actual1 ); // - // a <-- b <---c + // a <-- b <---c // // result c, b, a final DAG dag2 = new DAG(); @@ -68,7 +78,7 @@ public void testDfs() dag2.addEdge( "c", "b" ); - final List expected2 = new ArrayList(); + final List expected2 = new ArrayList(); expected2.add( "a" ); @@ -76,15 +86,15 @@ public void testDfs() expected2.add( "c" ); - final List actual2 = TopologicalSorter.sort( dag2 ); + final List actual2 = TopologicalSorter.sort( dag2 ); assertEquals( "Order is different then expected", expected2, actual2 ); // - // a --> b --> c --> e - // | | | - // | V V - // --> d <-- f --> g + // a --> b --> c --> e + // | | | + // | V V + // --> d <-- f --> g // result d, g, f, c, b, a final DAG dag3 = new DAG(); @@ -117,7 +127,7 @@ public void testDfs() dag3.addEdge( "f", "g" ); - final List expected3 = new ArrayList(); + final List expected3 = new ArrayList(); expected3.add( "d" ); @@ -133,15 +143,15 @@ public void testDfs() expected3.add( "a" ); - final List actual3 = TopologicalSorter.sort( dag3 ); + final List actual3 = TopologicalSorter.sort( dag3 ); assertEquals( "Order is different then expected", expected3, actual3 ); // - // a --> b --> c --> e - // | | | - // | V V - // --> d <-- f + // a --> b --> c --> e + // | | | + // | V V + // --> d <-- f // result d, f, e, c, b, a final DAG dag4 = new DAG(); // force order of nodes in the graph @@ -172,7 +182,7 @@ public void testDfs() dag4.addEdge( "e", "f" ); - final List expected4 = new ArrayList(); + final List expected4 = new ArrayList(); expected4.add( "d" ); @@ -186,7 +196,7 @@ public void testDfs() expected4.add( "a" ); - final List actual4 = TopologicalSorter.sort( dag4 ); + final List actual4 = TopologicalSorter.sort( dag4 ); assertEquals( "Order is different then expected", expected4, actual4 ); } diff --git a/src/test/java/org/codehaus/plexus/util/dag/VertexTest.java b/src/test/java/org/codehaus/plexus/util/dag/VertexTest.java index 934bbb16..db49acd2 100644 --- a/src/test/java/org/codehaus/plexus/util/dag/VertexTest.java +++ b/src/test/java/org/codehaus/plexus/util/dag/VertexTest.java @@ -16,14 +16,23 @@ * limitations under the License. */ -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; + +import org.junit.Test; /** + *

                    VertexTest class.

                    + * * @author Michal Maczka - * @version $Id$ + * @version $Id: $Id + * @since 3.4.0 */ -public class VertexTest extends TestCase +public class VertexTest { + /** + *

                    testVertex.

                    + */ + @Test public void testVertex() { diff --git a/src/test/java/org/codehaus/plexus/util/interpolation/InterpolatorFilterReaderTest.java b/src/test/java/org/codehaus/plexus/util/interpolation/InterpolatorFilterReaderTest.java deleted file mode 100644 index 1cd34d52..00000000 --- a/src/test/java/org/codehaus/plexus/util/interpolation/InterpolatorFilterReaderTest.java +++ /dev/null @@ -1,127 +0,0 @@ -package org.codehaus.plexus.util.interpolation; - -/* - * Copyright The Codehaus Foundation. - * - * Licensed 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. - */ - -import java.io.StringReader; -import java.util.HashMap; -import java.util.Map; - -import junit.framework.TestCase; - -import org.codehaus.plexus.util.IOUtil; - -/** - * InterpolatorFilterReaderTest, heavily based on InterpolationFilterReaderTest. Heh, - * even the test strings remained the same! - * - * @author cstamas - * - */ -public class InterpolatorFilterReaderTest - extends TestCase -{ - /* - * Added and commented by jdcasey@03-Feb-2005 because it is a bug in the - * InterpolationFilterReader. - * kenneyw@15-04-2005 fixed the bug. - */ - public void testShouldNotInterpolateExpressionAtEndOfDataWithInvalidEndToken() - throws Exception - { - Map m = new HashMap(); - m.put( "test", "TestValue" ); - - String testStr = "This is a ${test"; - - assertEquals( "This is a ${test", interpolate( testStr, m ) ); - } - - /* - * kenneyw@14-04-2005 Added test to check above fix. - */ - public void testShouldNotInterpolateExpressionWithMissingEndToken() - throws Exception - { - Map m = new HashMap(); - m.put( "test", "TestValue" ); - - String testStr = "This is a ${test, really"; - - assertEquals( "This is a ${test, really", interpolate( testStr, m ) ); - } - - public void testShouldNotInterpolateWithMalformedStartToken() - throws Exception - { - Map m = new HashMap(); - m.put( "test", "testValue" ); - - String foo = "This is a $!test} again"; - - assertEquals( "This is a $!test} again", interpolate( foo, m ) ); - } - - public void testShouldNotInterpolateWithMalformedEndToken() - throws Exception - { - Map m = new HashMap(); - m.put( "test", "testValue" ); - - String foo = "This is a ${test!} again"; - - assertEquals( "This is a ${test!} again", interpolate( foo, m ) ); - } - - public void testDefaultInterpolationWithNonInterpolatedValueAtEnd() - throws Exception - { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); - - String foo = "${name} is an ${noun}. ${not.interpolated}"; - - assertEquals( "jason is an asshole. ${not.interpolated}", interpolate( foo, m ) ); - } - - public void testDefaultInterpolationWithInterpolatedValueAtEnd() - throws Exception - { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); - - String foo = "${name} is an ${noun}"; - - assertEquals( "jason is an asshole", interpolate( foo, m ) ); - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private String interpolate( String input, Map context ) - throws Exception - { - Interpolator interpolator = new RegexBasedInterpolator(); - - interpolator.addValueSource( new MapBasedValueSource(context) ); - - return IOUtil.toString( new InterpolatorFilterReader( new StringReader( input ), interpolator ) ); - } - -} diff --git a/src/test/java/org/codehaus/plexus/util/interpolation/RegexBasedInterpolatorTest.java b/src/test/java/org/codehaus/plexus/util/interpolation/RegexBasedInterpolatorTest.java deleted file mode 100644 index 6084ba9f..00000000 --- a/src/test/java/org/codehaus/plexus/util/interpolation/RegexBasedInterpolatorTest.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.codehaus.plexus.util.interpolation; - -/* - * Copyright The Codehaus Foundation. - * - * Licensed 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. - */ - -import org.codehaus.plexus.interpolation.InterpolationException; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -import junit.framework.TestCase; - - -public class RegexBasedInterpolatorTest - extends TestCase -{ - - public String getVar() - { - return "testVar"; - } - - public void testShouldResolveByMy_getVar_Method() - throws InterpolationException - { - RegexBasedInterpolator rbi = new RegexBasedInterpolator(); - rbi.addValueSource( new ObjectBasedValueSource( this ) ); - String result = rbi.interpolate( "this is a ${this.var}", "this" ); - - assertEquals( "this is a testVar", result ); - } - - public void testShouldResolveByContextValue() - throws InterpolationException - { - RegexBasedInterpolator rbi = new RegexBasedInterpolator(); - - Map context = new HashMap(); - context.put( "var", "testVar" ); - - rbi.addValueSource( new MapBasedValueSource( context ) ); - - String result = rbi.interpolate( "this is a ${this.var}", "this" ); - - assertEquals( "this is a testVar", result ); - } - - public void testShouldResolveByEnvar() - throws IOException, InterpolationException - { - RegexBasedInterpolator rbi = new RegexBasedInterpolator(); - - rbi.addValueSource( new EnvarBasedValueSource() ); - - String result = rbi.interpolate( "this is a ${env.HOME}", "this" ); - - assertFalse( "this is a ${HOME}".equals( result ) ); - } - - public void testUseAlternateRegex() - throws Exception - { - RegexBasedInterpolator rbi = new RegexBasedInterpolator("\\@\\{(", ")?([^}]+)\\}@"); - - Map context = new HashMap(); - context.put( "var", "testVar" ); - - rbi.addValueSource( new MapBasedValueSource( context ) ); - - String result = rbi.interpolate( "this is a @{this.var}@", "this" ); - - assertEquals( "this is a testVar", result ); - } -} diff --git a/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java b/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java index d09bce95..c6f23e2a 100644 --- a/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java +++ b/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java @@ -1,5 +1,6 @@ package org.codehaus.plexus.util.introspection; + /* * Copyright The Codehaus Foundation. * @@ -16,33 +17,44 @@ * limitations under the License. */ -import junit.framework.Assert; -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import java.util.ArrayList; import java.util.HashMap; -import java.util.Iterator; import java.util.List; -import java.util.ArrayList; import java.util.Map; +import org.apache.maven.plugin.testing.stubs.MavenProjectStub; +import org.junit.Before; +import org.junit.Test; + /** + *

                    ReflectionValueExtractorTest class.

                    + * * @author Jason van Zyl - * @version $Id$ + * @version $Id: $Id + * @since 3.4.0 */ public class ReflectionValueExtractorTest - extends TestCase { private Project project; - protected void setUp() + /** + *

                    setUp.

                    + * + * @throws java.lang.Exception if any. + */ + @Before + public void setUp() throws Exception { - super.setUp(); - Dependency dependency1 = new Dependency(); - dependency1.setArtifactId("dep1"); + dependency1.setArtifactId( "dep1" ); Dependency dependency2 = new Dependency(); - dependency2.setArtifactId("dep2"); + dependency2.setArtifactId( "dep2" ); project = new Project(); project.setModelVersion( "4.0.0" ); @@ -55,8 +67,19 @@ protected void setUp() project.addDependency( dependency1 ); project.addDependency( dependency2 ); project.setBuild( new Build() ); + + // Build up an artifactMap + project.addArtifact( new Artifact( "g0", "a0", "v0", "e0", "c0" ) ); + project.addArtifact( new Artifact( "g1", "a1", "v1", "e1", "c1" ) ); + project.addArtifact( new Artifact( "g2", "a2", "v2", "e2", "c2" ) ); } + /** + *

                    testValueExtraction.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testValueExtraction() throws Exception { @@ -86,48 +109,49 @@ public void testValueExtraction() List dependencies = (List) ReflectionValueExtractor.evaluate( "project.dependencies", project ); - Assert.assertNotNull( dependencies ); + assertNotNull( dependencies ); - Assert.assertEquals( 2, dependencies.size() ); + assertEquals( 2, dependencies.size() ); // ---------------------------------------------------------------------- // Dependencies - using index notation // ---------------------------------------------------------------------- // List - Dependency dependency = (Dependency)ReflectionValueExtractor.evaluate( "project.dependencies[0]", project ); + Dependency dependency = (Dependency) ReflectionValueExtractor.evaluate( "project.dependencies[0]", project ); - Assert.assertNotNull( dependency ); + assertNotNull( dependency ); - Assert.assertTrue( "dep1".equals(dependency.getArtifactId()) ); + assertTrue( "dep1".equals( dependency.getArtifactId() ) ); - String artifactId = (String)ReflectionValueExtractor.evaluate( "project.dependencies[1].artifactId", project ); + String artifactId = (String) ReflectionValueExtractor.evaluate( "project.dependencies[1].artifactId", project ); - Assert.assertTrue( "dep2".equals(artifactId) ); + assertTrue( "dep2".equals( artifactId ) ); // Array - dependency = (Dependency)ReflectionValueExtractor.evaluate( "project.dependenciesAsArray[0]", project ); + dependency = (Dependency) ReflectionValueExtractor.evaluate( "project.dependenciesAsArray[0]", project ); - Assert.assertNotNull( dependency ); + assertNotNull( dependency ); - Assert.assertTrue( "dep1".equals(dependency.getArtifactId()) ); + assertTrue( "dep1".equals( dependency.getArtifactId() ) ); - artifactId = (String)ReflectionValueExtractor.evaluate( "project.dependenciesAsArray[1].artifactId", project ); + artifactId = (String) ReflectionValueExtractor.evaluate( "project.dependenciesAsArray[1].artifactId", project ); - Assert.assertTrue( "dep2".equals(artifactId) ); + assertTrue( "dep2".equals( artifactId ) ); // Map - dependency = (Dependency)ReflectionValueExtractor.evaluate( "project.dependenciesAsMap(dep1)", project ); + dependency = (Dependency) ReflectionValueExtractor.evaluate( "project.dependenciesAsMap(dep1)", project ); - Assert.assertNotNull( dependency ); + assertNotNull( dependency ); - Assert.assertTrue( "dep1".equals(dependency.getArtifactId()) ); + assertTrue( "dep1".equals( dependency.getArtifactId() ) ); - artifactId = (String)ReflectionValueExtractor.evaluate( "project.dependenciesAsMap(dep2).artifactId", project ); + artifactId = + (String) ReflectionValueExtractor.evaluate( "project.dependenciesAsMap(dep2).artifactId", project ); - Assert.assertTrue( "dep2".equals(artifactId) ); + assertTrue( "dep2".equals( artifactId ) ); // ---------------------------------------------------------------------- // Build @@ -135,15 +159,288 @@ public void testValueExtraction() Build build = (Build) ReflectionValueExtractor.evaluate( "project.build", project ); - Assert.assertNotNull( build ); + assertNotNull( build ); } + /** + *

                    testValueExtractorWithAInvalidExpression.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testValueExtractorWithAInvalidExpression() throws Exception { - Assert.assertNull( ReflectionValueExtractor.evaluate( "project.foo", project ) ); - Assert.assertNull( ReflectionValueExtractor.evaluate( "project.dependencies[10]", project ) ); - Assert.assertNull( ReflectionValueExtractor.evaluate( "project.dependencies[0].foo", project ) ); + assertNull( ReflectionValueExtractor.evaluate( "project.foo", project ) ); + assertNull( ReflectionValueExtractor.evaluate( "project.dependencies[10]", project ) ); + assertNull( ReflectionValueExtractor.evaluate( "project.dependencies[0].foo", project ) ); + } + + /** + *

                    testMappedDottedKey.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testMappedDottedKey() + throws Exception + { + Map map = new HashMap(); + map.put( "a.b", "a.b-value" ); + + assertEquals( "a.b-value", ReflectionValueExtractor.evaluate( "h.value(a.b)", new ValueHolder( map ) ) ); + } + + /** + *

                    testIndexedMapped.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testIndexedMapped() + throws Exception + { + Map map = new HashMap(); + map.put( "a", "a-value" ); + List list = new ArrayList(); + list.add( map ); + + assertEquals( "a-value", ReflectionValueExtractor.evaluate( "h.value[0](a)", new ValueHolder( list ) ) ); + } + + /** + *

                    testMappedIndexed.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testMappedIndexed() + throws Exception + { + List list = new ArrayList(); + list.add( "a-value" ); + Map map = new HashMap(); + map.put( "a", list ); + assertEquals( "a-value", ReflectionValueExtractor.evaluate( "h.value(a)[0]", new ValueHolder( map ) ) ); + } + + /** + *

                    testMappedMissingDot.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testMappedMissingDot() + throws Exception + { + Map map = new HashMap(); + map.put( "a", new ValueHolder( "a-value" ) ); + assertNull( ReflectionValueExtractor.evaluate( "h.value(a)value", new ValueHolder( map ) ) ); + } + + /** + *

                    testIndexedMissingDot.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testIndexedMissingDot() + throws Exception + { + List list = new ArrayList(); + list.add( new ValueHolder( "a-value" ) ); + assertNull( ReflectionValueExtractor.evaluate( "h.value[0]value", new ValueHolder( list ) ) ); + } + + /** + *

                    testDotDot.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testDotDot() + throws Exception + { + assertNull( ReflectionValueExtractor.evaluate( "h..value", new ValueHolder( "value" ) ) ); + } + + /** + *

                    testBadIndexedSyntax.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testBadIndexedSyntax() + throws Exception + { + List list = new ArrayList(); + list.add( "a-value" ); + Object value = new ValueHolder( list ); + + assertNull( ReflectionValueExtractor.evaluate( "h.value[", value ) ); + assertNull( ReflectionValueExtractor.evaluate( "h.value[]", value ) ); + assertNull( ReflectionValueExtractor.evaluate( "h.value[a]", value ) ); + assertNull( ReflectionValueExtractor.evaluate( "h.value[0", value ) ); + assertNull( ReflectionValueExtractor.evaluate( "h.value[0)", value ) ); + assertNull( ReflectionValueExtractor.evaluate( "h.value[-1]", value ) ); + } + + /** + *

                    testBadMappedSyntax.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testBadMappedSyntax() + throws Exception + { + Map map = new HashMap(); + map.put( "a", "a-value" ); + Object value = new ValueHolder( map ); + + assertNull( ReflectionValueExtractor.evaluate( "h.value(", value ) ); + assertNull( ReflectionValueExtractor.evaluate( "h.value()", value ) ); + assertNull( ReflectionValueExtractor.evaluate( "h.value(a", value ) ); + assertNull( ReflectionValueExtractor.evaluate( "h.value(a]", value ) ); + } + + /** + *

                    testIllegalIndexedType.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testIllegalIndexedType() + throws Exception + { + try + { + ReflectionValueExtractor.evaluate( "h.value[1]", new ValueHolder( "string" ) ); + } + catch ( Exception e ) + { + // TODO assert exception message + } + } + + /** + *

                    testIllegalMappedType.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testIllegalMappedType() + throws Exception + { + try + { + ReflectionValueExtractor.evaluate( "h.value(key)", new ValueHolder( "string" ) ); + } + catch ( Exception e ) + { + // TODO assert exception message + } + } + + /** + *

                    testTrimRootToken.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testTrimRootToken() + throws Exception + { + assertNull( ReflectionValueExtractor.evaluate( "project", project, true ) ); + } + + /** + *

                    testArtifactMap.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testArtifactMap() + throws Exception + { + assertEquals( "g0", ( (Artifact) ReflectionValueExtractor.evaluate( "project.artifactMap(g0:a0:c0)", + project ) ).getGroupId() ); + assertEquals( "a1", ( (Artifact) ReflectionValueExtractor.evaluate( "project.artifactMap(g1:a1:c1)", + project ) ).getArtifactId() ); + assertEquals( "c2", ( (Artifact) ReflectionValueExtractor.evaluate( "project.artifactMap(g2:a2:c2)", + project ) ).getClassifier() ); + } + + public static class Artifact + { + private String groupId; + + private String artifactId; + + private String version; + + private String extension; + + private String classifier; + + public Artifact( String groupId, String artifactId, String version, String extension, String classifier ) + { + this.groupId = groupId; + this.artifactId = artifactId; + this.version = version; + this.extension = extension; + this.classifier = classifier; + } + + public String getGroupId() + { + return groupId; + } + + public void setGroupId( String groupId ) + { + this.groupId = groupId; + } + + public String getArtifactId() + { + return artifactId; + } + + public void setArtifactId( String artifactId ) + { + this.artifactId = artifactId; + } + + public String getVersion() + { + return version; + } + + public void setVersion( String version ) + { + this.version = version; + } + + public String getExtension() + { + return extension; + } + + public void setExtension( String extension ) + { + this.extension = extension; + } + + public String getClassifier() + { + return classifier; + } + + public void setClassifier( String classifier ) + { + this.classifier = classifier; + } } public static class Project @@ -164,6 +461,8 @@ public static class Project private String version; + private Map artifactMap = new HashMap(); + public void setModelVersion( String modelVersion ) { this.modelVersion = modelVersion; @@ -246,19 +545,30 @@ public String getVersion() public Dependency[] getDependenciesAsArray() { - return (Dependency[]) getDependencies().toArray( new Dependency[0]); + return (Dependency[]) getDependencies().toArray( new Dependency[0] ); } public Map getDependenciesAsMap() { Map ret = new HashMap(); - for ( Iterator it = getDependencies().iterator(); it.hasNext();) + for ( Object o : getDependencies() ) { - Dependency dep = (Dependency)it.next(); + Dependency dep = (Dependency) o; ret.put( dep.getArtifactId(), dep ); } return ret; } + + // ${project.artifactMap(g:a:v)} + public void addArtifact( Artifact a ) + { + artifactMap.put( a.getGroupId() + ":" + a.getArtifactId() + ":" + a.getClassifier(), a ); + } + + public Map getArtifactMap() + { + return artifactMap; + } } public static class Build @@ -275,7 +585,7 @@ public String getArtifactId() return artifactId; } - public void setArtifactId(String id) + public void setArtifactId( String id ) { artifactId = id; } @@ -295,4 +605,34 @@ public String getConnection() return connection; } } -} \ No newline at end of file + + public static class ValueHolder + { + private final Object value; + + public ValueHolder( Object value ) + { + this.value = value; + } + + public Object getValue() + { + return value; + } + } + + /** + *

                    testRootPropertyRegression.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testRootPropertyRegression() + throws Exception + { + MavenProjectStub project = new MavenProjectStub(); + project.setDescription( "c:\\\\org\\apache\\test" ); + Object evalued = ReflectionValueExtractor.evaluate( "description", project ); + assertNotNull( evalued ); + } +} diff --git a/src/test/java/org/codehaus/plexus/util/reflection/ReflectorTest.java b/src/test/java/org/codehaus/plexus/util/reflection/ReflectorTest.java index 841800a4..d3c0db8c 100644 --- a/src/test/java/org/codehaus/plexus/util/reflection/ReflectorTest.java +++ b/src/test/java/org/codehaus/plexus/util/reflection/ReflectorTest.java @@ -16,24 +16,33 @@ * limitations under the License. */ -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; + +import org.junit.Before; +import org.junit.Test; /** + *

                    ReflectorTest class.

                    + * * @author Jörg Schaible - * @version $Id$ + * @version $Id: $Id + * @since 3.4.0 */ public class ReflectorTest - extends TestCase { private Project project; private Reflector reflector; - protected void setUp() + /** + *

                    setUp.

                    + * + * @throws java.lang.Exception if any. + */ + @Before + public void setUp() throws Exception { - super.setUp(); - project = new Project(); project.setModelVersion( "1.0.0" ); project.setVersion( "42" ); @@ -41,18 +50,36 @@ protected void setUp() reflector = new Reflector(); } + /** + *

                    testObjectPropertyFromName.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testObjectPropertyFromName() throws Exception { assertEquals( "1.0.0", reflector.getObjectProperty( project, "modelVersion" ) ); } + /** + *

                    testObjectPropertyFromBean.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testObjectPropertyFromBean() throws Exception { assertEquals( "Foo", reflector.getObjectProperty( project, "name" ) ); } + /** + *

                    testObjectPropertyFromField.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testObjectPropertyFromField() throws Exception { diff --git a/src/test/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriterTest.java b/src/test/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriterTest.java index b8a448f4..76125f95 100644 --- a/src/test/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriterTest.java +++ b/src/test/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriterTest.java @@ -1,13 +1,13 @@ package org.codehaus.plexus.util.xml; /* - * Copyright 2008 The Codehaus Foundation. + * Copyright The Codehaus Foundation. * * Licensed 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, @@ -16,42 +16,53 @@ * limitations under the License. */ +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.File; +import java.io.IOException; +import java.io.OutputStreamWriter; import java.io.StringWriter; +import java.nio.file.Files; +import java.util.NoSuchElementException; import javax.swing.text.html.HTML.Tag; import org.codehaus.plexus.util.StringUtils; - -import junit.framework.TestCase; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; /** - * Test of {@link PrettyPrintXMLWriter} + * Test of {@link org.codehaus.plexus.util.xml.PrettyPrintXMLWriter} * * @author Vincent Siveton - * @version $Id$ + * @author Gabriel Belingueres + * @version $Id: $Id + * @since 3.4.0 */ public class PrettyPrintXMLWriterTest - extends TestCase { StringWriter w; PrettyPrintXMLWriter writer; - /** {@inheritDoc} */ - protected void setUp() - throws Exception + /** + *

                    setUp.

                    + */ + @Before + public void setUp() { - super.setUp(); - initWriter(); } - /** {@inheritDoc} */ - protected void tearDown() - throws Exception + /** + *

                    tearDown.

                    + */ + @After + public void tearDown() { - super.tearDown(); - writer = null; w = null; } @@ -62,6 +73,10 @@ private void initWriter() writer = new PrettyPrintXMLWriter( w ); } + /** + *

                    testDefaultPrettyPrintXMLWriter.

                    + */ + @Test public void testDefaultPrettyPrintXMLWriter() { writer.startElement( Tag.HTML.toString() ); @@ -75,6 +90,10 @@ public void testDefaultPrettyPrintXMLWriter() assertEquals( expectedResult( PrettyPrintXMLWriter.LS ), w.toString() ); } + /** + *

                    testPrettyPrintXMLWriterWithGivenLineSeparator.

                    + */ + @Test public void testPrettyPrintXMLWriterWithGivenLineSeparator() { writer.setLineSeparator( "\n" ); @@ -90,6 +109,10 @@ public void testPrettyPrintXMLWriterWithGivenLineSeparator() assertEquals( expectedResult( "\n" ), w.toString() ); } + /** + *

                    testPrettyPrintXMLWriterWithGivenLineIndenter.

                    + */ + @Test public void testPrettyPrintXMLWriterWithGivenLineIndenter() { writer.setLineIndenter( " " ); @@ -105,6 +128,10 @@ public void testPrettyPrintXMLWriterWithGivenLineIndenter() assertEquals( expectedResult( " ", PrettyPrintXMLWriter.LS ), w.toString() ); } + /** + *

                    testEscapeXmlAttribute.

                    + */ + @Test public void testEscapeXmlAttribute() { // Windows @@ -128,6 +155,74 @@ public void testEscapeXmlAttribute() assertEquals( "
                    ", w.toString() ); } + /** + *

                    testendElementAlreadyClosed.

                    + */ + @Test + public void testendElementAlreadyClosed() + { + try + { + writer.startElement( Tag.DIV.toString() ); + writer.addAttribute( "class", "someattribute" ); + writer.endElement(); // Tag.DIV closed + writer.endElement(); // Tag.DIV already closed, and there is no other outer tag! + fail( "Should throw a NoSuchElementException" ); + } + catch ( NoSuchElementException e ) + { + assert ( true ); + } + } + + /** + * Issue #51: https://github.com/codehaus-plexus/plexus-utils/issues/51 Purpose: test if concatenation string + * optimization bug is present. Target environment: Java 7 (u79 and u80 verified) running on Windows. Detection + * strategy: Tries to build a big XML file (~750MB size) and with many nested tags to force the JVM to trigger the + * concatenation string optimization bug that throws a NoSuchElementException when calling endElement() method. + * + * @throws java.io.IOException if an I/O error occurs + */ + @Test + public void testIssue51DetectJava7ConcatenationBug() + throws IOException + { + File dir = new File( "target/test-xml" ); + if ( !dir.exists() ) + { + assertTrue( "cannot create directory test-xml", dir.mkdir() ); + } + File xmlFile = new File( dir, "test-issue-51.xml" ); + OutputStreamWriter osw = new OutputStreamWriter( Files.newOutputStream( xmlFile.toPath() ), "UTF-8" ); + writer = new PrettyPrintXMLWriter( osw ); + + int iterations = 20000; + + try + { + for ( int i = 0; i < iterations; ++i ) + { + writer.startElement( Tag.DIV.toString() + i ); + writer.addAttribute( "class", "someattribute" ); + } + for ( int i = 0; i < iterations; ++i ) + { + writer.endElement(); // closes Tag.DIV + i + } + } + catch ( NoSuchElementException e ) + { + fail( "Should not throw a NoSuchElementException" ); + } + finally + { + if ( osw != null ) + { + osw.close(); + } + } + } + private void writeXhtmlHead( XMLWriter writer ) { writer.startElement( Tag.HEAD.toString() ); @@ -167,24 +262,24 @@ private String expectedResult( String lineSeparator ) private String expectedResult( String lineIndenter, String lineSeparator ) { - StringBuffer expected = new StringBuffer(); + StringBuilder expected = new StringBuilder(); expected.append( "" ).append( lineSeparator ); expected.append( StringUtils.repeat( lineIndenter, 1 ) ).append( "" ).append( lineSeparator ); - expected.append( StringUtils.repeat( lineIndenter, 2 ) ).append( "title" ) - .append( lineSeparator ); - expected.append( StringUtils.repeat( lineIndenter, 2 ) ) - .append( "" ).append( lineSeparator ); - expected.append( StringUtils.repeat( lineIndenter, 2 ) ).append( "" ) - .append( lineSeparator ); + expected.append( StringUtils.repeat( lineIndenter, + 2 ) ).append( "title" ).append( lineSeparator ); + expected.append( StringUtils.repeat( lineIndenter, + 2 ) ).append( "" ).append( lineSeparator ); + expected.append( StringUtils.repeat( lineIndenter, + 2 ) ).append( "" ).append( lineSeparator ); expected.append( StringUtils.repeat( lineIndenter, 1 ) ).append( "" ).append( lineSeparator ); expected.append( StringUtils.repeat( lineIndenter, 1 ) ).append( "" ).append( lineSeparator ); - expected.append( StringUtils.repeat( lineIndenter, 2 ) ) - .append( "

                    Paragraph 1, line 1. Paragraph 1, line 2.

                    " ).append( lineSeparator ); - expected.append( StringUtils.repeat( lineIndenter, 2 ) ).append( "
                    " ) - .append( lineSeparator ); - expected.append( StringUtils.repeat( lineIndenter, 3 ) ).append( "

                    Section title

                    " ) - .append( lineSeparator ); + expected.append( StringUtils.repeat( lineIndenter, + 2 ) ).append( "

                    Paragraph 1, line 1. Paragraph 1, line 2.

                    " ).append( lineSeparator ); + expected.append( StringUtils.repeat( lineIndenter, + 2 ) ).append( "
                    " ).append( lineSeparator ); + expected.append( StringUtils.repeat( lineIndenter, + 3 ) ).append( "

                    Section title

                    " ).append( lineSeparator ); expected.append( StringUtils.repeat( lineIndenter, 2 ) ).append( "
                    " ).append( lineSeparator ); expected.append( StringUtils.repeat( lineIndenter, 1 ) ).append( "" ).append( lineSeparator ); expected.append( "" ); diff --git a/src/test/java/org/codehaus/plexus/util/xml/XmlStreamReaderTest.java b/src/test/java/org/codehaus/plexus/util/xml/XmlStreamReaderTest.java index b25c5816..7ca8cc48 100644 --- a/src/test/java/org/codehaus/plexus/util/xml/XmlStreamReaderTest.java +++ b/src/test/java/org/codehaus/plexus/util/xml/XmlStreamReaderTest.java @@ -26,29 +26,42 @@ import junit.framework.ComparisonFailure; import junit.framework.TestCase; +/** + *

                    XmlStreamReaderTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ public class XmlStreamReaderTest extends TestCase { /** french */ private static final String TEXT_LATIN1 = "eacute: \u00E9"; + /** greek */ private static final String TEXT_LATIN7 = "alpha: \u03B1"; + /** euro support */ private static final String TEXT_LATIN15 = "euro: \u20AC"; + /** japanese */ private static final String TEXT_EUC_JP = "hiragana A: \u3042"; + /** Unicode: support everything */ private static final String TEXT_UNICODE = - TEXT_LATIN1 + ", " + - TEXT_LATIN7 + ", " + - TEXT_LATIN15 + ", " + - TEXT_EUC_JP; + TEXT_LATIN1 + ", " + TEXT_LATIN7 + ", " + TEXT_LATIN15 + ", " + TEXT_EUC_JP; + /** see http://unicode.org/faq/utf_bom.html#BOM */ - private static final byte[] BOM_UTF8 = { (byte)0xEF, (byte)0xBB, (byte)0xBF }; - private static final byte[] BOM_UTF16BE = { (byte)0xFE, (byte)0xFF }; - private static final byte[] BOM_UTF16LE = { (byte)0xFF, (byte)0xFE }; - private static final byte[] BOM_UTF32BE = { (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0xFE }; - private static final byte[] BOM_UTF32LE = { (byte)0xFF, (byte)0xFE, (byte)0x00, (byte)0x00 }; + private static final byte[] BOM_UTF8 = { (byte) 0xEF, (byte) 0xBB, (byte) 0xBF }; + + private static final byte[] BOM_UTF16BE = { (byte) 0xFE, (byte) 0xFF }; + + private static final byte[] BOM_UTF16LE = { (byte) 0xFF, (byte) 0xFE }; + + private static final byte[] BOM_UTF32BE = { (byte) 0x00, (byte) 0x00, (byte) 0xFF, (byte) 0xFE }; + + private static final byte[] BOM_UTF32LE = { (byte) 0xFF, (byte) 0xFE, (byte) 0x00, (byte) 0x00 }; private static String createXmlContent( String text, String encoding ) { @@ -62,13 +75,13 @@ private static String createXmlContent( String text, String encoding ) } private static void checkXmlContent( String xml, String encoding ) - throws IOException + throws IOException { checkXmlContent( xml, encoding, null ); } - private static void checkXmlContent( String xml, String encoding, byte[] bom ) - throws IOException + private static void checkXmlContent( String xml, String encoding, byte... bom ) + throws IOException { byte[] xmlContent = xml.getBytes( encoding ); InputStream in = new ByteArrayInputStream( xmlContent ); @@ -85,104 +98,164 @@ private static void checkXmlContent( String xml, String encoding, byte[] bom ) } private static void checkXmlStreamReader( String text, String encoding, String effectiveEncoding ) - throws IOException + throws IOException { checkXmlStreamReader( text, encoding, effectiveEncoding, null ); } private static void checkXmlStreamReader( String text, String encoding ) - throws IOException + throws IOException { checkXmlStreamReader( text, encoding, encoding, null ); } - private static void checkXmlStreamReader( String text, String encoding, byte[] bom ) - throws IOException + private static void checkXmlStreamReader( String text, String encoding, byte... bom ) + throws IOException { checkXmlStreamReader( text, encoding, encoding, bom ); } - private static void checkXmlStreamReader( String text, String encoding, String effectiveEncoding, byte[] bom ) - throws IOException + private static void checkXmlStreamReader( String text, String encoding, String effectiveEncoding, byte... bom ) + throws IOException { String xml = createXmlContent( text, encoding ); checkXmlContent( xml, effectiveEncoding, bom ); } + /** + *

                    testNoXmlHeader.

                    + * + * @throws java.io.IOException if any. + */ public void testNoXmlHeader() - throws IOException + throws IOException { String xml = "text with no XML header"; checkXmlContent( xml, "UTF-8" ); checkXmlContent( xml, "UTF-8", BOM_UTF8 ); } + /** + *

                    testDefaultEncoding.

                    + * + * @throws java.io.IOException if any. + */ public void testDefaultEncoding() - throws IOException + throws IOException { checkXmlStreamReader( TEXT_UNICODE, null, "UTF-8" ); checkXmlStreamReader( TEXT_UNICODE, null, "UTF-8", BOM_UTF8 ); } + /** + *

                    testUTF8Encoding.

                    + * + * @throws java.io.IOException if any. + */ public void testUTF8Encoding() - throws IOException + throws IOException { checkXmlStreamReader( TEXT_UNICODE, "UTF-8" ); checkXmlStreamReader( TEXT_UNICODE, "UTF-8", BOM_UTF8 ); } + /** + *

                    testUTF16Encoding.

                    + * + * @throws java.io.IOException if any. + */ public void testUTF16Encoding() - throws IOException + throws IOException { checkXmlStreamReader( TEXT_UNICODE, "UTF-16", "UTF-16BE", null ); checkXmlStreamReader( TEXT_UNICODE, "UTF-16", "UTF-16LE", BOM_UTF16LE ); checkXmlStreamReader( TEXT_UNICODE, "UTF-16", "UTF-16BE", BOM_UTF16BE ); } + /** + *

                    testUTF16BEEncoding.

                    + * + * @throws java.io.IOException if any. + */ public void testUTF16BEEncoding() - throws IOException + throws IOException { checkXmlStreamReader( TEXT_UNICODE, "UTF-16BE" ); } + /** + *

                    testUTF16LEEncoding.

                    + * + * @throws java.io.IOException if any. + */ public void testUTF16LEEncoding() - throws IOException + throws IOException { checkXmlStreamReader( TEXT_UNICODE, "UTF-16LE" ); } + /** + *

                    testLatin1Encoding.

                    + * + * @throws java.io.IOException if any. + */ public void testLatin1Encoding() - throws IOException + throws IOException { checkXmlStreamReader( TEXT_LATIN1, "ISO-8859-1" ); } + /** + *

                    testLatin7Encoding.

                    + * + * @throws java.io.IOException if any. + */ public void testLatin7Encoding() - throws IOException + throws IOException { checkXmlStreamReader( TEXT_LATIN7, "ISO-8859-7" ); } + /** + *

                    testLatin15Encoding.

                    + * + * @throws java.io.IOException if any. + */ public void testLatin15Encoding() - throws IOException + throws IOException { checkXmlStreamReader( TEXT_LATIN15, "ISO-8859-15" ); } + /** + *

                    testEUC_JPEncoding.

                    + * + * @throws java.io.IOException if any. + */ public void testEUC_JPEncoding() - throws IOException + throws IOException { checkXmlStreamReader( TEXT_EUC_JP, "EUC-JP" ); } + /** + *

                    testEBCDICEncoding.

                    + * + * @throws java.io.IOException if any. + */ public void testEBCDICEncoding() - throws IOException + throws IOException { checkXmlStreamReader( "simple text in EBCDIC", "CP1047" ); } + /** + *

                    testInappropriateEncoding.

                    + * + * @throws java.io.IOException if any. + */ public void testInappropriateEncoding() - throws IOException + throws IOException { try { @@ -195,8 +268,13 @@ public void testInappropriateEncoding() } } + /** + *

                    testEncodingAttribute.

                    + * + * @throws java.io.IOException if any. + */ public void testEncodingAttribute() - throws IOException + throws IOException { String xml = ""; checkXmlContent( xml, "US-ASCII" ); diff --git a/src/test/java/org/codehaus/plexus/util/xml/XmlStreamWriterTest.java b/src/test/java/org/codehaus/plexus/util/xml/XmlStreamWriterTest.java index a726e1a1..fa13aaa0 100644 --- a/src/test/java/org/codehaus/plexus/util/xml/XmlStreamWriterTest.java +++ b/src/test/java/org/codehaus/plexus/util/xml/XmlStreamWriterTest.java @@ -1,5 +1,7 @@ package org.codehaus.plexus.util.xml; +import static org.junit.Assert.assertEquals; + /* * Copyright The Codehaus Foundation. * @@ -19,28 +21,32 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; -import org.codehaus.plexus.util.IOUtil; - -import junit.framework.ComparisonFailure; -import junit.framework.TestCase; +import org.junit.Test; +/** + *

                    XmlStreamWriterTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ public class XmlStreamWriterTest - extends TestCase { /** french */ private static final String TEXT_LATIN1 = "eacute: \u00E9"; + /** greek */ private static final String TEXT_LATIN7 = "alpha: \u03B1"; + /** euro support */ private static final String TEXT_LATIN15 = "euro: \u20AC"; + /** japanese */ private static final String TEXT_EUC_JP = "hiragana A: \u3042"; + /** Unicode: support everything */ private static final String TEXT_UNICODE = - TEXT_LATIN1 + ", " + - TEXT_LATIN7 + ", " + - TEXT_LATIN15 + ", " + - TEXT_EUC_JP; + TEXT_LATIN1 + ", " + TEXT_LATIN7 + ", " + TEXT_LATIN15 + ", " + TEXT_EUC_JP; private static String createXmlContent( String text, String encoding ) { @@ -54,7 +60,7 @@ private static String createXmlContent( String text, String encoding ) } private static void checkXmlContent( String xml, String encoding ) - throws IOException + throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); XmlStreamWriter writer = new XmlStreamWriter( out ); @@ -66,22 +72,34 @@ private static void checkXmlContent( String xml, String encoding ) } private static void checkXmlWriter( String text, String encoding ) - throws IOException + throws IOException { String xml = createXmlContent( text, encoding ); String effectiveEncoding = ( encoding == null ) ? "UTF-8" : encoding; checkXmlContent( xml, effectiveEncoding ); } + /** + *

                    testNoXmlHeader.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testNoXmlHeader() - throws IOException + throws IOException { String xml = "text with no XML header"; checkXmlContent( xml, "UTF-8" ); } + /** + *

                    testEmpty.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testEmpty() - throws IOException + throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); XmlStreamWriter writer = new XmlStreamWriter( out ); @@ -93,62 +111,122 @@ public void testEmpty() writer.close(); } + /** + *

                    testDefaultEncoding.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testDefaultEncoding() - throws IOException + throws IOException { checkXmlWriter( TEXT_UNICODE, null ); } + /** + *

                    testUTF8Encoding.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testUTF8Encoding() - throws IOException + throws IOException { checkXmlWriter( TEXT_UNICODE, "UTF-8" ); } + /** + *

                    testUTF16Encoding.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testUTF16Encoding() - throws IOException + throws IOException { checkXmlWriter( TEXT_UNICODE, "UTF-16" ); } + /** + *

                    testUTF16BEEncoding.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testUTF16BEEncoding() - throws IOException + throws IOException { checkXmlWriter( TEXT_UNICODE, "UTF-16BE" ); } + /** + *

                    testUTF16LEEncoding.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testUTF16LEEncoding() - throws IOException + throws IOException { checkXmlWriter( TEXT_UNICODE, "UTF-16LE" ); } + /** + *

                    testLatin1Encoding.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testLatin1Encoding() - throws IOException + throws IOException { checkXmlWriter( TEXT_LATIN1, "ISO-8859-1" ); } + /** + *

                    testLatin7Encoding.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testLatin7Encoding() - throws IOException + throws IOException { checkXmlWriter( TEXT_LATIN7, "ISO-8859-7" ); } + /** + *

                    testLatin15Encoding.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testLatin15Encoding() - throws IOException + throws IOException { checkXmlWriter( TEXT_LATIN15, "ISO-8859-15" ); } + /** + *

                    testEUC_JPEncoding.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testEUC_JPEncoding() - throws IOException + throws IOException { checkXmlWriter( TEXT_EUC_JP, "EUC-JP" ); } + /** + *

                    testEBCDICEncoding.

                    + * + * @throws java.io.IOException if any. + */ + @Test public void testEBCDICEncoding() - throws IOException + throws IOException { checkXmlWriter( "simple text in EBCDIC", "CP1047" ); } diff --git a/src/test/java/org/codehaus/plexus/util/xml/XmlUtilTest.java b/src/test/java/org/codehaus/plexus/util/xml/XmlUtilTest.java index 6788837c..4d4a083f 100644 --- a/src/test/java/org/codehaus/plexus/util/xml/XmlUtilTest.java +++ b/src/test/java/org/codehaus/plexus/util/xml/XmlUtilTest.java @@ -16,59 +16,79 @@ * limitations under the License. */ +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; +import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.Reader; import java.io.StringWriter; import java.io.Writer; - -import junit.framework.TestCase; +import java.nio.file.Files; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.WriterFactory; +import org.junit.Test; /** - * Test the {@link XmlUtil} class. + * Test the {@link org.codehaus.plexus.util.xml.XmlUtil} class. * * @author Vincent Siveton - * @version $Id$ + * @version $Id: $Id + * @since 3.4.0 */ public class XmlUtilTest - extends TestCase { - private static final File basedir = new File( new File( "" ).getAbsolutePath() ); - - /** {@inheritDoc} */ - protected void setUp() - throws Exception + private String basedir; + + /** + *

                    Getter for the field basedir.

                    + * + * @return a {@link java.lang.String} object. + */ + public final String getBasedir() { - super.setUp(); + if ( null == basedir ) + { + basedir = System.getProperty( "basedir", new File( "" ).getAbsolutePath() ); + } + return basedir; } - /** {@inheritDoc} */ - protected void tearDown() - throws Exception + private File getTestOutputFile( String relPath ) + throws IOException { - super.tearDown(); + final File file = new File( getBasedir(), relPath ); + final File parentFile = file.getParentFile(); + if ( !parentFile.isDirectory() && !parentFile.mkdirs() ) + { + throw new IOException( "Could not create test directory " + parentFile ); + } + return file; } + /** + *

                    testPrettyFormatInputStreamOutputStream.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testPrettyFormatInputStreamOutputStream() throws Exception { - File testDocument = new File( basedir, "src/test/resources/testDocument.xhtml" ); + File testDocument = new File( getBasedir(), "src/test/resources/testDocument.xhtml" ); assertTrue( testDocument.exists() ); InputStream is = null; OutputStream os = null; try { - is = new FileInputStream( testDocument ); - os = new FileOutputStream( new File( basedir, "target/test/prettyFormatTestDocumentOutputStream.xml" ) ); + is = Files.newInputStream( testDocument.toPath() ); + os = Files.newOutputStream( getTestOutputFile( "target/test/prettyFormatTestDocumentOutputStream.xml" ).toPath() ); assertNotNull( is ); assertNotNull( os ); @@ -82,10 +102,16 @@ public void testPrettyFormatInputStreamOutputStream() } } + /** + *

                    testPrettyFormatReaderWriter.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testPrettyFormatReaderWriter() throws Exception { - File testDocument = new File( basedir, "src/test/resources/testDocument.xhtml" ); + File testDocument = new File( getBasedir(), "src/test/resources/testDocument.xhtml" ); assertTrue( testDocument.exists() ); Reader reader = null; @@ -93,7 +119,8 @@ public void testPrettyFormatReaderWriter() try { reader = ReaderFactory.newXmlReader( testDocument ); - writer = WriterFactory.newXmlWriter( new File( basedir, "target/test/prettyFormatTestDocumentWriter.xml" ) ); + writer = + WriterFactory.newXmlWriter( getTestOutputFile( "target/test/prettyFormatTestDocumentWriter.xml" ) ); assertNotNull( reader ); assertNotNull( writer ); @@ -107,10 +134,16 @@ public void testPrettyFormatReaderWriter() } } + /** + *

                    testPrettyFormatString.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testPrettyFormatString() throws Exception { - File testDocument = new File( basedir, "src/test/resources/testDocument.xhtml" ); + File testDocument = new File( getBasedir(), "src/test/resources/testDocument.xhtml" ); assertTrue( testDocument.exists() ); Reader reader = null; @@ -137,10 +170,16 @@ public void testPrettyFormatString() assertTrue( countEOL < StringUtils.countMatches( writer.toString(), XmlUtil.DEFAULT_LINE_SEPARATOR ) ); } + /** + *

                    testPrettyFormatReaderWriter2.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testPrettyFormatReaderWriter2() throws Exception { - File testDocument = new File( basedir, "src/test/resources/test.xdoc.xhtml" ); + File testDocument = new File( getBasedir(), "src/test/resources/test.xdoc.xhtml" ); assertTrue( testDocument.exists() ); Reader reader = null; @@ -148,7 +187,7 @@ public void testPrettyFormatReaderWriter2() try { reader = ReaderFactory.newXmlReader( testDocument ); - writer = WriterFactory.newXmlWriter( new File( basedir, "target/test/prettyFormatTestXdocWriter.xml" ) ); + writer = WriterFactory.newXmlWriter( getTestOutputFile( "target/test/prettyFormatTestXdocWriter.xml" ) ); assertNotNull( reader ); assertNotNull( writer ); diff --git a/src/test/java/org/codehaus/plexus/util/xml/XmlWriterUtilTest.java b/src/test/java/org/codehaus/plexus/util/xml/XmlWriterUtilTest.java index b8d6d906..4c1f6954 100644 --- a/src/test/java/org/codehaus/plexus/util/xml/XmlWriterUtilTest.java +++ b/src/test/java/org/codehaus/plexus/util/xml/XmlWriterUtilTest.java @@ -1,13 +1,13 @@ package org.codehaus.plexus.util.xml; /* - * Copyright 2008 The Codehaus Foundation. + * Copyright The Codehaus Foundation. * * Licensed 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, @@ -16,21 +16,27 @@ * limitations under the License. */ +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + import java.io.ByteArrayOutputStream; import java.io.OutputStream; import java.io.Writer; -import junit.framework.TestCase; - import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.WriterFactory; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; /** + *

                    XmlWriterUtilTest class.

                    + * * @author Vincent Siveton - * @version $Id$ + * @version $Id: $Id + * @since 3.4.0 */ public class XmlWriterUtilTest - extends TestCase { private OutputStream output; @@ -38,33 +44,41 @@ public class XmlWriterUtilTest private XMLWriter xmlWriter; - /** {@inheritDoc} */ - protected void setUp() + /** + *

                    setUp.

                    + * + * @throws java.lang.Exception if any. + */ + @Before + public void setUp() throws Exception { - super.setUp(); - output = new ByteArrayOutputStream(); writer = WriterFactory.newXmlWriter( output ); xmlWriter = new PrettyPrintXMLWriter( writer ); } - /** {@inheritDoc} */ - protected void tearDown() + /** + *

                    tearDown.

                    + * + * @throws java.lang.Exception if any. + */ + @After + public void tearDown() throws Exception { - super.tearDown(); - xmlWriter = null; writer = null; output = null; } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeLineBreak(org.codehaus.plexus.util.xml.XMLWriter)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeLineBreak(org.codehaus.plexus.util.xml.XMLWriter)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteLineBreakXMLWriter() throws Exception { @@ -74,10 +88,12 @@ public void testWriteLineBreakXMLWriter() } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeLineBreak(org.codehaus.plexus.util.xml.XMLWriter, int)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeLineBreak(org.codehaus.plexus.util.xml.XMLWriter, int)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteLineBreakXMLWriterInt() throws Exception { @@ -87,25 +103,30 @@ public void testWriteLineBreakXMLWriterInt() } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeLineBreak(org.codehaus.plexus.util.xml.XMLWriter, int, int)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeLineBreak(org.codehaus.plexus.util.xml.XMLWriter, int, int)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteLineBreakXMLWriterIntInt() throws Exception { XmlWriterUtil.writeLineBreak( xmlWriter, 10, 2 ); writer.close(); assertTrue( StringUtils.countMatches( output.toString(), XmlWriterUtil.LS ) == 10 ); - assertTrue( StringUtils.countMatches( output.toString(), StringUtils - .repeat( " ", 2 * XmlWriterUtil.DEFAULT_INDENTATION_SIZE ) ) == 1 ); + assertTrue( StringUtils.countMatches( output.toString(), + StringUtils.repeat( " ", + 2 * XmlWriterUtil.DEFAULT_INDENTATION_SIZE ) ) == 1 ); } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeLineBreak(org.codehaus.plexus.util.xml.XMLWriter, int, int, int)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeLineBreak(org.codehaus.plexus.util.xml.XMLWriter, int, int, int)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteLineBreakXMLWriterIntIntInt() throws Exception { @@ -116,26 +137,30 @@ public void testWriteLineBreakXMLWriterIntIntInt() } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeCommentLineBreak(org.codehaus.plexus.util.xml.XMLWriter)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeCommentLineBreak(org.codehaus.plexus.util.xml.XMLWriter)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteCommentLineBreakXMLWriter() throws Exception { XmlWriterUtil.writeCommentLineBreak( xmlWriter ); writer.close(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append( "" ).append( XmlWriterUtil.LS ); assertEquals( output.toString(), sb.toString() ); assertTrue( output.toString().length() == XmlWriterUtil.DEFAULT_COLUMN_LINE - 1 + XmlWriterUtil.LS.length() ); } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeCommentLineBreak(org.codehaus.plexus.util.xml.XMLWriter, int)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeCommentLineBreak(org.codehaus.plexus.util.xml.XMLWriter, int)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteCommentLineBreakXMLWriterInt() throws Exception { @@ -152,10 +177,12 @@ public void testWriteCommentLineBreakXMLWriterInt() } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteCommentXMLWriterString() throws Exception { @@ -173,8 +200,7 @@ public void testWriteCommentXMLWriterString() "hellooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" ); writer.close(); sb = new StringBuffer(); - sb.append( "" ) - .append( XmlWriterUtil.LS ); + sb.append( "" ).append( XmlWriterUtil.LS ); assertEquals( output.toString(), sb.toString() ); assertTrue( output.toString().length() >= XmlWriterUtil.DEFAULT_COLUMN_LINE ); @@ -187,14 +213,17 @@ public void testWriteCommentXMLWriterString() sb.append( "" ).append( XmlWriterUtil.LS ); sb.append( "" ).append( XmlWriterUtil.LS ); assertEquals( output.toString(), sb.toString() ); - assertTrue( output.toString().length() == 2 * ( XmlWriterUtil.DEFAULT_COLUMN_LINE - 1 + XmlWriterUtil.LS.length() ) ); + assertTrue( output.toString().length() == 2 + * ( XmlWriterUtil.DEFAULT_COLUMN_LINE - 1 + XmlWriterUtil.LS.length() ) ); } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String, int)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String, int)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteCommentXMLWriterStringInt() throws Exception { @@ -206,8 +235,8 @@ public void testWriteCommentXMLWriterStringInt() sb.append( indent ); sb.append( "" ).append( XmlWriterUtil.LS ); assertEquals( output.toString(), sb.toString() ); - assertTrue( output.toString().length() == XmlWriterUtil.DEFAULT_COLUMN_LINE - 1 + XmlWriterUtil.LS.length() + 2 - * XmlWriterUtil.DEFAULT_INDENTATION_SIZE ); + assertTrue( output.toString().length() == XmlWriterUtil.DEFAULT_COLUMN_LINE - 1 + XmlWriterUtil.LS.length() + + 2 * XmlWriterUtil.DEFAULT_INDENTATION_SIZE ); tearDown(); setUp(); @@ -220,14 +249,17 @@ public void testWriteCommentXMLWriterStringInt() sb.append( indent ); sb.append( "" ).append( XmlWriterUtil.LS ); assertEquals( output.toString(), sb.toString() ); - assertTrue( output.toString().length() == 2 * ( XmlWriterUtil.DEFAULT_COLUMN_LINE - 1 + XmlWriterUtil.LS.length() ) + 2 * indent.length() ); + assertTrue( output.toString().length() == 2 + * ( XmlWriterUtil.DEFAULT_COLUMN_LINE - 1 + XmlWriterUtil.LS.length() ) + 2 * indent.length() ); } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String, int, int)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String, int, int)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteCommentXMLWriterStringIntInt() throws Exception { @@ -239,7 +271,8 @@ public void testWriteCommentXMLWriterStringIntInt() sb.append( repeat ); sb.append( "" ).append( XmlWriterUtil.LS ); assertEquals( output.toString(), sb.toString() ); - assertTrue( output.toString().length() == XmlWriterUtil.DEFAULT_COLUMN_LINE - 1 + XmlWriterUtil.LS.length() + 2 * 4 ); + assertTrue( output.toString().length() == XmlWriterUtil.DEFAULT_COLUMN_LINE - 1 + XmlWriterUtil.LS.length() + + 2 * 4 ); tearDown(); setUp(); @@ -252,14 +285,17 @@ public void testWriteCommentXMLWriterStringIntInt() sb.append( repeat ); sb.append( "" ).append( XmlWriterUtil.LS ); assertEquals( output.toString(), sb.toString() ); - assertTrue( output.toString().length() == 2 * ( XmlWriterUtil.DEFAULT_COLUMN_LINE - 1 + XmlWriterUtil.LS.length() ) + 2 * repeat.length() ); + assertTrue( output.toString().length() == 2 + * ( XmlWriterUtil.DEFAULT_COLUMN_LINE - 1 + XmlWriterUtil.LS.length() ) + 2 * repeat.length() ); } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String, int, int, int)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String, int, int, int)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteCommentXMLWriterStringIntIntInt() throws Exception { @@ -286,10 +322,12 @@ public void testWriteCommentXMLWriterStringIntIntInt() } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeCommentText(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String, int)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeCommentText(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String, int)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteCommentTextXMLWriterStringInt() throws Exception { @@ -302,7 +340,8 @@ public void testWriteCommentTextXMLWriterStringInt() sb.append( "" ).append( XmlWriterUtil.LS ); sb.append( XmlWriterUtil.LS ); assertEquals( output.toString(), sb.toString() ); - assertTrue( output.toString().length() == 3 * ( 80 - 1 + XmlWriterUtil.LS.length() ) + 2 * XmlWriterUtil.LS.length() ); + assertTrue( output.toString().length() == 3 * ( 80 - 1 + XmlWriterUtil.LS.length() ) + + 2 * XmlWriterUtil.LS.length() ); tearDown(); setUp(); @@ -314,28 +353,24 @@ public void testWriteCommentTextXMLWriterStringInt() writer.close(); sb = new StringBuffer(); sb.append( XmlWriterUtil.LS ); - sb.append( indent ).append( "" ) - .append( XmlWriterUtil.LS ); - sb.append( indent ).append( "" ) - .append( XmlWriterUtil.LS ); - sb.append( indent ).append( "" ) - .append( XmlWriterUtil.LS ); - sb.append( indent ).append( "" ) - .append( XmlWriterUtil.LS ); - sb.append( indent ).append( "" ) - .append( XmlWriterUtil.LS ); - sb.append( indent ).append( "" ) - .append( XmlWriterUtil.LS ); + sb.append( indent ).append( "" ).append( XmlWriterUtil.LS ); + sb.append( indent ).append( "" ).append( XmlWriterUtil.LS ); + sb.append( indent ).append( "" ).append( XmlWriterUtil.LS ); + sb.append( indent ).append( "" ).append( XmlWriterUtil.LS ); + sb.append( indent ).append( "" ).append( XmlWriterUtil.LS ); + sb.append( indent ).append( "" ).append( XmlWriterUtil.LS ); sb.append( XmlWriterUtil.LS ); sb.append( indent ); assertEquals( output.toString(), sb.toString() ); } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeCommentText(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String, int, int)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeCommentText(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String, int, int)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteCommentTextXMLWriterStringIntInt() throws Exception { @@ -343,25 +378,25 @@ public void testWriteCommentTextXMLWriterStringIntInt() XmlWriterUtil.writeCommentText( xmlWriter, "hello", 2, 4 ); writer.close(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append( XmlWriterUtil.LS ); - sb.append( indent ).append( "" ) - .append( XmlWriterUtil.LS ); - sb.append( indent ).append( "" ) - .append( XmlWriterUtil.LS ); - sb.append( indent ).append( "" ) - .append( XmlWriterUtil.LS ); + sb.append( indent ).append( "" ).append( XmlWriterUtil.LS ); + sb.append( indent ).append( "" ).append( XmlWriterUtil.LS ); + sb.append( indent ).append( "" ).append( XmlWriterUtil.LS ); sb.append( XmlWriterUtil.LS ); sb.append( indent ); assertEquals( output.toString(), sb.toString() ); - assertTrue( output.toString().length() == 3 * ( 80 - 1 + XmlWriterUtil.LS.length() ) + 4 * 2 * 4 + 2 * XmlWriterUtil.LS.length() ); + assertTrue( output.toString().length() == 3 * ( 80 - 1 + XmlWriterUtil.LS.length() ) + 4 * 2 * 4 + + 2 * XmlWriterUtil.LS.length() ); } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeCommentText(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String, int, int, int)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeCommentText(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String, int, int, int)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteCommentTextXMLWriterStringIntIntInt() throws Exception { @@ -369,7 +404,7 @@ public void testWriteCommentTextXMLWriterStringIntIntInt() XmlWriterUtil.writeCommentText( xmlWriter, "hello", 2, 4, 50 ); writer.close(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append( XmlWriterUtil.LS ); sb.append( indent ).append( "" ).append( XmlWriterUtil.LS ); sb.append( indent ).append( "" ).append( XmlWriterUtil.LS ); @@ -377,44 +412,51 @@ public void testWriteCommentTextXMLWriterStringIntIntInt() sb.append( XmlWriterUtil.LS ); sb.append( indent ); assertEquals( output.toString(), sb.toString() ); - assertTrue( output.toString().length() == 3 * ( 50 - 1 + XmlWriterUtil.LS.length() ) + 4 * 2 * 4 + 2 * XmlWriterUtil.LS.length() ); + assertTrue( output.toString().length() == 3 * ( 50 - 1 + XmlWriterUtil.LS.length() ) + 4 * 2 * 4 + + 2 * XmlWriterUtil.LS.length() ); } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteCommentNull() throws Exception { XmlWriterUtil.writeComment( xmlWriter, null ); writer.close(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append( "" ).append( XmlWriterUtil.LS ); assertEquals( output.toString(), sb.toString() ); } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteCommentShort() throws Exception { XmlWriterUtil.writeComment( xmlWriter, "This is a short text" ); writer.close(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append( "" ).append( XmlWriterUtil.LS ); assertEquals( output.toString(), sb.toString() ); } /** - * Test method for {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String)}. + * Test method for + * {@link org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment(org.codehaus.plexus.util.xml.XMLWriter, java.lang.String)}. * - * @throws Exception if any + * @throws java.lang.Exception if any */ + @Test public void testWriteCommentLong() throws Exception { @@ -422,7 +464,7 @@ public void testWriteCommentLong() + "Based on the concept of a project object model (POM), Maven can manage a project's build, reporting " + "and documentation from a central piece of information." ); writer.close(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append( "" ).append( XmlWriterUtil.LS ); sb.append( "" ).append( XmlWriterUtil.LS ); sb.append( "" ).append( XmlWriterUtil.LS ); diff --git a/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomBuilderTest.java b/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomBuilderTest.java index 2a40417f..3d3cb5ec 100644 --- a/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomBuilderTest.java +++ b/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomBuilderTest.java @@ -16,27 +16,36 @@ * limitations under the License. */ -import junit.framework.TestCase; -import org.codehaus.plexus.util.xml.pull.MXParser; -import org.codehaus.plexus.util.xml.pull.XmlPullParser; -import org.codehaus.plexus.util.xml.pull.XmlPullParserException; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; +import org.codehaus.plexus.util.xml.pull.MXParser; +import org.codehaus.plexus.util.xml.pull.XmlPullParser; +import org.codehaus.plexus.util.xml.pull.XmlPullParserException; +import org.junit.Test; + /** * Test the Xpp3DomBuilder. * * @author Brett Porter - * @version $Id$ + * @version $Id: $Id + * @since 3.4.0 */ public class Xpp3DomBuilderTest - extends TestCase { + private static final String LS = System.lineSeparator(); - private static final String LS = System.getProperty("line.separator"); - + /** + *

                    testBuildFromReader.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testBuildFromReader() throws Exception { @@ -49,6 +58,12 @@ public void testBuildFromReader() assertEquals( "check DOMs match", expectedDom, dom ); } + /** + *

                    testBuildTrimming.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testBuildTrimming() throws Exception { @@ -63,6 +78,12 @@ public void testBuildTrimming() assertEquals( "test with trimming off", " element1\n ", dom.getChild( "el1" ).getValue() ); } + /** + *

                    testBuildFromXpp3Dom.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testBuildFromXpp3Dom() throws Exception { @@ -86,7 +107,7 @@ public void testBuildFromXpp3Dom() { String rawName = parser.getName(); - if ( rawName.equals( "root" ) ) + if ( "root".equals( rawName ) ) { dom = Xpp3DomBuilder.build( parser ); } @@ -95,15 +116,15 @@ else if ( eventType == XmlPullParser.END_TAG ) { String rawName = parser.getName(); - if ( rawName.equals( "configuration" ) ) + if ( "configuration".equals( rawName ) ) { configurationClosed = true; } - else if ( rawName.equals( "newRoot" ) ) + else if ( "newRoot".equals( rawName ) ) { newRootClosed = true; } - else if ( rawName.equals( "root" ) ) + else if ( "root".equals( rawName ) ) { rootClosed = true; } @@ -120,6 +141,7 @@ else if ( rawName.equals( "root" ) ) /** * Test we get an error from the parser, and don't hit the IllegalStateException. */ + @Test public void testUnclosedXml() { String domString = "" + createDomString(); @@ -139,6 +161,13 @@ public void testUnclosedXml() } } + /** + *

                    testEscapingInContent.

                    + * + * @throws java.io.IOException if any. + * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if any. + */ + @Test public void testEscapingInContent() throws IOException, XmlPullParserException { @@ -153,6 +182,13 @@ public void testEscapingInContent() assertEquals( "Compare stringified DOMs", getExpectedString(), w.toString() ); } + /** + *

                    testEscapingInAttributes.

                    + * + * @throws java.io.IOException if any. + * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if any. + */ + @Test public void testEscapingInAttributes() throws IOException, XmlPullParserException { @@ -167,9 +203,44 @@ public void testEscapingInAttributes() assertEquals( "Compare stringified DOMs", newString, s ); } + /** + *

                    testInputLocationTracking.

                    + * + * @throws java.io.IOException if any. + * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if any. + */ + @Test + public void testInputLocationTracking() + throws IOException, XmlPullParserException + { + Xpp3DomBuilder.InputLocationBuilder ilb = new Xpp3DomBuilder.InputLocationBuilder() { + public Object toInputLocation( XmlPullParser parser ) + { + return parser.getLineNumber(); // store only line number as a simple Integer + } + + }; + Xpp3Dom dom = Xpp3DomBuilder.build( new StringReader( createDomString() ), true, ilb ); + Xpp3Dom expectedDom = createExpectedDom(); + assertEquals( "root input location", expectedDom.getInputLocation(), dom.getInputLocation() ); + for( int i = 0; i < dom.getChildCount(); i++ ) + { + Xpp3Dom elt = dom.getChild( i ); + Xpp3Dom expectedElt = expectedDom.getChild( i ); + assertEquals( elt.getName() + " input location", expectedElt.getInputLocation(), elt.getInputLocation() ); + + if ( "el2".equals( elt.getName() ) ) + { + Xpp3Dom el3 = elt.getChild( 0 ); + Xpp3Dom expectedEl3 = expectedElt.getChild( 0 ); + assertEquals( el3.getName() + " input location", expectedEl3.getInputLocation(), el3.getInputLocation() ); + } + } + } + private static String getAttributeEncodedString() { - StringBuffer domString = new StringBuffer(); + StringBuilder domString = new StringBuilder(); domString.append( "" ); domString.append( LS ); domString.append( " bar" ); @@ -181,7 +252,7 @@ private static String getAttributeEncodedString() private static String getEncodedString() { - StringBuffer domString = new StringBuffer(); + StringBuilder domString = new StringBuilder(); domString.append( "\n" ); domString.append( " \"text\"\n" ); domString.append( " \"text\"]]>\n" ); @@ -193,7 +264,7 @@ private static String getEncodedString() private static String getExpectedString() { - StringBuffer domString = new StringBuffer(); + StringBuilder domString = new StringBuilder(); domString.append( "" ); domString.append( LS ); domString.append( " "text"" ); @@ -213,7 +284,7 @@ private static String getExpectedString() private static String createDomString() { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); buf.append( "\n" ); buf.append( " element1\n \n" ); buf.append( " \n" ); @@ -221,6 +292,7 @@ private static String createDomString() buf.append( " \n" ); buf.append( " \n" ); buf.append( " \n" ); + buf.append( " do not trim \n" ); buf.append( "\n" ); return buf.toString(); @@ -228,22 +300,36 @@ private static String createDomString() private static Xpp3Dom createExpectedDom() { + int line = 1; Xpp3Dom expectedDom = new Xpp3Dom( "root" ); + expectedDom.setInputLocation( line ); Xpp3Dom el1 = new Xpp3Dom( "el1" ); + el1.setInputLocation( ++line ); el1.setValue( "element1" ); expectedDom.addChild( el1 ); + ++line; // newline trimmed in Xpp3Dom but not in source Xpp3Dom el2 = new Xpp3Dom( "el2" ); + el2.setInputLocation( ++line ); el2.setAttribute( "att2", "attribute2\nnextline" ); expectedDom.addChild( el2 ); Xpp3Dom el3 = new Xpp3Dom( "el3" ); + el3.setInputLocation( ++line ); el3.setAttribute( "att3", "attribute3" ); el3.setValue( "element3" ); el2.addChild( el3 ); + ++line; Xpp3Dom el4 = new Xpp3Dom( "el4" ); + el4.setInputLocation( ++line ); el4.setValue( "" ); expectedDom.addChild( el4 ); Xpp3Dom el5 = new Xpp3Dom( "el5" ); + el5.setInputLocation( ++line ); expectedDom.addChild( el5 ); + Xpp3Dom el6 = new Xpp3Dom( "el6" ); + el6.setInputLocation( ++line ); + el6.setAttribute( "xml:space", "preserve" ); + el6.setValue( " do not trim " ); + expectedDom.addChild( el6 ); return expectedDom; } } diff --git a/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomPerfTest.java b/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomPerfTest.java new file mode 100644 index 00000000..22bba428 --- /dev/null +++ b/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomPerfTest.java @@ -0,0 +1,104 @@ +package org.codehaus.plexus.util.xml; + +/* + * Copyright The Codehaus Foundation. + * + * Licensed 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. + */ + +import java.io.IOException; +import java.io.StringReader; +import java.util.concurrent.TimeUnit; + +import org.codehaus.plexus.util.xml.pull.XmlPullParserException; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; +import org.openjdk.jmh.runner.Runner; +import org.openjdk.jmh.runner.RunnerException; +import org.openjdk.jmh.runner.options.Options; +import org.openjdk.jmh.runner.options.OptionsBuilder; +import org.openjdk.jmh.runner.options.TimeValue; + +/** + *

                    Xpp3DomPerfTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ +@BenchmarkMode(Mode.Throughput) +@OutputTimeUnit(TimeUnit.MILLISECONDS) +@Warmup(iterations = 3, time = 3, timeUnit = TimeUnit.SECONDS) +public class Xpp3DomPerfTest +{ + @State(Scope.Benchmark) + static public class AdditionState { + Xpp3Dom dom1; + Xpp3Dom dom2; + + @Setup(Level.Iteration) + public void setUp() throws IOException, XmlPullParserException { + String testDom = "onetwo"; + dom1 = Xpp3DomBuilder.build( new StringReader( testDom ) ); + dom2 = new Xpp3Dom( dom1 ); + } + } + + + /** + *

                    benchmarkClone.

                    + * + * @param state a {@link org.codehaus.plexus.util.xml.Xpp3DomPerfTest.AdditionState} object. + * @return a {@link org.codehaus.plexus.util.xml.Xpp3Dom} object. + */ + @Benchmark + public Xpp3Dom benchmarkClone(AdditionState state) + { + return new Xpp3Dom( state.dom1 ); + } + + /** + *

                    benchmarkMerge.

                    + * + * @param state a {@link org.codehaus.plexus.util.xml.Xpp3DomPerfTest.AdditionState} object. + */ + @Benchmark + public void benchmarkMerge(AdditionState state) + { + Xpp3Dom.mergeXpp3Dom( state.dom1, state.dom2 ); + } + + /** + *

                    main.

                    + * + * @param args a {@link java.lang.String} object. + * @throws org.openjdk.jmh.runner.RunnerException if any. + */ + public static void main( String... args ) + throws RunnerException + { + Options opts = new OptionsBuilder() + .measurementIterations( 3 ) + .measurementTime( TimeValue.milliseconds( 3000 ) ) + .forks( 1 ) + .build(); + new Runner( opts ).run(); + } +} diff --git a/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomTest.java b/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomTest.java index e5bbc24b..6a1b7078 100644 --- a/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomTest.java +++ b/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomTest.java @@ -16,34 +16,54 @@ * limitations under the License. */ -import org.codehaus.plexus.util.xml.pull.XmlPullParserException; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNotSame; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.fail; import java.io.IOException; import java.io.StringReader; import java.util.HashMap; -import junit.framework.TestCase; +import org.codehaus.plexus.util.xml.pull.XmlPullParser; +import org.codehaus.plexus.util.xml.pull.XmlPullParserException; +import org.junit.Test; +/** + *

                    Xpp3DomTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ public class Xpp3DomTest - extends TestCase { - + /** + *

                    testShouldPerformAppendAtFirstSubElementLevel.

                    + */ + @Test public void testShouldPerformAppendAtFirstSubElementLevel() { // create the dominant DOM Xpp3Dom t1 = new Xpp3Dom( "top" ); t1.setAttribute( Xpp3Dom.CHILDREN_COMBINATION_MODE_ATTRIBUTE, Xpp3Dom.CHILDREN_COMBINATION_APPEND ); + t1.setInputLocation( "t1top" ); Xpp3Dom t1s1 = new Xpp3Dom( "topsub1" ); t1s1.setValue( "t1s1Value" ); + t1s1.setInputLocation( "t1s1" ); t1.addChild( t1s1 ); // create the recessive DOM Xpp3Dom t2 = new Xpp3Dom( "top" ); + t2.setInputLocation( "t2top" ); Xpp3Dom t2s1 = new Xpp3Dom( "topsub1" ); t2s1.setValue( "t2s1Value" ); + t2s1.setInputLocation( "t2s1" ); t2.addChild( t2s1 ); @@ -51,24 +71,38 @@ public void testShouldPerformAppendAtFirstSubElementLevel() Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( t1, t2 ); assertEquals( 2, result.getChildren( "topsub1" ).length ); + assertEquals( "t2s1Value", result.getChildren( "topsub1" )[0].getValue() ); + assertEquals( "t1s1Value", result.getChildren( "topsub1" )[1].getValue() ); + + assertEquals( "t1top", result.getInputLocation() ); + assertEquals( "t2s1", result.getChildren( "topsub1" )[0].getInputLocation() ); + assertEquals( "t1s1", result.getChildren( "topsub1" )[1].getInputLocation() ); } + /** + *

                    testShouldOverrideAppendAndDeepMerge.

                    + */ + @Test public void testShouldOverrideAppendAndDeepMerge() { // create the dominant DOM Xpp3Dom t1 = new Xpp3Dom( "top" ); t1.setAttribute( Xpp3Dom.CHILDREN_COMBINATION_MODE_ATTRIBUTE, Xpp3Dom.CHILDREN_COMBINATION_APPEND ); + t1.setInputLocation( "t1top" ); Xpp3Dom t1s1 = new Xpp3Dom( "topsub1" ); t1s1.setValue( "t1s1Value" ); + t1s1.setInputLocation( "t1s1" ); t1.addChild( t1s1 ); // create the recessive DOM Xpp3Dom t2 = new Xpp3Dom( "top" ); + t2.setInputLocation( "t2top" ); Xpp3Dom t2s1 = new Xpp3Dom( "topsub1" ); t2s1.setValue( "t2s1Value" ); + t2s1.setInputLocation( "t2s1" ); t2.addChild( t2s1 ); @@ -76,13 +110,22 @@ public void testShouldOverrideAppendAndDeepMerge() Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( t1, t2, Boolean.TRUE ); assertEquals( 1, result.getChildren( "topsub1" ).length ); + assertEquals( "t1s1Value", result.getChildren( "topsub1" )[0].getValue() ); + + assertEquals( "t1top", result.getInputLocation() ); + assertEquals( "t1s1", result.getChildren( "topsub1" )[0].getInputLocation() ); } + /** + *

                    testShouldPerformSelfOverrideAtTopLevel.

                    + */ + @Test public void testShouldPerformSelfOverrideAtTopLevel() { // create the dominant DOM Xpp3Dom t1 = new Xpp3Dom( "top" ); t1.setAttribute( "attr", "value" ); + t1.setInputLocation( "t1top" ); t1.setAttribute( Xpp3Dom.SELF_COMBINATION_MODE_ATTRIBUTE, Xpp3Dom.SELF_COMBINATION_OVERRIDE ); @@ -90,24 +133,32 @@ public void testShouldPerformSelfOverrideAtTopLevel() Xpp3Dom t2 = new Xpp3Dom( "top" ); t2.setAttribute( "attr2", "value2" ); t2.setValue( "t2Value" ); + t2.setInputLocation( "t2top" ); // merge and check results. Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( t1, t2 ); assertEquals( 2, result.getAttributeNames().length ); assertNull( result.getValue() ); + assertEquals( "t1top", result.getInputLocation() ); } + /** + *

                    testShouldMergeValuesAtTopLevelByDefault.

                    + */ + @Test public void testShouldMergeValuesAtTopLevelByDefault() { // create the dominant DOM Xpp3Dom t1 = new Xpp3Dom( "top" ); t1.setAttribute( "attr", "value" ); + t1.setInputLocation( "t1top" ); // create the recessive DOM Xpp3Dom t2 = new Xpp3Dom( "top" ); t2.setAttribute( "attr2", "value2" ); t2.setValue( "t2Value" ); + t2.setInputLocation( "t2top" ); // merge and check results. Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( t1, t2 ); @@ -116,8 +167,13 @@ public void testShouldMergeValuesAtTopLevelByDefault() assertEquals( 2, result.getAttributeNames().length ); assertEquals( result.getValue(), t2.getValue() ); + assertEquals( "t2top", result.getInputLocation() ); } + /** + *

                    testShouldMergeValuesAtTopLevel.

                    + */ + @Test public void testShouldMergeValuesAtTopLevel() { // create the dominant DOM @@ -138,6 +194,10 @@ public void testShouldMergeValuesAtTopLevel() assertEquals( result.getValue(), t2.getValue() ); } + /** + *

                    testNullAttributeNameOrValue.

                    + */ + @Test public void testNullAttributeNameOrValue() { Xpp3Dom t1 = new Xpp3Dom( "top" ); @@ -161,6 +221,10 @@ public void testNullAttributeNameOrValue() t1.toString(); } + /** + *

                    testEquals.

                    + */ + @Test public void testEquals() { Xpp3Dom dom = new Xpp3Dom( "top" ); @@ -170,6 +234,13 @@ public void testEquals() assertFalse( dom.equals( new Xpp3Dom( (String) null ) ) ); } + /** + *

                    testEqualsIsNullSafe.

                    + * + * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if any. + * @throws java.io.IOException if any. + */ + @Test public void testEqualsIsNullSafe() throws XmlPullParserException, IOException { @@ -196,14 +267,23 @@ public void testEqualsIsNullSafe() } } + /** + *

                    testShouldOverwritePluginConfigurationSubItemsByDefault.

                    + * + * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if any. + * @throws java.io.IOException if any. + */ + @Test public void testShouldOverwritePluginConfigurationSubItemsByDefault() throws XmlPullParserException, IOException { String parentConfigStr = "onetwo"; - Xpp3Dom parentConfig = Xpp3DomBuilder.build( new StringReader( parentConfigStr ) ); + Xpp3Dom parentConfig = + Xpp3DomBuilder.build( new StringReader( parentConfigStr ), new FixedInputLocationBuilder( "parent" ) ); String childConfigStr = "three"; - Xpp3Dom childConfig = Xpp3DomBuilder.build( new StringReader( childConfigStr ) ); + Xpp3Dom childConfig = + Xpp3DomBuilder.build( new StringReader( childConfigStr ), new FixedInputLocationBuilder( "child" ) ); Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( childConfig, parentConfig ); Xpp3Dom items = result.getChild( "items" ); @@ -212,16 +292,27 @@ public void testShouldOverwritePluginConfigurationSubItemsByDefault() Xpp3Dom item = items.getChild( 0 ); assertEquals( "three", item.getValue() ); + assertEquals( "child", item.getInputLocation() ); } + /** + *

                    testShouldMergePluginConfigurationSubItemsWithMergeAttributeSet.

                    + * + * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if any. + * @throws java.io.IOException if any. + */ + @Test public void testShouldMergePluginConfigurationSubItemsWithMergeAttributeSet() throws XmlPullParserException, IOException { String parentConfigStr = "onetwo"; - Xpp3Dom parentConfig = Xpp3DomBuilder.build( new StringReader( parentConfigStr ) ); + Xpp3Dom parentConfig = + Xpp3DomBuilder.build( new StringReader( parentConfigStr ), new FixedInputLocationBuilder( "parent" ) ); - String childConfigStr = "three"; - Xpp3Dom childConfig = Xpp3DomBuilder.build( new StringReader( childConfigStr ) ); + String childConfigStr = + "three"; + Xpp3Dom childConfig = + Xpp3DomBuilder.build( new StringReader( childConfigStr ), new FixedInputLocationBuilder( "child" ) ); Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( childConfig, parentConfig ); Xpp3Dom items = result.getChild( "items" ); @@ -231,7 +322,128 @@ public void testShouldMergePluginConfigurationSubItemsWithMergeAttributeSet() Xpp3Dom[] item = items.getChildren(); assertEquals( "one", item[0].getValue() ); + assertEquals( "parent", item[0].getInputLocation() ); assertEquals( "two", item[1].getValue() ); + assertEquals( "parent", item[1].getInputLocation() ); assertEquals( "three", item[2].getValue() ); + assertEquals( "child", item[2].getInputLocation() ); + } + + /** + *

                    testShouldNotChangeUponMergeWithItselfWhenFirstOrLastSubItemIsEmpty.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testShouldNotChangeUponMergeWithItselfWhenFirstOrLastSubItemIsEmpty() + throws Exception + { + String configStr = "test"; + Xpp3Dom dominantConfig = Xpp3DomBuilder.build( new StringReader( configStr ) ); + Xpp3Dom recessiveConfig = Xpp3DomBuilder.build( new StringReader( configStr ) ); + + Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( dominantConfig, recessiveConfig ); + Xpp3Dom items = result.getChild( "items" ); + + assertEquals( 3, items.getChildCount() ); + + assertEquals( null, items.getChild( 0 ).getValue() ); + assertEquals( "test", items.getChild( 1 ).getValue() ); + assertEquals( null, items.getChild( 2 ).getValue() ); + } + + /** + *

                    testShouldCopyRecessiveChildrenNotPresentInTarget.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testShouldCopyRecessiveChildrenNotPresentInTarget() + throws Exception + { + String dominantStr = "x"; + String recessiveStr = "y"; + Xpp3Dom dominantConfig = Xpp3DomBuilder.build( new StringReader( dominantStr ) ); + Xpp3Dom recessiveConfig = Xpp3DomBuilder.build( new StringReader( recessiveStr ) ); + + Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( dominantConfig, recessiveConfig ); + + assertEquals( 2, result.getChildCount() ); + + assertEquals( "x", result.getChild( "foo" ).getValue() ); + assertEquals( "y", result.getChild( "bar" ).getValue() ); + assertNotSame( result.getChild( "bar" ), recessiveConfig.getChild( "bar" ) ); + } + + /** + *

                    testDupeChildren.

                    + * + * @throws java.io.IOException if any. + * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if any. + */ + @Test + public void testDupeChildren() + throws IOException, XmlPullParserException + { + String dupes = "xy"; + Xpp3Dom dom = Xpp3DomBuilder.build( new StringReader( dupes ) ); + assertNotNull( dom ); + assertEquals( "y", dom.getChild( "foo" ).getValue() ); + } + + /** + *

                    testShouldRemoveEntireElementWithAttributesAndChildren.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testShouldRemoveEntireElementWithAttributesAndChildren() + throws Exception + { + String dominantStr = ""; + String recessiveStr = "parameter"; + Xpp3Dom dominantConfig = Xpp3DomBuilder.build( new StringReader( dominantStr ) ); + Xpp3Dom recessiveConfig = Xpp3DomBuilder.build( new StringReader( recessiveStr ) ); + + Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( dominantConfig, recessiveConfig ); + + assertEquals( 0, result.getChildCount() ); + assertEquals( "config", result.getName() ); + } + + /** + *

                    testShouldRemoveDoNotRemoveTagWhenSwappedInputDOMs.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testShouldRemoveDoNotRemoveTagWhenSwappedInputDOMs() + throws Exception + { + String dominantStr = ""; + String recessiveStr = "parameter"; + Xpp3Dom dominantConfig = Xpp3DomBuilder.build( new StringReader( dominantStr ) ); + Xpp3Dom recessiveConfig = Xpp3DomBuilder.build( new StringReader( recessiveStr ) ); + + // same DOMs as testShouldRemoveEntireElementWithAttributesAndChildren(), swapping dominant <--> recessive + Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( recessiveConfig, dominantConfig ); + + assertEquals( recessiveConfig.toString(), result.toString() ); + } + + private static class FixedInputLocationBuilder + implements Xpp3DomBuilder.InputLocationBuilder + { + private final Object location; + + public FixedInputLocationBuilder( Object location ) + { + this.location = location; + } + + public Object toInputLocation( XmlPullParser parser ) + { + return location; + } } } diff --git a/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomUtilsTest.java b/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomUtilsTest.java new file mode 100644 index 00000000..548c93e3 --- /dev/null +++ b/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomUtilsTest.java @@ -0,0 +1,130 @@ +package org.codehaus.plexus.util.xml; + +/* + * Copyright The Codehaus Foundation. + * + * Licensed 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. + */ + +import static org.junit.Assert.assertEquals; + +import java.io.StringReader; + +import org.codehaus.plexus.util.xml.pull.XmlPullParser; +import org.junit.Test; + +/** + *

                    Xpp3DomUtilsTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ +public class Xpp3DomUtilsTest +{ + /** + *

                    testCombineId.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testCombineId() + throws Exception + { + String lhs = "" + "LHS-ONLYLHS" + + "TOOVERWRITELHS" + ""; + + String rhs = "" + "RHS-ONLYRHS" + + "TOOVERWRITERHS" + ""; + + Xpp3Dom leftDom = Xpp3DomBuilder.build( new StringReader( lhs ), new FixedInputLocationBuilder( "left" ) ); + Xpp3Dom rightDom = Xpp3DomBuilder.build( new StringReader( rhs ), new FixedInputLocationBuilder( "right" ) ); + + Xpp3Dom mergeResult = Xpp3DomUtils.mergeXpp3Dom( leftDom, rightDom, true ); + assertEquals( 3, mergeResult.getChildren( "property" ).length ); + + Xpp3Dom p0 = mergeResult.getChildren( "property" )[0]; + assertEquals( "LHS-ONLY", p0.getChild( "name" ).getValue() ); + assertEquals( "left", p0.getChild( "name" ).getInputLocation() ); + assertEquals( "LHS", p0.getChild( "value" ).getValue() ); + assertEquals( "left", p0.getChild( "value" ).getInputLocation() ); + + Xpp3Dom p1 = mergeResult.getChildren( "property" )[1]; + assertEquals( "TOOVERWRITE", mergeResult.getChildren( "property" )[1].getChild( "name" ).getValue() ); + assertEquals( "left", p1.getChild( "name" ).getInputLocation() ); + assertEquals( "LHS", mergeResult.getChildren( "property" )[1].getChild( "value" ).getValue() ); + assertEquals( "left", p1.getChild( "value" ).getInputLocation() ); + + Xpp3Dom p2 = mergeResult.getChildren( "property" )[2]; + assertEquals( "RHS-ONLY", mergeResult.getChildren( "property" )[2].getChild( "name" ).getValue() ); + assertEquals( "right", p2.getChild( "name" ).getInputLocation() ); + assertEquals( "RHS", mergeResult.getChildren( "property" )[2].getChild( "value" ).getValue() ); + assertEquals( "right", p2.getChild( "value" ).getInputLocation() ); + } + + /** + *

                    testCombineKeys.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testCombineKeys() + throws Exception + { + String lhs = "" + "LHS-ONLYLHS" + + "TOOVERWRITELHS" + ""; + + String rhs = "" + "RHS-ONLYRHS" + + "TOOVERWRITERHS" + ""; + + Xpp3Dom leftDom = Xpp3DomBuilder.build( new StringReader( lhs ), new FixedInputLocationBuilder( "left" ) ); + Xpp3Dom rightDom = Xpp3DomBuilder.build( new StringReader( rhs ), new FixedInputLocationBuilder( "right" ) ); + + Xpp3Dom mergeResult = Xpp3DomUtils.mergeXpp3Dom( leftDom, rightDom, true ); + assertEquals( 3, mergeResult.getChildren( "property" ).length ); + + Xpp3Dom p0 = mergeResult.getChildren( "property" )[0]; + assertEquals( "LHS-ONLY", p0.getChild( "name" ).getValue() ); + assertEquals( "left", p0.getChild( "name" ).getInputLocation() ); + assertEquals( "LHS", p0.getChild( "value" ).getValue() ); + assertEquals( "left", p0.getChild( "value" ).getInputLocation() ); + + Xpp3Dom p1 = mergeResult.getChildren( "property" )[1]; + assertEquals( "TOOVERWRITE", mergeResult.getChildren( "property" )[1].getChild( "name" ).getValue() ); + assertEquals( "left", p1.getChild( "name" ).getInputLocation() ); + assertEquals( "LHS", mergeResult.getChildren( "property" )[1].getChild( "value" ).getValue() ); + assertEquals( "left", p1.getChild( "value" ).getInputLocation() ); + + Xpp3Dom p2 = mergeResult.getChildren( "property" )[2]; + assertEquals( "RHS-ONLY", mergeResult.getChildren( "property" )[2].getChild( "name" ).getValue() ); + assertEquals( "right", p2.getChild( "name" ).getInputLocation() ); + assertEquals( "RHS", mergeResult.getChildren( "property" )[2].getChild( "value" ).getValue() ); + assertEquals( "right", p2.getChild( "value" ).getInputLocation() ); + } + + private static class FixedInputLocationBuilder + implements Xpp3DomBuilder.InputLocationBuilder + { + private final Object location; + + public FixedInputLocationBuilder( Object location ) + { + this.location = location; + } + + public Object toInputLocation( XmlPullParser parser ) + { + return location; + } + } +} diff --git a/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomWriterTest.java b/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomWriterTest.java index b53f15c4..93c00a7d 100644 --- a/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomWriterTest.java +++ b/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomWriterTest.java @@ -16,18 +16,27 @@ * limitations under the License. */ -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; import java.io.StringWriter; +import org.junit.Test; + /** + *

                    Xpp3DomWriterTest class.

                    + * * @author Edwin Punzalan + * @version $Id: $Id + * @since 3.4.0 */ public class Xpp3DomWriterTest - extends TestCase { private static final String LS = System.getProperty( "line.separator" ); + /** + *

                    testWriter.

                    + */ + @Test public void testWriter() { StringWriter writer = new StringWriter(); @@ -37,6 +46,10 @@ public void testWriter() assertEquals( "Check if output matches", createExpectedXML( true ), writer.toString() ); } + /** + *

                    testWriterNoEscape.

                    + */ + @Test public void testWriterNoEscape() { StringWriter writer = new StringWriter(); @@ -48,7 +61,7 @@ public void testWriterNoEscape() private String createExpectedXML( boolean escape ) { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); buf.append( "" ); buf.append( LS ); buf.append( " element1" ); @@ -67,11 +80,11 @@ private String createExpectedXML( boolean escape ) buf.append( LS ); if ( escape ) { - buf.append( " element7" + LS + "&"'<>" ); + buf.append( " element7" ).append( LS ).append( "&"'<>" ); } else { - buf.append( " element7"+ LS + "&\"\'<>" ); + buf.append( " element7" ).append( LS ).append( "&\"\'<>" ); } buf.append( LS ); buf.append( " " ); diff --git a/src/test/java/org/codehaus/plexus/util/xml/pull/IBMXML10Tests_Test_IBMXMLConformanceTestSuite_not_wftests_Test_IBMXMLConformanceTestSuite_Production24_Test.java b/src/test/java/org/codehaus/plexus/util/xml/pull/IBMXML10Tests_Test_IBMXMLConformanceTestSuite_not_wftests_Test_IBMXMLConformanceTestSuite_Production24_Test.java new file mode 100644 index 00000000..4b1f5eb5 --- /dev/null +++ b/src/test/java/org/codehaus/plexus/util/xml/pull/IBMXML10Tests_Test_IBMXMLConformanceTestSuite_not_wftests_Test_IBMXMLConformanceTestSuite_Production24_Test.java @@ -0,0 +1,274 @@ +package org.codehaus.plexus.util.xml.pull; + +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import org.junit.Before; +import org.junit.Test; + +/** + * Test class that execute a particular set of tests associated to a TESCASES tag from the XML W3C Conformance Tests. + * TESCASES PROFILE:
                    IBM XML Conformance Test Suite - Production 24
                    + * XML test files base folder:
                    xmlconf/ibm/
                    + * + * @author Gabriel Belingueres + * @version $Id: $Id + * @since 3.4.0 + */ +public class IBMXML10Tests_Test_IBMXMLConformanceTestSuite_not_wftests_Test_IBMXMLConformanceTestSuite_Production24_Test +{ + + final static File testResourcesDir = new File( "src/test/resources/", "xmlconf/ibm/" ); + + MXParser parser; + + /** + *

                    setUp.

                    + */ + @Before + public void setUp() + { + parser = new MXParser(); + } + + /** + * Test ID:
                    ibm-not-wf-P24-ibm24n01.xml
                    + * Test URI:
                    not-wf/P24/ibm24n01.xml
                    + * Comment:
                    Tests VersionInfo with a required field missing. The VersionNum is     missing in the VersionInfo in the XMLDecl.
                    + * Sections:
                    2.8
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P24_ibm24n01xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P24/ibm24n01.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests VersionInfo with a required field missing. The VersionNum is missing in the VersionInfo in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected apostrophe (') or quotation mark (\") after version and not ?" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P24-ibm24n02.xml
                    + * Test URI:
                    not-wf/P24/ibm24n02.xml
                    + * Comment:
                    Tests VersionInfo with a required field missing. The white space is     missing between the key word "xml" and the VersionInfo in the XMLDecl.
                    + * Sections:
                    2.8
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P24_ibm24n02xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P24/ibm24n02.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests VersionInfo with a required field missing. The white space is missing between the key word \"xml\" and the VersionInfo in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected v in version and not ?" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P24-ibm24n03.xml
                    + * Test URI:
                    not-wf/P24/ibm24n03.xml
                    + * Comment:
                    Tests VersionInfo with a required field missing. The "="      (equal sign) is missing between the key word "version" and the VersionNum.
                    + * Sections:
                    2.8
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P24_ibm24n03xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P24/ibm24n03.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests VersionInfo with a required field missing. The \"=\" (equal sign) is missing between the key word \"version\" and the VersionNum." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected equals sign (=) after version and not \\'" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P24-ibm24n04.xml
                    + * Test URI:
                    not-wf/P24/ibm24n04.xml
                    + * Comment:
                    Tests VersionInfo with wrong field ordering. The VersionNum     occurs before "=" and "version".
                    + * Sections:
                    2.8
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P24_ibm24n04xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P24/ibm24n04.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests VersionInfo with wrong field ordering. The VersionNum occurs before \"=\" and \"version\"." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected v in version and not \\'" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P24-ibm24n05.xml
                    + * Test URI:
                    not-wf/P24/ibm24n05.xml
                    + * Comment:
                    Tests VersionInfo with wrong field ordering. The "=" occurs     after "version" and the VersionNum.
                    + * Sections:
                    2.8
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P24_ibm24n05xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P24/ibm24n05.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests VersionInfo with wrong field ordering. The \"=\" occurs after \"version\" and the VersionNum." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected equals sign (=) after version and not \\'" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P24-ibm24n06.xml
                    + * Test URI:
                    not-wf/P24/ibm24n06.xml
                    + * Comment:
                    Tests VersionInfo with the wrong key word "Version".
                    + * Sections:
                    2.8
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P24_ibm24n06xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P24/ibm24n06.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests VersionInfo with the wrong key word \"Version\"." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected v in version and not V" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P24-ibm24n07.xml
                    + * Test URI:
                    not-wf/P24/ibm24n07.xml
                    + * Comment:
                    Tests VersionInfo with the wrong key word "versioN".
                    + * Sections:
                    2.8
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P24_ibm24n07xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P24/ibm24n07.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests VersionInfo with the wrong key word \"versioN\"." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected n in version and not N" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P24-ibm24n08.xml
                    + * Test URI:
                    not-wf/P24/ibm24n08.xml
                    + * Comment:
                    Tests VersionInfo with mismatched quotes around the VersionNum.      version = '1.0" is used as the VersionInfo.
                    + * Sections:
                    2.8
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P24_ibm24n08xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P24/ibm24n08.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests VersionInfo with mismatched quotes around the VersionNum. version = '1.0\" is used as the VersionInfo." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "ibm-not-wf-P24-ibm24n09.xml + * Test URI:
                    not-wf/P24/ibm24n09.xml
                    + * Comment:
                    Tests VersionInfo with mismatched quotes around the VersionNum.      The closing bracket for the VersionNum is missing.
                    + * Sections:
                    2.8
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P24_ibm24n09xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P24/ibm24n09.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests VersionInfo with mismatched quotes around the VersionNum. The closing bracket for the VersionNum is missing." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "IBM XML Conformance Test Suite - Production 2 + * XML test files base folder:
                    xmlconf/ibm/
                    + * + * @author Gabriel Belingueres + * @version $Id: $Id + * @since 3.4.0 + */ +public class IBMXML10Tests_Test_IBMXMLConformanceTestSuite_not_wftests_Test_IBMXMLConformanceTestSuite_Production2_Test { + + final static File testResourcesDir = new File("src/test/resources/", "xmlconf/ibm/"); + + MXParser parser; + + /** + *

                    setUp.

                    + */ + @Before + public void setUp() { + parser = new MXParser(); + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n01.xml
                    + * Test URI:
                    not-wf/P02/ibm02n01.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x00
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n01xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n01.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x00" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x0 found in comment" ) ); + } + } + + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n02.xml
                    + * Test URI:
                    not-wf/P02/ibm02n02.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x01
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n02xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n02.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x01" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x1 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n03.xml
                    + * Test URI:
                    not-wf/P02/ibm02n03.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x02
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n03xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n03.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x02" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x2 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n04.xml
                    + * Test URI:
                    not-wf/P02/ibm02n04.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x03
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n04xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n04.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x03" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x3 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n05.xml
                    + * Test URI:
                    not-wf/P02/ibm02n05.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x04
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n05xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n05.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x04" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x4 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n06.xml
                    + * Test URI:
                    not-wf/P02/ibm02n06.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x05
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n06xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n06.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x05" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x5 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n07.xml
                    + * Test URI:
                    not-wf/P02/ibm02n07.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x06
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n07xml() throws IOException { + try(Reader reader = new FileReader(new File(testResourcesDir, "not-wf/P02/ibm02n07.xml"))) { + parser.setInput(reader); + while (parser.nextToken() != XmlPullParser.END_DOCUMENT); + fail("Tests a comment which contains an illegal Char: #x06"); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x6 found in comment" ) ); + } + } + + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n08.xml
                    + * Test URI:
                    not-wf/P02/ibm02n08.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x07
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n08xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n08.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x07" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x7 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n09.xml
                    + * Test URI:
                    not-wf/P02/ibm02n09.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x08
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n09xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n09.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x08" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x8 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n10.xml
                    + * Test URI:
                    not-wf/P02/ibm02n10.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x0B
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n10xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n10.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x0B" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0xb found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n11.xml
                    + * Test URI:
                    not-wf/P02/ibm02n11.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x0C
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n11xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n11.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x0C" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0xc found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n12.xml
                    + * Test URI:
                    not-wf/P02/ibm02n12.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x0E
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n12xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n12.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x0E" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0xe found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n13.xml
                    + * Test URI:
                    not-wf/P02/ibm02n13.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x0F
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n13xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n13.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x0F" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0xf found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n14.xml
                    + * Test URI:
                    not-wf/P02/ibm02n14.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x10
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n14xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n14.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x10" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x10 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n15.xml
                    + * Test URI:
                    not-wf/P02/ibm02n15.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x11
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n15xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n15.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x11" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x11 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n16.xml
                    + * Test URI:
                    not-wf/P02/ibm02n16.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x12
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n16xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n16.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x12" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x12 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n17.xml
                    + * Test URI:
                    not-wf/P02/ibm02n17.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x13
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n17xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n17.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x13" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x13 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n18.xml
                    + * Test URI:
                    not-wf/P02/ibm02n18.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x14
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n18xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n18.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x14" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x14 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n19.xml
                    + * Test URI:
                    not-wf/P02/ibm02n19.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x15
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n19xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n19.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x15" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x15 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n20.xml
                    + * Test URI:
                    not-wf/P02/ibm02n20.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x16
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n20xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n20.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x16" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x16 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n21.xml
                    + * Test URI:
                    not-wf/P02/ibm02n21.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x17
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n21xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n21.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x17" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x17 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n22.xml
                    + * Test URI:
                    not-wf/P02/ibm02n22.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x18
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n22xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n22.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x18" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x18 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n23.xml
                    + * Test URI:
                    not-wf/P02/ibm02n23.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x19
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n23xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n23.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x19" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x19 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n24.xml
                    + * Test URI:
                    not-wf/P02/ibm02n24.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x1A
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n24xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n24.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x1A" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x1a found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n25.xml
                    + * Test URI:
                    not-wf/P02/ibm02n25.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x1B
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n25xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n25.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x1B" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x1b found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n26.xml
                    + * Test URI:
                    not-wf/P02/ibm02n26.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x1C
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n26xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n26.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x1C" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x1c found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n27.xml
                    + * Test URI:
                    not-wf/P02/ibm02n27.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x1D
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n27xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n27.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x1D" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x1d found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n28.xml
                    + * Test URI:
                    not-wf/P02/ibm02n28.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x1E
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n28xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n28.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x1E" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x1e found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n29.xml
                    + * Test URI:
                    not-wf/P02/ibm02n29.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #x1F
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n29xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P02/ibm02n29.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #x1F" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0x1f found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n30.xml
                    + * Test URI:
                    not-wf/P02/ibm02n30.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #xD800
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + * + * NOTE: This test file is malformed into the original test suite, so I skip it. + */ + //@Test + public void testibm_not_wf_P02_ibm02n30xml() + throws IOException + { + try ( BufferedReader reader = + Files.newBufferedReader( Paths.get( testResourcesDir.getCanonicalPath(), "not-wf/P02/ibm02n30.xml" ), + Charset.forName( "ISO-8859-15" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #xD800" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0xd800 found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n31.xml
                    + * Test URI:
                    not-wf/P02/ibm02n31.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #xDFFF
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + * + * NOTE: This test file is malformed into the original test suite, so I skip it. + */ + //@Test + public void testibm_not_wf_P02_ibm02n31xml() + throws IOException + { + try ( FileInputStream is = new FileInputStream( new File( testResourcesDir, "not-wf/P02/ibm02n31.xml" ) ); + InputStreamReader reader = new InputStreamReader( is, "ISO-8859-15" ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #xDFFF" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0xdfff found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n32.xml
                    + * Test URI:
                    not-wf/P02/ibm02n32.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #xFFFE
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n32xml() + throws IOException + { + try ( FileInputStream is = new FileInputStream( new File( testResourcesDir, "not-wf/P02/ibm02n32.xml" ) ); + InputStreamReader reader = new InputStreamReader( is, StandardCharsets.UTF_8 ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #xFFFE" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0xfffe found in comment" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P02-ibm02n33.xml
                    + * Test URI:
                    not-wf/P02/ibm02n33.xml
                    + * Comment:
                    Tests a comment which contains an illegal Char: #xFFFF
                    + * Sections:
                    2.2
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P02_ibm02n33xml() + throws IOException + { + try ( FileInputStream is = new FileInputStream( new File( testResourcesDir, "not-wf/P02/ibm02n33.xml" ) ); + InputStreamReader reader = new InputStreamReader( is, StandardCharsets.UTF_8 ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests a comment which contains an illegal Char: #xFFFF" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "Illegal character 0xffff found in comment" ) ); + } + } + +} diff --git a/src/test/java/org/codehaus/plexus/util/xml/pull/IBMXML10Tests_Test_IBMXMLConformanceTestSuite_not_wftests_Test_IBMXMLConformanceTestSuite_Production32_Test.java b/src/test/java/org/codehaus/plexus/util/xml/pull/IBMXML10Tests_Test_IBMXMLConformanceTestSuite_not_wftests_Test_IBMXMLConformanceTestSuite_Production32_Test.java new file mode 100644 index 00000000..a6a80030 --- /dev/null +++ b/src/test/java/org/codehaus/plexus/util/xml/pull/IBMXML10Tests_Test_IBMXMLConformanceTestSuite_not_wftests_Test_IBMXMLConformanceTestSuite_Production32_Test.java @@ -0,0 +1,276 @@ +package org.codehaus.plexus.util.xml.pull; + +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import org.junit.Before; +import org.junit.Test; + +/** + * Test class that execute a particular set of tests associated to a TESCASES tag from the XML W3C Conformance Tests. + * TESCASES PROFILE:
                    IBM XML Conformance Test Suite - Production 32
                    + * XML test files base folder:
                    xmlconf/ibm/
                    + * + * @author Gabriel Belingueres + * @version $Id: $Id + * @since 3.4.0 + */ +public class IBMXML10Tests_Test_IBMXMLConformanceTestSuite_not_wftests_Test_IBMXMLConformanceTestSuite_Production32_Test +{ + + final static File testResourcesDir = new File( "src/test/resources/", "xmlconf/ibm/" ); + + MXParser parser; + + /** + *

                    setUp.

                    + */ + @Before + public void setUp() + { + parser = new MXParser(); + } + + /** + * Test ID:
                    ibm-not-wf-P32-ibm32n01.xml
                    + * Test URI:
                    not-wf/P32/ibm32n01.xml
                    + * Comment:
                    Tests SDDecl with a required field missing. The leading white space     is missing with the SDDecl in the XMLDecl.
                    + * Sections:
                    2.9
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P32_ibm32n01xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P32/ibm32n01.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests SDDecl with a required field missing. The leading white space is missing with the SDDecl in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected a space after version and not s" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P32-ibm32n02.xml
                    + * Test URI:
                    not-wf/P32/ibm32n02.xml
                    + * Comment:
                    Tests SDDecl with a required field missing. The "=" sign is missing     in the SDDecl in the XMLDecl.
                    + * Sections:
                    2.9
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P32_ibm32n02xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P32/ibm32n02.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests SDDecl with a required field missing. The \"=\" sign is missing in the SDDecl in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected equals sign (=) after standalone and not \"" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P32-ibm32n03.xml
                    + * Test URI:
                    not-wf/P32/ibm32n03.xml
                    + * Comment:
                    Tests SDDecl with wrong key word. The word "Standalone" occurs in      the SDDecl in the XMLDecl.
                    + * Sections:
                    2.9
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P32_ibm32n03xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P32/ibm32n03.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests SDDecl with wrong key word. The word \"Standalone\" occurs in the SDDecl in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "unexpected character S" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P32-ibm32n04.xml
                    + * Test URI:
                    not-wf/P32/ibm32n04.xml
                    + * Comment:
                    Tests SDDecl with wrong key word. The word "Yes" occurs in the     SDDecl in the XMLDecl.
                    + * Sections:
                    2.9
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P32_ibm32n04xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P32/ibm32n04.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests SDDecl with wrong key word. The word \"Yes\" occurs in the SDDecl in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected 'yes' or 'no' after standalone and not Y" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P32-ibm32n05.xml
                    + * Test URI:
                    not-wf/P32/ibm32n05.xml
                    + * Comment:
                    Tests SDDecl with wrong key word. The word "YES" occurs in the     SDDecl in the XMLDecl.
                    + * Sections:
                    2.9
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P32_ibm32n05xml() + throws IOException + { + + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P32/ibm32n05.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests SDDecl with wrong key word. The word \"YES\" occurs in the SDDecl in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected 'yes' or 'no' after standalone and not Y" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P32-ibm32n06.xml
                    + * Test URI:
                    not-wf/P32/ibm32n06.xml
                    + * Comment:
                    Tests SDDecl with wrong key word. The word "No" occurs in the     SDDecl in the XMLDecl.
                    + * Sections:
                    2.9
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P32_ibm32n06xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P32/ibm32n06.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests SDDecl with wrong key word. The word \"No\" occurs in the SDDecl in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected 'yes' or 'no' after standalone and not N" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P32-ibm32n07.xml
                    + * Test URI:
                    not-wf/P32/ibm32n07.xml
                    + * Comment:
                    Tests SDDecl with wrong key word. The word "NO" occurs in the     SDDecl in the XMLDecl.
                    + * Sections:
                    2.9
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P32_ibm32n07xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P32/ibm32n07.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests SDDecl with wrong key word. The word \"NO\" occurs in the SDDecl in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected 'yes' or 'no' after standalone and not N" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P32-ibm32n08.xml
                    + * Test URI:
                    not-wf/P32/ibm32n08.xml
                    + * Comment:
                    Tests SDDecl with wrong field ordering. The "=" sign occurs      after the key word "yes" in the SDDecl in the XMLDecl.
                    + * Sections:
                    2.9
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P32_ibm32n08xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P32/ibm32n08.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests SDDecl with wrong field ordering. The \"=\" sign occurs after the key word \"yes\" in the SDDecl in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected equals sign (=) after standalone and not \"" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P32-ibm32n09.xml
                    + * Test URI:
                    not-wf/P32/ibm32n09.xml
                    + * Comment:
                    This is test violates WFC: Entity Declared in P68.     The standalone document declaration has the value yes, BUT there is an      external markup declaration of an entity (other than amp, lt, gt, apos,     quot), and references to this entity appear in the document.
                    + * Sections:
                    2.9
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + * + * NOTE: This test is SKIPPED as MXParser does not support parsing inside DOCTYPEDECL. + */ + // @Test + public void testibm_not_wf_P32_ibm32n09xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P32/ibm32n09.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "This is test violates WFC: Entity Declared in P68. The standalone document declaration has the value yes, BUT there is an external markup declaration of an entity (other than amp, lt, gt, apos, quot), and references to this entity appear in the document." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected ?> as last part of IBM XML Conformance Test Suite - Production 66 + * XML test files base folder:
                    xmlconf/ibm/
                    + * + * @author Gabriel Belingueres + * @version $Id: $Id + * @since 3.4.0 + */ +public class IBMXML10Tests_Test_IBMXMLConformanceTestSuite_not_wftests_Test_IBMXMLConformanceTestSuite_Production66_Test +{ + + final static File testResourcesDir = new File( "src/test/resources/", "xmlconf/ibm/" ); + + MXParser parser; + + /** + *

                    setUp.

                    + */ + @Before + public void setUp() + { + parser = new MXParser(); + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n01.xml
                    + * Test URI:
                    not-wf/P66/ibm66n01.xml
                    + * Comment:
                    Tests CharRef with an illegal character referred to. The "#002f" is      used as the referred character in the CharRef in the EntityDecl in the DTD.
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P66_ibm66n01xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n01.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with an illegal character referred to. The \"#002f\" is used as the referred character in the CharRef in the EntityDecl in the DTD." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with decimal value) may not contain f" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n02.xml
                    + * Test URI:
                    not-wf/P66/ibm66n02.xml
                    + * Comment:
                    Tests CharRef with the semicolon character missing. The semicolon      character is missing at the end of the CharRef in the attribute value in     the STag of element "root".
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P66_ibm66n02xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n02.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with the semicolon character missing. The semicolon character is missing at the end of the CharRef in the attribute value in the STag of element \"root\"." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with hex value) may not contain \"" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n03.xml
                    + * Test URI:
                    not-wf/P66/ibm66n03.xml
                    + * Comment:
                    Tests CharRef with an illegal character referred to. The "49" is      used as the referred character in the CharRef in the EntityDecl in the DTD.
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P66_ibm66n03xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n03.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with an illegal character referred to. The \"49\" is used as the referred character in the CharRef in the EntityDecl in the DTD." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "entity reference names can not start with character '4'" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n04.xml
                    + * Test URI:
                    not-wf/P66/ibm66n04.xml
                    + * Comment:
                    Tests CharRef with an illegal character referred to. The "#5~0" is      used as the referred character in the attribute value in the EmptyElemTag     of the element "root".
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P66_ibm66n04xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n04.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with an illegal character referred to. The \"#5~0\" is used as the referred character in the attribute value in the EmptyElemTag of the element \"root\"." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with decimal value) may not contain ~" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n05.xml
                    + * Test URI:
                    not-wf/P66/ibm66n05.xml
                    + * Comment:
                    Tests CharRef with an illegal character referred to. The "#x002g" is     used as the referred character in the CharRef in the EntityDecl in the DTD.
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + * @throws java.io.FileNotFoundException if any. + * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if any. + */ + @Test + public void testibm_not_wf_P66_ibm66n05xml() + throws FileNotFoundException, IOException, XmlPullParserException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n05.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with an illegal character referred to. The \"#x002g\" is used as the referred character in the CharRef in the EntityDecl in the DTD." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with hex value) may not contain g" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n06.xml
                    + * Test URI:
                    not-wf/P66/ibm66n06.xml
                    + * Comment:
                    Tests CharRef with an illegal character referred to. The "#x006G" is     used as the referred character in the attribute value in the EmptyElemTag      of the element "root".
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P66_ibm66n06xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n06.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with an illegal character referred to. The \"#x006G\" is used as the referred character in the attribute value in the EmptyElemTag of the element \"root\"." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with hex value) may not contain G" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n07.xml
                    + * Test URI:
                    not-wf/P66/ibm66n07.xml
                    + * Comment:
                    Tests CharRef with an illegal character referred to. The "#0=2f" is      used as the referred character in the CharRef in the EntityDecl in the DTD.
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P66_ibm66n07xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n07.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with an illegal character referred to. The \"#0=2f\" is used as the referred character in the CharRef in the EntityDecl in the DTD." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with hex value) may not contain =" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n08.xml
                    + * Test URI:
                    not-wf/P66/ibm66n08.xml
                    + * Comment:
                    Tests CharRef with an illegal character referred to. The "#56.0" is      used as the referred character in the attribute value in the EmptyElemTag      of the element "root".
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P66_ibm66n08xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n08.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with an illegal character referred to. The \"#56.0\" is used as the referred character in the attribute value in the EmptyElemTag of the element \"root\"." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with decimal value) may not contain ." ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n09.xml
                    + * Test URI:
                    not-wf/P66/ibm66n09.xml
                    + * Comment:
                    Tests CharRef with an illegal character referred to. The "#x00/2f"      is used as the referred character in the CharRef in the EntityDecl in the      DTD.
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P66_ibm66n09xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n09.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with an illegal character referred to. The \"#x00/2f\" is used as the referred character in the CharRef in the EntityDecl in the DTD." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with hex value) may not contain /" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n10.xml
                    + * Test URI:
                    not-wf/P66/ibm66n10.xml
                    + * Comment:
                    Tests CharRef with an illegal character referred to. The "#51)" is      used as the referred character in the attribute value in the EmptyElemTag      of the element "root".
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P66_ibm66n10xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n10.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with an illegal character referred to. The \"#51)\" is used as the referred character in the attribute value in the EmptyElemTag of the element \"root\"." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with decimal value) may not contain )" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n11.xml
                    + * Test URI:
                    not-wf/P66/ibm66n11.xml
                    + * Comment:
                    Tests CharRef with an illegal character referred to. The "#00 2f"     is used as the referred character in the CharRef in the EntityDecl in the      DTD.
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P66_ibm66n11xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n11.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with an illegal character referred to. The \"#00 2f\" is used as the referred character in the CharRef in the EntityDecl in the DTD." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with hex value) may not contain " ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n12.xml
                    + * Test URI:
                    not-wf/P66/ibm66n12.xml
                    + * Comment:
                    Tests CharRef with an illegal character referred to. The "#x0000"      is used as the referred character in the attribute value in the EmptyElemTag     of the element "root".
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P66_ibm66n12xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n12.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with an illegal character referred to. The \"#x0000\" is used as the referred character in the attribute value in the EmptyElemTag of the element \"root\"." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with hex value 0000) is invalid" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n13.xml
                    + * Test URI:
                    not-wf/P66/ibm66n13.xml
                    + * Comment:
                    Tests CharRef with an illegal character referred to. The "#x001f"      is used as the referred character in the attribute value in the EmptyElemTag     of the element "root".
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P66_ibm66n13xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n13.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with an illegal character referred to. The \"#x001f\" is used as the referred character in the attribute value in the EmptyElemTag of the element \"root\"." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with hex value 001f) is invalid" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n14.xml
                    + * Test URI:
                    not-wf/P66/ibm66n14.xml
                    + * Comment:
                    Tests CharRef with an illegal character referred to. The "#xfffe"      is used as the referred character in the attribute value in the EmptyElemTag     of the element "root".
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P66_ibm66n14xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n14.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with an illegal character referred to. The \"#xfffe\" is used as the referred character in the attribute value in the EmptyElemTag of the element \"root\"." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with hex value fffe) is invalid" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P66-ibm66n15.xml
                    + * Test URI:
                    not-wf/P66/ibm66n15.xml
                    + * Comment:
                    Tests CharRef with an illegal character referred to. The "#xffff"      is used as the referred character in the attribute value in the EmptyElemTag     of the element "root".
                    + * Sections:
                    4.1
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P66_ibm66n15xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P66/ibm66n15.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests CharRef with an illegal character referred to. The \"#xffff\" is used as the referred character in the attribute value in the EmptyElemTag of the element \"root\"." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with hex value ffff) is invalid" ) ); + } + } + +} diff --git a/src/test/java/org/codehaus/plexus/util/xml/pull/IBMXML10Tests_Test_IBMXMLConformanceTestSuite_not_wftests_Test_IBMXMLConformanceTestSuite_Production80_Test.java b/src/test/java/org/codehaus/plexus/util/xml/pull/IBMXML10Tests_Test_IBMXMLConformanceTestSuite_not_wftests_Test_IBMXMLConformanceTestSuite_Production80_Test.java new file mode 100644 index 00000000..e5510bb5 --- /dev/null +++ b/src/test/java/org/codehaus/plexus/util/xml/pull/IBMXML10Tests_Test_IBMXMLConformanceTestSuite_not_wftests_Test_IBMXMLConformanceTestSuite_Production80_Test.java @@ -0,0 +1,195 @@ +package org.codehaus.plexus.util.xml.pull; + +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import org.junit.Before; +import org.junit.Test; + +/** + * Test class that execute a particular set of tests associated to a TESCASES tag from the XML W3C Conformance Tests. + * TESCASES PROFILE:
                    IBM XML Conformance Test Suite - Production 80
                    + * XML test files base folder:
                    xmlconf/ibm/
                    + * + * @author Gabriel Belingueres + * @version $Id: $Id + * @since 3.4.0 + */ +public class IBMXML10Tests_Test_IBMXMLConformanceTestSuite_not_wftests_Test_IBMXMLConformanceTestSuite_Production80_Test +{ + + final static File testResourcesDir = new File( "src/test/resources/", "xmlconf/ibm/" ); + + MXParser parser; + + /** + *

                    setUp.

                    + */ + @Before + public void setUp() + { + parser = new MXParser(); + } + + /** + * Test ID:
                    ibm-not-wf-P80-ibm80n01.xml
                    + * Test URI:
                    not-wf/P80/ibm80n01.xml
                    + * Comment:
                    Tests EncodingDecl with a required field missing. The leading white      space is missing in the EncodingDecl in the XMLDecl.
                    + * Sections:
                    4.3.3
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P80_ibm80n01xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P80/ibm80n01.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests EncodingDecl with a required field missing. The leading white space is missing in the EncodingDecl in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected a space after version and not e" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P80-ibm80n02.xml
                    + * Test URI:
                    not-wf/P80/ibm80n02.xml
                    + * Comment:
                    Tests EncodingDecl with a required field missing. The "=" sign is      missing in the EncodingDecl in the XMLDecl.
                    + * Sections:
                    4.3.3
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P80_ibm80n02xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P80/ibm80n02.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests EncodingDecl with a required field missing. The \"=\" sign is missing in the EncodingDecl in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected equals sign (=) after encoding and not \"" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P80-ibm80n03.xml
                    + * Test URI:
                    not-wf/P80/ibm80n03.xml
                    + * Comment:
                    Tests EncodingDecl with a required field missing. The double quoted      EncName are missing in the EncodingDecl in the XMLDecl.
                    + * Sections:
                    4.3.3
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P80_ibm80n03xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P80/ibm80n03.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests EncodingDecl with a required field missing. The double quoted EncName are missing in the EncodingDecl in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected apostrophe (') or quotation mark (\") after encoding and not ?" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P80-ibm80n04.xml
                    + * Test URI:
                    not-wf/P80/ibm80n04.xml
                    + * Comment:
                    Tests EncodingDecl with wrong field ordering. The string "encoding="    occurs after the double quoted EncName in the EncodingDecl in the XMLDecl.
                    + * Sections:
                    4.3.3
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P80_ibm80n04xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P80/ibm80n04.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests EncodingDecl with wrong field ordering. The string \"encoding=\" occurs after the double quoted EncName in the EncodingDecl in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "unexpected character \"" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P80-ibm80n05.xml
                    + * Test URI:
                    not-wf/P80/ibm80n05.xml
                    + * Comment:
                    Tests EncodingDecl with wrong field ordering. The "encoding" occurs     after the double quoted EncName in the EncodingDecl in the XMLDecl.
                    + * Sections:
                    4.3.3
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P80_ibm80n05xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P80/ibm80n05.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests EncodingDecl with wrong field ordering. The \"encoding\" occurs after the double quoted EncName in the EncodingDecl in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "unexpected character \"" ) ); + } + } + + /** + * Test ID:
                    ibm-not-wf-P80-ibm80n06.xml
                    + * Test URI:
                    not-wf/P80/ibm80n06.xml
                    + * Comment:
                    Tests EncodingDecl with wrong key word. The string "Encoding" is      used as the key word in the EncodingDecl in the XMLDecl.
                    + * Sections:
                    4.3.3
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testibm_not_wf_P80_ibm80n06xml() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "not-wf/P80/ibm80n06.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "Tests EncodingDecl with wrong key word. The string \"Encoding\" is used as the key word in the EncodingDecl in the XMLDecl." ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "unexpected character E" ) ); + } + } + +} diff --git a/src/test/java/org/codehaus/plexus/util/xml/pull/MXParserPerfTest.java b/src/test/java/org/codehaus/plexus/util/xml/pull/MXParserPerfTest.java new file mode 100644 index 00000000..c4d1a74f --- /dev/null +++ b/src/test/java/org/codehaus/plexus/util/xml/pull/MXParserPerfTest.java @@ -0,0 +1,100 @@ +package org.codehaus.plexus.util.xml.pull; + +/* + * Copyright The Codehaus Foundation. + * + * Licensed 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. + */ + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.concurrent.TimeUnit; + +import org.codehaus.plexus.util.xml.Xpp3Dom; +import org.codehaus.plexus.util.xml.Xpp3DomBuilder; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; +import org.openjdk.jmh.runner.Runner; +import org.openjdk.jmh.runner.RunnerException; +import org.openjdk.jmh.runner.options.Options; +import org.openjdk.jmh.runner.options.OptionsBuilder; +import org.openjdk.jmh.runner.options.TimeValue; + +/** + *

                    MXParserPerfTest class.

                    + * + * @author herve + * @version $Id: $Id + * @since 3.4.0 + */ +@BenchmarkMode(Mode.Throughput) +@OutputTimeUnit(TimeUnit.MILLISECONDS) +@Warmup(iterations = 3, time = 3, timeUnit = TimeUnit.SECONDS) +public class MXParserPerfTest { + + @State(Scope.Benchmark) + static public class AdditionState { + + byte[] data; + + @Setup(Level.Iteration) + public void setUp() throws IOException, XmlPullParserException { + try (InputStream buf = getClass().getResourceAsStream( "/xml/pom.xml" ) ) + { + data = new byte[ buf.available() ]; + buf.read( data, 0, data.length ); + } + } + } + + + /** + *

                    benchmarkBuild.

                    + * + * @param state a {@link org.codehaus.plexus.util.xml.pull.MXParserPerfTest.AdditionState} object. + * @return a {@link org.codehaus.plexus.util.xml.Xpp3Dom} object. + * @throws java.io.IOException if any. + * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if any. + */ + @Benchmark + public Xpp3Dom benchmarkBuild( AdditionState state ) throws IOException, XmlPullParserException + { + return Xpp3DomBuilder.build( new ByteArrayInputStream( state.data ), null ); + } + + /** + *

                    main.

                    + * + * @param args a {@link java.lang.String} object. + * @throws org.openjdk.jmh.runner.RunnerException if any. + */ + public static void main( String... args ) + throws RunnerException + { + Options opts = new OptionsBuilder() + .measurementIterations( 3 ) + .measurementTime( TimeValue.milliseconds( 3000 ) ) + .forks( 1 ) + .include( "org.codehaus.plexus.util.xml.pull.MXParserPerfTest" ) + .build(); + new Runner( opts ).run(); + } +} diff --git a/src/test/java/org/codehaus/plexus/util/xml/pull/MXParserTest.java b/src/test/java/org/codehaus/plexus/util/xml/pull/MXParserTest.java index cdaa9b77..e0be666a 100644 --- a/src/test/java/org/codehaus/plexus/util/xml/pull/MXParserTest.java +++ b/src/test/java/org/codehaus/plexus/util/xml/pull/MXParserTest.java @@ -16,17 +16,37 @@ * limitations under the License. */ +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.EOFException; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; import java.io.StringReader; +import java.nio.file.Files; +import java.nio.file.Paths; -import junit.framework.TestCase; +import org.codehaus.plexus.util.ReaderFactory; +import org.junit.Test; /** + *

                    MXParserTest class.

                    + * * @author Trygve Laugstøl - * @version $Id$ + * @version $Id: $Id + * @since 3.4.0 */ public class MXParserTest - extends TestCase { + /** + *

                    testHexadecimalEntities.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testHexadecimalEntities() throws Exception { @@ -47,6 +67,12 @@ public void testHexadecimalEntities() assertEquals( XmlPullParser.END_TAG, parser.next() ); } + /** + *

                    testDecimalEntities.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testDecimalEntities() throws Exception { @@ -67,6 +93,12 @@ public void testDecimalEntities() assertEquals( XmlPullParser.END_TAG, parser.next() ); } + /** + *

                    testPredefinedEntities.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testPredefinedEntities() throws Exception { @@ -87,26 +119,239 @@ public void testPredefinedEntities() assertEquals( XmlPullParser.END_TAG, parser.next() ); } + /** + *

                    testEntityReplacementMap.

                    + * + * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if any. + * @throws java.io.IOException if any. + */ + @Test + public void testEntityReplacementMap() + throws XmlPullParserException, IOException + { + EntityReplacementMap erm = new EntityReplacementMap( new String[][] { { "abc", "CDE" }, { "EFG", "HIJ" } } ); + MXParser parser = new MXParser( erm ); + + String input = "&EFG;"; + parser.setInput( new StringReader( input ) ); + + assertEquals( XmlPullParser.START_TAG, parser.next() ); + assertEquals( XmlPullParser.TEXT, parser.next() ); + assertEquals( "HIJ", parser.getText() ); + assertEquals( XmlPullParser.END_TAG, parser.next() ); + } + + /** + *

                    testCustomEntities.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testCustomEntities() throws Exception { MXParser parser = new MXParser(); String input = "&myentity;"; - parser.setInput( new StringReader( input ) ); - parser.defineEntityReplacementText( "myentity", "replacement" ); - assertEquals( XmlPullParser.START_TAG, parser.next() ); - assertEquals( XmlPullParser.TEXT, parser.next() ); - assertEquals( "replacement", parser.getText() ); + assertEquals( XmlPullParser.END_TAG, parser.next() ); + parser = new MXParser(); + input = "&myCustom;"; + parser.setInput( new StringReader( input ) ); + parser.defineEntityReplacementText( "fo", "A" ); + parser.defineEntityReplacementText( "myCustom", "&fo;" ); + assertEquals( XmlPullParser.START_TAG, parser.next() ); + assertEquals( XmlPullParser.TEXT, parser.next() ); + assertEquals( "A", parser.getText() ); assertEquals( XmlPullParser.END_TAG, parser.next() ); } + /** + *

                    testUnicodeEntities.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testUnicodeEntities() + throws Exception + { + MXParser parser = new MXParser(); + String input = "𝟭"; + parser.setInput( new StringReader( input ) ); + + assertEquals( XmlPullParser.START_TAG, parser.nextToken() ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( "\uD835\uDFED", parser.getText() ); + assertEquals( XmlPullParser.END_TAG, parser.nextToken() ); + + parser = new MXParser(); + input = "ř"; + parser.setInput( new StringReader( input ) ); + + assertEquals( XmlPullParser.START_TAG, parser.nextToken() ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( "\u0159", parser.getText() ); + assertEquals( XmlPullParser.END_TAG, parser.nextToken() ); + } + + /** + *

                    testInvalidCharacterReferenceHexa.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testInvalidCharacterReferenceHexa() + throws Exception + { + MXParser parser = new MXParser(); + String input = ""; + parser.setInput( new StringReader( input ) ); + + try + { + assertEquals( XmlPullParser.START_TAG, parser.nextToken() ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + fail( "Should fail since � is an illegal character reference" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with hex value 110000) is invalid" ) ); + } + } + + /** + *

                    testValidCharacterReferenceHexa.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testValidCharacterReferenceHexa() + throws Exception + { + MXParser parser = new MXParser(); + String input = " Ȁ퟿ᄁ�𐀀􏿽􏿿"; + parser.setInput( new StringReader( input ) ); + + try + { + assertEquals( XmlPullParser.START_TAG, parser.nextToken() ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 0x9, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 0xA, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 0xD, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 0x20, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 0x200, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 0xD7FF, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 0xE000, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 0xFFA2, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 0xFFFD, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 0x10000, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 0x10FFFD, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 0x10FFFF, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.END_TAG, parser.nextToken() ); + } + catch ( XmlPullParserException e ) + { + fail( "Should success since the input represents all legal character references" ); + } + } + + /** + *

                    testInvalidCharacterReferenceDecimal.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testInvalidCharacterReferenceDecimal() + throws Exception + { + MXParser parser = new MXParser(); + String input = ""; + parser.setInput( new StringReader( input ) ); + + try + { + assertEquals( XmlPullParser.START_TAG, parser.nextToken() ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + fail( "Should fail since � is an illegal character reference" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with decimal value 1114112) is invalid" ) ); + } + } + + /** + *

                    testValidCharacterReferenceDecimal.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testValidCharacterReferenceDecimal() + throws Exception + { + MXParser parser = new MXParser(); + String input = + " Ȁ퟿ᄁ�𐀀􏿽􏿿"; + parser.setInput( new StringReader( input ) ); + + try + { + assertEquals( XmlPullParser.START_TAG, parser.nextToken() ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 9, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 10, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 13, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 32, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 512, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 55295, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 57344, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 65442, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 65533, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 65536, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 1114109, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.ENTITY_REF, parser.nextToken() ); + assertEquals( 1114111, parser.getText().codePointAt( 0 ) ); + assertEquals( XmlPullParser.END_TAG, parser.nextToken() ); + } + catch ( XmlPullParserException e ) + { + fail( "Should success since the input represents all legal character references" ); + } + } + + /** + *

                    testProcessingInstruction.

                    + * + * @throws java.lang.Exception if any. + */ + @Test public void testProcessingInstruction() throws Exception { @@ -120,4 +365,537 @@ public void testProcessingInstruction() assertEquals( XmlPullParser.TEXT, parser.nextToken() ); assertEquals( XmlPullParser.END_TAG, parser.nextToken() ); } + + /** + *

                    testProcessingInstructionsContainingXml.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testProcessingInstructionsContainingXml() + throws Exception + { + StringBuffer sb = new StringBuffer(); + + sb.append( "" ); + sb.append( "\n" ); + sb.append( " \n" ); + sb.append( " \n" ); + sb.append( " ?>\n" ); + sb.append( "" ); + + MXParser parser = new MXParser(); + parser.setInput( new StringReader( sb.toString() ) ); + + assertEquals( XmlPullParser.PROCESSING_INSTRUCTION, parser.nextToken() ); + assertEquals( XmlPullParser.START_TAG, parser.nextToken() ); + assertEquals( XmlPullParser.TEXT, parser.nextToken() ); // whitespace + assertEquals( XmlPullParser.PROCESSING_INSTRUCTION, parser.nextToken() ); + assertEquals( XmlPullParser.TEXT, parser.nextToken() ); // whitespace + assertEquals( XmlPullParser.END_TAG, parser.nextToken() ); + } + + /** + *

                    testSubsequentProcessingInstructionShort.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testSubsequentProcessingInstructionShort() + throws Exception + { + StringBuffer sb = new StringBuffer(); + + sb.append( "" ); + sb.append( "" ); + sb.append( "" ); + sb.append( "" ); + sb.append( "" ); + + MXParser parser = new MXParser(); + parser.setInput( new StringReader( sb.toString() ) ); + + assertEquals( XmlPullParser.PROCESSING_INSTRUCTION, parser.nextToken() ); + assertEquals( XmlPullParser.START_TAG, parser.nextToken() ); + assertEquals( XmlPullParser.COMMENT, parser.nextToken() ); + assertEquals( XmlPullParser.PROCESSING_INSTRUCTION, parser.nextToken() ); + assertEquals( XmlPullParser.END_TAG, parser.nextToken() ); + } + + /** + *

                    testSubsequentProcessingInstructionMoreThan8k.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testSubsequentProcessingInstructionMoreThan8k() + throws Exception + { + StringBuffer sb = new StringBuffer(); + + sb.append( "" ); + sb.append( "" ); + + // add ten times 1000 chars as comment + for ( int j = 0; j < 10; j++ ) + { + + sb.append( "" ); + } + + sb.append( "" ); + sb.append( "" ); + + MXParser parser = new MXParser(); + parser.setInput( new StringReader( sb.toString() ) ); + + assertEquals( XmlPullParser.PROCESSING_INSTRUCTION, parser.nextToken() ); + assertEquals( XmlPullParser.START_TAG, parser.nextToken() ); + assertEquals( XmlPullParser.COMMENT, parser.nextToken() ); + assertEquals( XmlPullParser.COMMENT, parser.nextToken() ); + assertEquals( XmlPullParser.COMMENT, parser.nextToken() ); + assertEquals( XmlPullParser.COMMENT, parser.nextToken() ); + assertEquals( XmlPullParser.COMMENT, parser.nextToken() ); + assertEquals( XmlPullParser.COMMENT, parser.nextToken() ); + assertEquals( XmlPullParser.COMMENT, parser.nextToken() ); + assertEquals( XmlPullParser.COMMENT, parser.nextToken() ); + assertEquals( XmlPullParser.COMMENT, parser.nextToken() ); + assertEquals( XmlPullParser.COMMENT, parser.nextToken() ); + assertEquals( XmlPullParser.PROCESSING_INSTRUCTION, parser.nextToken() ); + assertEquals( XmlPullParser.END_TAG, parser.nextToken() ); + } + + /** + *

                    testLargeText_NoOverflow.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testLargeText_NoOverflow() + throws Exception + { + StringBuffer sb = new StringBuffer(); + sb.append( "" ); + sb.append( "" ); + // Anything above 33,554,431 would fail without a fix for + // https://web.archive.org/web/20070831191548/http://www.extreme.indiana.edu/bugzilla/show_bug.cgi?id=228 + // with java.io.IOException: error reading input, returned 0 + sb.append( new String( new char[33554432] ) ); + sb.append( "" ); + + MXParser parser = new MXParser(); + parser.setInput( new StringReader( sb.toString() ) ); + + assertEquals( XmlPullParser.PROCESSING_INSTRUCTION, parser.nextToken() ); + assertEquals( XmlPullParser.START_TAG, parser.nextToken() ); + assertEquals( XmlPullParser.TEXT, parser.nextToken() ); + assertEquals( XmlPullParser.END_TAG, parser.nextToken() ); + } + + /** + *

                    testMalformedProcessingInstructionAfterTag.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testMalformedProcessingInstructionAfterTag() + throws Exception + { + MXParser parser = new MXParser(); + + String input = ""; + + parser.setInput( new StringReader( input ) ); + + try + { + assertEquals( XmlPullParser.START_TAG, parser.next() ); + + assertEquals( XmlPullParser.END_TAG, parser.next() ); + + assertEquals( XmlPullParser.PROCESSING_INSTRUCTION, parser.next() ); + + fail( "Should fail since it has an invalid Processing Instruction" ); + } + catch ( XmlPullParserException ex ) + { + assertTrue( ex.getMessage().contains( "processing instruction PITarget name not found" ) ); + } + } + + /** + *

                    testMalformedProcessingInstructionBeforeTag.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testMalformedProcessingInstructionBeforeTag() + throws Exception + { + MXParser parser = new MXParser(); + + String input = ""; + + parser.setInput( new StringReader( input ) ); + + try + { + assertEquals( XmlPullParser.PROCESSING_INSTRUCTION, parser.next() ); + + assertEquals( XmlPullParser.START_TAG, parser.next() ); + + assertEquals( XmlPullParser.END_TAG, parser.next() ); + + fail( "Should fail since it has invalid PI" ); + } + catch ( XmlPullParserException ex ) + { + assertTrue( ex.getMessage().contains( "processing instruction PITarget name not found" ) ); + } + } + + /** + *

                    testMalformedProcessingInstructionSpaceBeforeName.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testMalformedProcessingInstructionSpaceBeforeName() + throws Exception + { + MXParser parser = new MXParser(); + + StringBuilder sb = new StringBuilder(); + sb.append( "" ); + sb.append( "" ); + + parser.setInput( new StringReader( sb.toString() ) ); + + try + { + assertEquals( XmlPullParser.PROCESSING_INSTRUCTION, parser.next() ); + + assertEquals( XmlPullParser.START_TAG, parser.next() ); + + assertEquals( XmlPullParser.END_TAG, parser.next() ); + + fail( "Should fail since it has invalid PI" ); + } + catch ( XmlPullParserException ex ) + { + assertTrue( ex.getMessage().contains( "processing instruction PITarget must be exactly after testMalformedProcessingInstructionNoClosingQuestionMark.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testMalformedProcessingInstructionNoClosingQuestionMark() + throws Exception + { + MXParser parser = new MXParser(); + + StringBuilder sb = new StringBuilder(); + sb.append( "" ); + sb.append( "" ); + + parser.setInput( new StringReader( sb.toString() ) ); + + try + { + assertEquals( XmlPullParser.PROCESSING_INSTRUCTION, parser.next() ); + + assertEquals( XmlPullParser.START_TAG, parser.next() ); + + assertEquals( XmlPullParser.END_TAG, parser.next() ); + + fail( "Should fail since it has invalid PI" ); + } + catch ( XmlPullParserException ex ) + { + assertTrue( ex.getMessage().contains( "processing instruction started on line 1 and column 2 was not closed" ) ); + } + } + + /** + *

                    testSubsequentMalformedProcessingInstructionNoClosingQuestionMark.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testSubsequentMalformedProcessingInstructionNoClosingQuestionMark() + throws Exception + { + MXParser parser = new MXParser(); + + StringBuilder sb = new StringBuilder(); + sb.append( "" ); + sb.append( "" ); + + parser.setInput( new StringReader( sb.toString() ) ); + + try + { + assertEquals( XmlPullParser.START_TAG, parser.next() ); + + assertEquals( XmlPullParser.END_TAG, parser.next() ); + + assertEquals( XmlPullParser.PROCESSING_INSTRUCTION, parser.next() ); + + fail( "Should fail since it has invalid PI" ); + } + catch ( XmlPullParserException ex ) + { + assertTrue( ex.getMessage().contains( "processing instruction started on line 1 and column 13 was not closed" ) ); + } + } + + /** + *

                    testMalformedXMLRootElement.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testMalformedXMLRootElement() + throws Exception + { + String input = "" ) ); + } + } + + /** + *

                    testMalformedXMLRootElement2.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testMalformedXMLRootElement2() + throws Exception + { + String input = "" ) ); + } + } + + /** + *

                    testMalformedXMLRootElement3.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testMalformedXMLRootElement3() + throws Exception + { + String input = "" ) ); + } + } + + /** + *

                    testMalformedXMLRootElement4.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testMalformedXMLRootElement4() + throws Exception + { + String input = "some text" ) ); + } + } + + /** + *

                    testMalformedXMLRootElement5.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testMalformedXMLRootElement5() + throws Exception + { + String input = "some text
                    to close start tag " ) ); + } + } + + /** + *

                    testXMLDeclVersionOnly.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testXMLDeclVersionOnly() + throws Exception + { + String input = ""; + + MXParser parser = new MXParser(); + parser.setInput( new StringReader( input ) ); + + try + { + assertEquals( XmlPullParser.PROCESSING_INSTRUCTION, parser.nextToken() ); + assertEquals( XmlPullParser.START_TAG, parser.nextToken() ); + assertEquals( XmlPullParser.END_TAG, parser.nextToken() ); + } + catch ( Exception e ) + { + fail( "Should not throw Exception" ); + } + } + + /** + *

                    testXMLDeclVersionEncodingStandaloneNoSpace.

                    + * + * @throws java.lang.Exception if any. + */ + @Test + public void testXMLDeclVersionEncodingStandaloneNoSpace() + throws Exception + { + String input = ""; + + MXParser parser = new MXParser(); + parser.setInput( new StringReader( input ) ); + + try + { + parser.nextToken(); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "expected a space after encoding and not s" )); + } + } + + /** + * Issue 163: https://github.com/codehaus-plexus/plexus-utils/issues/163 + * + * @throws IOException if IO error. + * + * @since 3.4.1 + */ + @Test + public void testEncodingISO_8859_1setInputReader() + throws IOException + { + try ( Reader reader = + ReaderFactory.newXmlReader( new File( "src/test/resources/xml", "test-encoding-ISO-8859-1.xml" ) ) ) + { + MXParser parser = new MXParser(); + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + assertTrue( true ); + } + catch ( XmlPullParserException e ) + { + fail( "should not raise exception: " + e ); + } + } + + /** + * Issue 163: https://github.com/codehaus-plexus/plexus-utils/issues/163 + * + * @throws IOException if IO error. + * + * @since 3.4.1 + */ + @Test + public void testEncodingISO_8859_1_setInputStream() + throws IOException + { + try ( InputStream input = + Files.newInputStream( Paths.get( "src/test/resources/xml", "test-encoding-ISO-8859-1.xml" ) ) ) + { + MXParser parser = new MXParser(); + parser.setInput( input, null ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + assertTrue( true ); + } + catch ( XmlPullParserException e ) + { + fail( "should not raise exception: " + e ); + } + } + } diff --git a/src/test/java/org/codehaus/plexus/util/xml/pull/eduni_misc_Test_BjoernHoehrmannviaHST2013_09_18_Test.java b/src/test/java/org/codehaus/plexus/util/xml/pull/eduni_misc_Test_BjoernHoehrmannviaHST2013_09_18_Test.java new file mode 100644 index 00000000..854fb494 --- /dev/null +++ b/src/test/java/org/codehaus/plexus/util/xml/pull/eduni_misc_Test_BjoernHoehrmannviaHST2013_09_18_Test.java @@ -0,0 +1,283 @@ +package org.codehaus.plexus.util.xml.pull; + +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.Reader; +import java.nio.charset.StandardCharsets; + +import org.junit.Before; +import org.junit.Test; + +/** + * Test class that execute a particular set of tests associated to a TESCASES tag from the XML W3C Conformance Tests. + * TESCASES PROFILE:
                    Bjoern Hoehrmann via HST 2013-09-18
                    + * XML test files base folder:
                    xmlconf/eduni/misc/
                    + * + * @author Gabriel Belingueres + * @version $Id: $Id + * @since 3.4.0 + */ +public class eduni_misc_Test_BjoernHoehrmannviaHST2013_09_18_Test +{ + + final static File testResourcesDir = new File("src/test/resources/", "xmlconf/eduni/misc/"); + + MXParser parser; + + /** + *

                    setUp.

                    + */ + @Before + public void setUp() + { + parser = new MXParser(); + } + + /** + * Test ID:
                    hst-bh-001
                    + * Test URI:
                    001.xml
                    + * Comment:
                    decimal charref &#62; 10FFFF, indeed &#62; max 32 bit integer, checking for recovery from possible overflow
                    + * Sections:
                    2.2 [2], 4.1 [66]
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testhst_bh_001() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "001.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "decimal charref > 10FFFF, indeed > max 32 bit integer, checking for recovery from possible overflow" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with hex value FF000000F6) is invalid" ) ); + } + } + + /** + * Test ID:
                    hst-bh-002
                    + * Test URI:
                    002.xml
                    + * Comment:
                    hex charref &#62; 10FFFF, indeed &#62; max 32 bit integer, checking for recovery from possible overflow
                    + * Sections:
                    2.2 [2], 4.1 [66]
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testhst_bh_002() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "002.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "hex charref > 10FFFF, indeed > max 32 bit integer, checking for recovery from possible overflow" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with decimal value 4294967542) is invalid" ) ); + } + } + + /** + * Test ID:
                    hst-bh-003
                    + * Test URI:
                    003.xml
                    + * Comment:
                    decimal charref &#62; 10FFFF, indeed &#62; max 64 bit integer, checking for recovery from possible overflow
                    + * Sections:
                    2.2 [2], 4.1 [66]
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testhst_bh_003() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "003.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "decimal charref > 10FFFF, indeed > max 64 bit integer, checking for recovery from possible overflow" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with hex value FFFFFFFF000000F6) is invalid" ) ); + } + } + + /** + * Test ID:
                    hst-bh-004
                    + * Test URI:
                    004.xml
                    + * Comment:
                    hex charref &#62; 10FFFF, indeed &#62; max 64 bit integer, checking for recovery from possible overflow
                    + * Sections:
                    2.2 [2], 4.1 [66]
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testhst_bh_004() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "004.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "hex charref > 10FFFF, indeed > max 64 bit integer, checking for recovery from possible overflow" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "character reference (with decimal value 18446744073709551862) is invalid" ) ); + } + } + + /** + * Test ID:
                    hst-bh-005
                    + * Test URI:
                    005.xml
                    + * Comment:
                    xmlns:xml is an attribute as far as validation is concerned and must be declared
                    + * Sections:
                    3.1 [41]
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + * + * NOTE: This test is SKIPPED as MXParser do not supports DOCDECL parsing. + */ + // @Test + public void testhst_bh_005() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "005.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "xmlns:xml is an attribute as far as validation is concerned and must be declared" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( true ); + } + } + + /** + * Test ID:
                    hst-bh-006
                    + * Test URI:
                    006.xml
                    + * Comment:
                    xmlns:foo is an attribute as far as validation is concerned and must be declared
                    + * Sections:
                    3.1 [41]
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + * + * NOTE: This test is SKIPPED as MXParser do not supports DOCDECL parsing. + */ + // @Test + public void testhst_bh_006() + throws IOException + { + try ( Reader reader = new FileReader( new File( testResourcesDir, "006.xml" ) ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "xmlns:foo is an attribute as far as validation is concerned and must be declared" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( true ); + } + } + + /** + * Test ID:
                    hst-lhs-007
                    + * Test URI:
                    007.xml
                    + * Comment:
                    UTF-8 BOM plus xml decl of iso-8859-1 incompatible
                    + * Sections:
                    4.3.3
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testhst_lhs_007() + throws IOException + { + try ( FileInputStream is = new FileInputStream( new File( testResourcesDir, "007.xml" ) ); + InputStreamReader reader = new InputStreamReader( is, StandardCharsets.UTF_8 ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "UTF-8 BOM plus xml decl of iso-8859-1 incompatible" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "UTF-8 BOM plus xml decl of iso-8859-1 is incompatible" ) ); + } + } + + /** + * Test ID:
                    hst-lhs-008
                    + * Test URI:
                    008.xml
                    + * Comment:
                    UTF-16 BOM plus xml decl of utf-8 (using UTF-16 coding) incompatible
                    + * Sections:
                    4.3.3
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testhst_lhs_008() + throws IOException + { + try ( FileInputStream is = new FileInputStream( new File( testResourcesDir, "008.xml" ) ); + InputStreamReader reader = new InputStreamReader( is, StandardCharsets.UTF_16 ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "UTF-16 BOM plus xml decl of utf-8 (using UTF-16 coding) incompatible" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "UTF-16 BOM plus xml decl of utf-8 is incompatible" ) ); + } + } + + /** + * Test ID:
                    hst-lhs-009
                    + * Test URI:
                    009.xml
                    + * Comment:
                    UTF-16 BOM plus xml decl of utf-8 (using UTF-8 coding) incompatible
                    + * Sections:
                    4.3.3
                    + * Version: + * + * @throws java.io.IOException if there is an I/O error + */ + @Test + public void testhst_lhs_009() + throws IOException + { + try ( FileInputStream is = new FileInputStream( new File( testResourcesDir, "009.xml" ) ); + InputStreamReader reader = new InputStreamReader( is, StandardCharsets.UTF_8 ) ) + { + parser.setInput( reader ); + while ( parser.nextToken() != XmlPullParser.END_DOCUMENT ) + ; + fail( "UTF-16 BOM plus xml decl of utf-8 (using UTF-8 coding) incompatible" ); + } + catch ( XmlPullParserException e ) + { + assertTrue( e.getMessage().contains( "UTF-16 BOM in a UTF-8 encoded file is incompatible" ) ); + } + } + +} diff --git a/src/test/resources/dir-layout-copy/dir1/dir2/.gitignore b/src/test/resources/dir-layout-copy/dir1/dir2/.gitignore new file mode 100644 index 00000000..695fc818 --- /dev/null +++ b/src/test/resources/dir-layout-copy/dir1/dir2/.gitignore @@ -0,0 +1 @@ +# just here to make the directory non-empty diff --git a/src/test/resources/dir-layout-copy/empty-dir/.gitignore b/src/test/resources/dir-layout-copy/empty-dir/.gitignore new file mode 100644 index 00000000..695fc818 --- /dev/null +++ b/src/test/resources/dir-layout-copy/empty-dir/.gitignore @@ -0,0 +1 @@ +# just here to make the directory non-empty diff --git a/src/test/resources/directory-scanner/foo/bar/munchy.txt b/src/test/resources/directory-scanner/foo/bar/munchy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/symlinks/dirOnTheOutside/FileInDirOnTheOutside.txt b/src/test/resources/symlinks/dirOnTheOutside/FileInDirOnTheOutside.txt new file mode 100644 index 00000000..8ce65d7a --- /dev/null +++ b/src/test/resources/symlinks/dirOnTheOutside/FileInDirOnTheOutside.txt @@ -0,0 +1 @@ +I am on the outside... diff --git a/src/test/resources/symlinks/onTheOutside.txt b/src/test/resources/symlinks/onTheOutside.txt new file mode 100644 index 00000000..ee7733b5 --- /dev/null +++ b/src/test/resources/symlinks/onTheOutside.txt @@ -0,0 +1 @@ +I am on the outside of the src diff --git a/src/test/resources/symlinks/regen.sh b/src/test/resources/symlinks/regen.sh new file mode 100755 index 00000000..f3c3a9d7 --- /dev/null +++ b/src/test/resources/symlinks/regen.sh @@ -0,0 +1,6 @@ +rm symlinks.zip +rm symlinks.tar +cd src +zip --symlinks ../symlinks.zip file* targetDir sym* +tar -cvf ../symlinks.tar file* targetDir sym* + diff --git a/src/test/resources/symlinks/src/aRegularDir/aRegularFile.txt b/src/test/resources/symlinks/src/aRegularDir/aRegularFile.txt new file mode 100644 index 00000000..6d542ad7 --- /dev/null +++ b/src/test/resources/symlinks/src/aRegularDir/aRegularFile.txt @@ -0,0 +1 @@ +I am just an ordinary file diff --git a/src/test/resources/symlinks/src/fileR.txt b/src/test/resources/symlinks/src/fileR.txt new file mode 100644 index 00000000..44e5c844 --- /dev/null +++ b/src/test/resources/symlinks/src/fileR.txt @@ -0,0 +1 @@ +This file is a source. r r r filemode diff --git a/src/test/resources/symlinks/src/fileW.txt b/src/test/resources/symlinks/src/fileW.txt new file mode 100755 index 00000000..64fc294f --- /dev/null +++ b/src/test/resources/symlinks/src/fileW.txt @@ -0,0 +1 @@ +all w diff --git a/src/test/resources/symlinks/src/fileX.txt b/src/test/resources/symlinks/src/fileX.txt new file mode 100755 index 00000000..d6459e00 --- /dev/null +++ b/src/test/resources/symlinks/src/fileX.txt @@ -0,0 +1 @@ +xxx diff --git a/src/test/resources/symlinks/src/symDir b/src/test/resources/symlinks/src/symDir new file mode 120000 index 00000000..29b5d5c2 --- /dev/null +++ b/src/test/resources/symlinks/src/symDir @@ -0,0 +1 @@ +targetDir/ \ No newline at end of file diff --git a/src/test/resources/symlinks/src/symLinkToDirOnTheOutside b/src/test/resources/symlinks/src/symLinkToDirOnTheOutside new file mode 120000 index 00000000..eec25f54 --- /dev/null +++ b/src/test/resources/symlinks/src/symLinkToDirOnTheOutside @@ -0,0 +1 @@ +../dirOnTheOutside/ \ No newline at end of file diff --git a/src/test/resources/symlinks/src/symLinkToFileOnTheOutside b/src/test/resources/symlinks/src/symLinkToFileOnTheOutside new file mode 120000 index 00000000..fd1227b8 --- /dev/null +++ b/src/test/resources/symlinks/src/symLinkToFileOnTheOutside @@ -0,0 +1 @@ +../onTheOutside.txt \ No newline at end of file diff --git a/src/test/resources/symlinks/src/symR b/src/test/resources/symlinks/src/symR new file mode 120000 index 00000000..114a517d --- /dev/null +++ b/src/test/resources/symlinks/src/symR @@ -0,0 +1 @@ +fileR.txt \ No newline at end of file diff --git a/src/test/resources/symlinks/src/symW b/src/test/resources/symlinks/src/symW new file mode 120000 index 00000000..19a642cc --- /dev/null +++ b/src/test/resources/symlinks/src/symW @@ -0,0 +1 @@ +fileW.txt \ No newline at end of file diff --git a/src/test/resources/symlinks/src/symX b/src/test/resources/symlinks/src/symX new file mode 120000 index 00000000..2d8a735a --- /dev/null +++ b/src/test/resources/symlinks/src/symX @@ -0,0 +1 @@ +fileX.txt \ No newline at end of file diff --git a/src/test/resources/symlinks/src/targetDir/targetFile.txt b/src/test/resources/symlinks/src/targetDir/targetFile.txt new file mode 100644 index 00000000..1ded16bd --- /dev/null +++ b/src/test/resources/symlinks/src/targetDir/targetFile.txt @@ -0,0 +1 @@ +This is a target file diff --git a/src/test/resources/symlinks/symlinks.tar b/src/test/resources/symlinks/symlinks.tar new file mode 100644 index 00000000..1b1cdbfa Binary files /dev/null and b/src/test/resources/symlinks/symlinks.tar differ diff --git a/src/test/resources/symlinks/symlinks.zip b/src/test/resources/symlinks/symlinks.zip new file mode 100644 index 00000000..4de888b5 Binary files /dev/null and b/src/test/resources/symlinks/symlinks.zip differ diff --git a/src/test/resources/test.xdoc.xhtml b/src/test/resources/test.xdoc.xhtml index a342aedc..564bf676 100644 --- a/src/test/resources/test.xdoc.xhtml +++ b/src/test/resources/test.xdoc.xhtml @@ -1,109 +1,109 @@ - - - - Title - - - - - -

                    Paragraph 1, line 1. Paragraph 1, line 2.

                    -

                    Paragraph 2, line 1. Paragraph 2, line 2.

                    -
                    -

                    Section title

                    -
                    -

                    Sub-section title

                    -
                    -

                    Sub-sub-section title

                    -
                    -
                    Sub-sub-sub-section
                    -
                    -
                    Sub-sub-sub-sub-section
                    -
                      -
                    • List item 1.
                    • -
                    • List item 2. - - - + + + + Title + + + + + +

                      Paragraph 1, line 1. Paragraph 1, line 2.

                      +

                      Paragraph 2, line 1. Paragraph 2, line 2.

                      +
                      +

                      Section title

                      +
                      +

                      Sub-section title

                      +
                      +

                      Sub-sub-section title

                      +
                      +
                      Sub-sub-sub-section
                      +
                      +
                      Sub-sub-sub-sub-section
                      +
                        +
                      • List item 1.
                      • +
                      • List item 2. -

                        Paragraph contained in list item 2.

                        -
                          -
                        • Sub-list item 1.
                        • -
                        • Sub-list item 2.
                        • -
                        -
                      • -
                      • List item 3. Force end of list:
                      • -
                      -
                      -
                      Verbatim text not contained in list item 3
                      -
                      -
                        + + + +

                        Paragraph contained in list item 2.

                        +
                          +
                        • Sub-list item 1.
                        • +
                        • Sub-list item 2.
                        • +
                        + +
                      1. List item 3. Force end of list:
                      2. +
                    +
                    +
                    Verbatim text not contained in list item 3
                    +
                    +
                    1. Numbered item 1. -
                        -
                      1. Numbered item A.
                      2. -
                      3. Numbered item B.
                      4. -
                      -
                    2. -
                    3. Numbered item 2.
                    4. -
                    -

                    List numbering schemes: [[1]], [[a]], [[A]], [[i]], [[I]].

                    -
                    -
                    - Defined term 1 -
                    -
                    of definition list.
                    -
                    - Defined term 2 -
                    +
                      +
                    1. Numbered item A.
                    2. +
                    3. Numbered item B.
                    4. +
                    + +
                  • Numbered item 2.
                  • + +

                    List numbering schemes: [[1]], [[a]], [[A]], [[i]], [[I]].

                    +
                    +
                    + Defined term 1 +
                    +
                    of definition list.
                    +
                    + Defined term 2 +
                    of definition list. -
                    +
                    Verbatim text
                    -                            in a box        
                    -
                    -
                    -
                    -

                    --- instead of +-- suppresses the box around verbatim text.

                    - Figure caption - - - - - - - - - - - -
                    Centered
                    cell 1,1
                    Left-aligned
                    cell 1,2
                    Right-aligned
                    cell 1,3
                    cell 2,1cell 2,2cell 2,3
                    -

                    - Table caption -

                    -

                    No grid, no caption:

                    - - - - - - - - - -
                    cellcell
                    cellcell
                    -

                    Horizontal line:

                    -
                    -

                    New page.

                    -

                    - Italic font. Bold font. Monospaced font.

                    -

                    + in a box +

                    + + +

                    --- instead of +-- suppresses the box around verbatim text.

                    + Figure caption + + + + + + + + + + + +
                    Centered
                    cell 1,1
                    Left-aligned
                    cell 1,2
                    Right-aligned
                    cell 1,3
                    cell 2,1cell 2,2cell 2,3
                    +

                    + Table caption +

                    +

                    No grid, no caption:

                    + + + + + + + + + +
                    cellcell
                    cellcell
                    +

                    Horizontal line:

                    +
                    +

                    New page.

                    +

                    + Italic font. Bold font. Monospaced font.

                    +

                    Anchor. Link to Anchor. Link to http://www.pixware.fr. Link to showing alternate text. Link to Pixware home page. -

                    -

                    Force line
                    break.

                    -

                    Non breaking space.

                    +

                    +

                    Force line
                    break.

                    +

                    Non breaking space.

                    Escaped special characters:
                    ~
                    =
                    @@ -115,12 +115,12 @@ {
                    }
                    \ -

                    -

                    Copyright symbol: ©©©.

                    -
                    -
                    -
                    -
                    -
                    - +

                    +

                    Copyright symbol: ©©©.

                    +
                    + + + + + \ No newline at end of file diff --git a/src/test/resources/xml/pom.xml b/src/test/resources/xml/pom.xml new file mode 100644 index 00000000..6aa94399 --- /dev/null +++ b/src/test/resources/xml/pom.xml @@ -0,0 +1,140 @@ + + + + + + 4.0.0 + + + org.codehaus.plexus + plexus + 6.5 + + + plexus-utils + 3.4.0-SNAPSHOT + + Plexus Common Utilities + A collection of various utility classes to ease working with strings, files, command lines, XML and + more. + + + + scm:git:git@github.com:codehaus-plexus/plexus-utils.git + scm:git:git@github.com:codehaus-plexus/plexus-utils.git + http://github.com/codehaus-plexus/plexus-utils + HEAD + + + github + http://github.com/codehaus-plexus/plexus-utils/issues + + + + github:gh-pages + ${project.scm.developerConnection} + + + + + 2020-01-20T18:52:37Z + + + + + org.apache.maven.shared + maven-plugin-testing-harness + 1.1 + test + + + org.openjdk.jmh + jmh-core + 1.26 + test + + + org.openjdk.jmh + jmh-generator-annprocess + 1.26 + test + + + + + + + + org.apache.maven.plugins + maven-resources-plugin + + 2.7 + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + + + + org.apache.maven.plugins + maven-scm-publish-plugin + + ${project.reporting.outputDirectory} + + + + scm-publish + site-deploy + + publish-scm + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + true + + org/codehaus/plexus/util/FileBasedTestCase.java + **/Test*.java + + + + JAVA_HOME + ${JAVA_HOME} + + + M2_HOME + ${M2_HOME} + + + + + + + + diff --git a/src/test/resources/xml/test-encoding-ISO-8859-1.xml b/src/test/resources/xml/test-encoding-ISO-8859-1.xml new file mode 100644 index 00000000..ae0aefe7 --- /dev/null +++ b/src/test/resources/xml/test-encoding-ISO-8859-1.xml @@ -0,0 +1,1503 @@ + + + + 4.0.0 + + org.apache + apache + 16 + + org.apache.commons + commons-parent + pom + 39 + Apache Commons Parent + http://commons.apache.org/ + The Apache Commons Parent POM provides common settings for all Apache Commons components. + + + + + + 3.0.1 + + + + continuum + https://continuum-ci.apache.org/ + + + + + + + scm:svn:http://svn.apache.org/repos/asf/commons/proper/commons-parent/tags/commons-parent-39 + scm:svn:https://svn.apache.org/repos/asf/commons/proper/commons-parent/tags/commons-parent-39 + http://svn.apache.org/viewvc/commons/proper/commons-parent/tags/commons-parent-39 + + + + + + + + Commons User List + user-subscribe@commons.apache.org + user-unsubscribe@commons.apache.org + user@commons.apache.org + http://mail-archives.apache.org/mod_mbox/commons-user/ + + http://markmail.org/list/org.apache.commons.users/ + http://old.nabble.com/Commons---User-f319.html + http://www.mail-archive.com/user@commons.apache.org/ + http://news.gmane.org/gmane.comp.jakarta.commons.user + + + + Commons Dev List + dev-subscribe@commons.apache.org + dev-unsubscribe@commons.apache.org + dev@commons.apache.org + http://mail-archives.apache.org/mod_mbox/commons-dev/ + + http://markmail.org/list/org.apache.commons.dev/ + http://old.nabble.com/Commons---Dev-f317.html + http://www.mail-archive.com/dev@commons.apache.org/ + http://news.gmane.org/gmane.comp.jakarta.commons.devel + + + + Commons Issues List + issues-subscribe@commons.apache.org + issues-unsubscribe@commons.apache.org + http://mail-archives.apache.org/mod_mbox/commons-issues/ + + http://markmail.org/list/org.apache.commons.issues/ + http://old.nabble.com/Commons---Issues-f25499.html + http://www.mail-archive.com/issues@commons.apache.org/ + + + + Commons Commits List + commits-subscribe@commons.apache.org + commits-unsubscribe@commons.apache.org + http://mail-archives.apache.org/mod_mbox/commons-commits/ + + http://markmail.org/list/org.apache.commons.commits/ + http://www.mail-archive.com/commits@commons.apache.org/ + + + + Apache Announce List + announce-subscribe@apache.org + announce-unsubscribe@apache.org + http://mail-archives.apache.org/mod_mbox/www-announce/ + + http://markmail.org/list/org.apache.announce/ + http://old.nabble.com/Apache-News-and-Announce-f109.html + http://www.mail-archive.com/announce@apache.org/ + http://news.gmane.org/gmane.comp.apache.announce + + + + + + + + + src/main/resources + + + + ${basedir} + META-INF + + NOTICE.txt + LICENSE.txt + + + + + + + + src/test/resources + + + + ${basedir} + META-INF + + NOTICE.txt + LICENSE.txt + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + org.apache.maven.plugins + maven-assembly-plugin + 2.5.5 + + + org.apache.maven.plugins + maven-clean-plugin + 2.6.1 + + + org.apache.maven.plugins + maven-compiler-plugin + ${commons.compiler.version} + + ${maven.compiler.source} + ${maven.compiler.target} + ${commons.encoding} + + ${commons.compiler.fork} + + ${commons.compiler.compilerVersion} + ${commons.compiler.javac} + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + org.apache.maven.plugins + maven-install-plugin + 2.5.2 + + + + org.apache.maven.plugins + maven-jar-plugin + 2.6 + + + org.apache.maven.plugins + maven-javadoc-plugin + ${commons.javadoc.version} + + + true + ${commons.encoding} + ${commons.docEncoding} + true + + ${commons.javadoc.java.link} + ${commons.javadoc.javaee.link} + + + + true + true + + + + + + org.apache.maven.plugins + maven-release-plugin + 2.5.2 + + + + org.apache.maven.plugins + maven-remote-resources-plugin + + 1.5 + + + true + + + + org.apache.maven.plugins + maven-resources-plugin + 2.7 + + + + org.apache.maven.plugins + maven-site-plugin + ${commons.site-plugin.version} + + + true + + + + + org.apache.maven.wagon + wagon-ssh + ${commons.wagon-ssh.version} + + + + + attach-descriptor + + attach-descriptor + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.4 + + + + true + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${commons.surefire.version} + + + + org.apache.commons + commons-build-plugin + 1.4 + + ${commons.release.name} + + + + org.apache.felix + maven-bundle-plugin + 2.5.3 + true + + + org.apache.rat + apache-rat-plugin + ${commons.rat.version} + + + org.codehaus.mojo + build-helper-maven-plugin + 1.9.1 + + + org.codehaus.mojo + buildnumber-maven-plugin + 1.3 + + + org.codehaus.mojo + clirr-maven-plugin + ${commons.clirr.version} + + ${minSeverity} + + + + + + + + + + maven-assembly-plugin + + + src/assembly/src.xml + + gnu + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + javadoc.resources + generate-sources + + run + + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + true + org.apache.maven.plugins + maven-enforcer-plugin + 1.3.1 + + + enforce-maven-3 + + enforce + + + + + 3.0.0 + + + true + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${commons.manifestfile} + + ${project.name} + ${project.version} + ${project.organization.name} + ${project.name} + ${project.version} + ${project.organization.name} + org.apache + ${implementation.build} + ${maven.compiler.source} + ${maven.compiler.target} + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + ${commons.surefire.java} + + + + + org.apache.commons + commons-build-plugin + + + org.apache.felix + maven-bundle-plugin + + + + true + + ${commons.osgi.excludeDependencies} + ${project.build.directory}/osgi + + + <_nouses>true + + <_removeheaders>JAVA_1_3_HOME,JAVA_1_4_HOME,JAVA_1_5_HOME,JAVA_1_6_HOME,JAVA_1_7_HOME,JAVA_1_8_HOME,JAVA_1_9_HOME + ${commons.osgi.symbolicName} + ${commons.osgi.export} + ${commons.osgi.private} + ${commons.osgi.import} + ${commons.osgi.dynamicImport} + ${project.url} + + + + + bundle-manifest + process-classes + + manifest + + + + + + + org.apache.rat + apache-rat-plugin + ${commons.rat.version} + + + + + site-content/** + .checkstyle + .fbprefs + .pmd + src/site/resources/download_*.cgi + src/site/resources/profile.* + + + + + + org.apache.maven.plugins + maven-scm-publish-plugin + ${commons.scm-publish.version} + + ${project.reporting.outputDirectory} + scm:svn:${commons.scmPubUrl} + ${commons.scmPubCheckoutDirectory} + ${commons.scmPubServer} + true + + + + scm-publish + site-deploy + + publish-scm + + + + + + + + + + + + + + org.apache.maven.plugins + maven-changes-plugin + ${commons.changes.version} + + ${basedir}/src/changes/changes.xml + Fix Version,Key,Component,Summary,Type,Resolution,Status + + Fix Version DESC,Type,Key DESC + Fixed + Resolved,Closed + + Bug,New Feature,Task,Improvement,Wish,Test + + true + ${commons.changes.onlyCurrentVersion} + ${commons.changes.maxEntries} + ${commons.changes.runOnlyAtExecutionRoot} + + + + + changes-report + jira-report + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${commons.javadoc.version} + + + true + ${maven.compiler.source} + ${commons.encoding} + ${commons.docEncoding} + true + true + + true + + ${commons.javadoc.java.link} + ${commons.javadoc.javaee.link} + + + + + + default + + javadoc + + + + + + org.apache.maven.plugins + maven-jxr-plugin + ${commons.jxr.version} + + + org.apache.maven.plugins + maven-project-info-reports-plugin + ${commons.project-info.version} + + + + + index + summary + modules + + project-team + scm + issue-tracking + mailing-list + dependency-info + dependency-management + dependencies + dependency-convergence + cim + + + distribution-management + + + + + + org.apache.maven.plugins + maven-site-plugin + ${commons.site-plugin.version} + + + + navigation.xml,changes.xml + + + + + org.apache.maven.plugins + maven-surefire-report-plugin + ${commons.surefire-report.version} + + ${commons.surefire-report.aggregate} + + + + + org.apache.rat + apache-rat-plugin + ${commons.rat.version} + + + + + site-content/** + .checkstyle + .fbprefs + .pmd + src/site/resources/download_*.cgi + src/site/resources/profile.* + + + + + org.codehaus.mojo + clirr-maven-plugin + ${commons.clirr.version} + + ${minSeverity} + + + + org.codehaus.mojo + jdepend-maven-plugin + ${commons.jdepend.version} + + + + + + + + + parse-target-version + + + + user.home + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + parse-version + + + parse-version + + + javaTarget + ${maven.compiler.target} + + + + + + + + + + + + animal-sniffer + + + + src/site/resources/profile.noanimal + + + + + + java${javaTarget.majorVersion}${javaTarget.minorVersion} + + + + + + + + org.codehaus.mojo + animal-sniffer-maven-plugin + ${commons.animal-sniffer.version} + + + checkAPIcompatibility + + + + check + + + + + + org.codehaus.mojo.signature + ${animal-sniffer.signature} + ${commons.animal-sniffer.signature.version} + + + + + + + + + + jacoco + + + + src/site/resources/profile.jacoco + + + + + + org.jacoco + jacoco-maven-plugin + ${commons.jacoco.version} + + + + prepare-agent + process-test-classes + + prepare-agent + + + + report + site + + report + + + + check + + check + + + + + BUNDLE + + + CLASS + COVEREDRATIO + ${commons.jacoco.classRatio} + + + INSTRUCTION + COVEREDRATIO + ${commons.jacoco.instructionRatio} + + + METHOD + COVEREDRATIO + ${commons.jacoco.methodRatio} + + + BRANCH + COVEREDRATIO + ${commons.jacoco.branchRatio} + + + LINE + COVEREDRATIO + ${commons.jacoco.lineRatio} + + + COMPLEXITY + COVEREDRATIO + ${commons.jacoco.complexityRatio} + + + + + ${commons.jacoco.haltOnFailure} + + + + + + + + + + org.jacoco + jacoco-maven-plugin + ${commons.jacoco.version} + + + + + + + cobertura + + + src/site/resources/profile.cobertura + + + + + + org.codehaus.mojo + cobertura-maven-plugin + ${commons.cobertura.version} + + + + + + + + release + + + + + maven-gpg-plugin + + ${gpg.passphrase} + + + + sign-artifacts + verify + + sign + + + + + + maven-install-plugin + + true + + + + maven-source-plugin + + + create-source-jar + + jar + test-jar + + + + + + maven-jar-plugin + + + + test-jar + + + + true + + + + + + maven-release-plugin + + + -Prelease + + + + maven-javadoc-plugin + + + create-javadoc-jar + + javadoc + jar + + package + + + + ${maven.compiler.source} + + + + maven-assembly-plugin + true + + + + single + + package + + + + + + + + + + apache-release + + + + maven-release-plugin + + apache-release + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-test-sources + + test-jar + + + + + + maven-install-plugin + + true + + + + org.apache.maven.plugins + maven-jar-plugin + + + + test-jar + + + + + + + + + + + java-1.3 + + true + 1.3 + ${JAVA_1_3_HOME}/bin/javac + ${JAVA_1_3_HOME}/bin/java + + + + + + java-1.4 + + true + 1.4 + ${JAVA_1_4_HOME}/bin/javac + ${JAVA_1_4_HOME}/bin/java + + 2.11 + + + + + + java-1.5 + + true + 1.5 + ${JAVA_1_5_HOME}/bin/javac + ${JAVA_1_5_HOME}/bin/java + + + + + + java-1.6 + + true + 1.6 + ${JAVA_1_6_HOME}/bin/javac + ${JAVA_1_6_HOME}/bin/java + + + + + + java-1.7 + + true + 1.7 + ${JAVA_1_7_HOME}/bin/javac + ${JAVA_1_7_HOME}/bin/java + + + + + + java-1.8 + + true + 1.8 + ${JAVA_1_8_HOME}/bin/javac + ${JAVA_1_8_HOME}/bin/java + + + + + + java-1.9 + + true + 1.9 + ${JAVA_1_9_HOME}/bin/javac + ${JAVA_1_9_HOME}/bin/java + + + + + + + + test-deploy + + id::default::file:target/deploy + + + + + + release-notes + + + + org.apache.maven.plugins + maven-changes-plugin + ${commons.changes.version} + + + src/changes + true + . + RELEASE-NOTES.txt + + ${commons.release.version} + + + + + create-release-notes + generate-resources + + announcement-generate + + + + + + + + + + + svn-buildnumber + + + !buildNumber.skip + !true + + + + + + org.codehaus.mojo + buildnumber-maven-plugin + + + generate-resources + + create + + + + + + true + + ?????? + false + false + + + + + + + + javasvn + + + + org.codehaus.mojo + buildnumber-maven-plugin + + + javasvn + + + + + + + + + jdk7-plugin-fix-version + + [1.7,) + + + + 3.0.0 + + 1.14 + + + + + + site-basic + + true + true + true + true + true + true + true + true + true + true + + + + + + + + ${project.version} + RC1 + COMMONSSITE + + + + 1.3 + 1.3 + + + false + + + + + + 2.18.1 + 2.18.1 + 2.10.3 + 0.11 + 2.11 + 2.6.1 + 2.5 + 2.8 + 2.8 + 3.4 + 0.7.5.201505241946 + 2.7 + 2.0 + 3.3 + 1.1 + 2.5.5 + + 1.11 + + 1.0 + + + ${project.artifactId}-${commons.release.version} + + -bin + ${project.artifactId}-${commons.release.2.version} + + -bin + ${project.artifactId}-${commons.release.3.version} + + -bin + + + 1.00 + 0.90 + 0.95 + 0.85 + 0.85 + 0.90 + false + + + ${project.artifactId} + + + org.apache.commons.${commons.componentid} + org.apache.commons.*;version=${project.version};-noimport:=true + * + + + true + + + ${project.build.directory}/osgi/MANIFEST.MF + + + scp + + + iso-8859-1 + + ${commons.encoding} + + ${commons.encoding} + + ${commons.encoding} + + + http://docs.oracle.com/javase/7/docs/api/ + http://docs.oracle.com/javaee/6/api/ + + + yyyy-MM-dd HH:mm:ssZ + ${scmBranch}@r${buildNumber}; ${maven.build.timestamp} + + + info + + + 100 + + + false + + + false + + 100 + + false + + + ${user.home}/commons-sites + + ${project.artifactId} + + https://svn.apache.org/repos/infra/websites/production/commons/content/proper/${project.artifactId} + ${commons.site.cache}/${commons.site.path} + commons.site + + https://analysis.apache.org/ + + + + diff --git a/src/test/resources/xmlconf/eduni/misc/001.xml b/src/test/resources/xmlconf/eduni/misc/001.xml new file mode 100644 index 00000000..76de9900 --- /dev/null +++ b/src/test/resources/xmlconf/eduni/misc/001.xml @@ -0,0 +1,4 @@ + +]> +

                    Fa�il

                    diff --git a/src/test/resources/xmlconf/eduni/misc/002.xml b/src/test/resources/xmlconf/eduni/misc/002.xml new file mode 100644 index 00000000..943d284e --- /dev/null +++ b/src/test/resources/xmlconf/eduni/misc/002.xml @@ -0,0 +1,4 @@ + +]> +

                    Fa�il

                    diff --git a/src/test/resources/xmlconf/eduni/misc/003.xml b/src/test/resources/xmlconf/eduni/misc/003.xml new file mode 100644 index 00000000..c2fb6990 --- /dev/null +++ b/src/test/resources/xmlconf/eduni/misc/003.xml @@ -0,0 +1,4 @@ + +]> +

                    Fa�il

                    diff --git a/src/test/resources/xmlconf/eduni/misc/004.xml b/src/test/resources/xmlconf/eduni/misc/004.xml new file mode 100644 index 00000000..1e83a946 --- /dev/null +++ b/src/test/resources/xmlconf/eduni/misc/004.xml @@ -0,0 +1,4 @@ + +]> +

                    Fa�il

                    diff --git a/src/test/resources/xmlconf/eduni/misc/005.xml b/src/test/resources/xmlconf/eduni/misc/005.xml new file mode 100644 index 00000000..d353623a --- /dev/null +++ b/src/test/resources/xmlconf/eduni/misc/005.xml @@ -0,0 +1,2 @@ + ]> + diff --git a/src/test/resources/xmlconf/eduni/misc/006.xml b/src/test/resources/xmlconf/eduni/misc/006.xml new file mode 100644 index 00000000..5234f760 --- /dev/null +++ b/src/test/resources/xmlconf/eduni/misc/006.xml @@ -0,0 +1,2 @@ + ]> + diff --git a/src/test/resources/xmlconf/eduni/misc/007.xml b/src/test/resources/xmlconf/eduni/misc/007.xml new file mode 100644 index 00000000..2da5d51b --- /dev/null +++ b/src/test/resources/xmlconf/eduni/misc/007.xml @@ -0,0 +1 @@ + diff --git a/src/test/resources/xmlconf/eduni/misc/008.xml b/src/test/resources/xmlconf/eduni/misc/008.xml new file mode 100644 index 00000000..ef5f345f Binary files /dev/null and b/src/test/resources/xmlconf/eduni/misc/008.xml differ diff --git a/src/test/resources/xmlconf/eduni/misc/009.xml b/src/test/resources/xmlconf/eduni/misc/009.xml new file mode 100644 index 00000000..8c786226 --- /dev/null +++ b/src/test/resources/xmlconf/eduni/misc/009.xml @@ -0,0 +1 @@ + diff --git a/src/test/resources/xmlconf/eduni/misc/ht-bh.xml b/src/test/resources/xmlconf/eduni/misc/ht-bh.xml new file mode 100644 index 00000000..bd238312 --- /dev/null +++ b/src/test/resources/xmlconf/eduni/misc/ht-bh.xml @@ -0,0 +1,37 @@ + + + +decimal charref > 10FFFF, indeed > max 32 bit integer, checking for recovery +from possible overflow + + +hex charref > 10FFFF, indeed > max 32 bit integer, checking for recovery +from possible overflow + + +decimal charref > 10FFFF, indeed > max 64 bit integer, checking for recovery +from possible overflow + + +hex charref > 10FFFF, indeed > max 64 bit integer, checking for recovery +from possible overflow + + +xmlns:xml is an attribute as far as validation is concerned and must +be declared + + +xmlns:foo is an attribute as far as validation is concerned and must +be declared + + +UTF-8 BOM plus xml decl of iso-8859-1 incompatible + + +UTF-16 BOM plus xml decl of utf-8 (using UTF-16 coding) incompatible + + +UTF-16 BOM plus xml decl of utf-8 (using UTF-8 coding) incompatible + + + diff --git a/src/test/resources/xmlconf/eduni/misc/xmlconf.xml b/src/test/resources/xmlconf/eduni/misc/xmlconf.xml new file mode 100644 index 00000000..f42f5dc3 --- /dev/null +++ b/src/test/resources/xmlconf/eduni/misc/xmlconf.xml @@ -0,0 +1,19 @@ + + + + +] > + + + &eduni-misc; + + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n01.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n01.xml new file mode 100755 index 00000000..867386a2 Binary files /dev/null and b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n01.xml differ diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n02.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n02.xml new file mode 100755 index 00000000..09845356 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n02.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n03.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n03.xml new file mode 100755 index 00000000..8fb98db7 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n03.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n04.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n04.xml new file mode 100755 index 00000000..35ebb812 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n04.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n05.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n05.xml new file mode 100755 index 00000000..4847c52f --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n05.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n06.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n06.xml new file mode 100755 index 00000000..f4b3fea9 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n06.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n07.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n07.xml new file mode 100755 index 00000000..70b39a42 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n07.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n08.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n08.xml new file mode 100755 index 00000000..d6a07f97 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n08.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n09.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n09.xml new file mode 100755 index 00000000..868f4f75 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n09.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n10.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n10.xml new file mode 100755 index 00000000..127b117d --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n10.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n11.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n11.xml new file mode 100755 index 00000000..3e9b2637 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n11.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n12.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n12.xml new file mode 100755 index 00000000..3aa6b223 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n12.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n13.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n13.xml new file mode 100755 index 00000000..b5da2def --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n13.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n14.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n14.xml new file mode 100755 index 00000000..fb475617 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n14.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n15.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n15.xml new file mode 100755 index 00000000..90e4ce29 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n15.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n16.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n16.xml new file mode 100755 index 00000000..ef0bd5b5 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n16.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n17.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n17.xml new file mode 100755 index 00000000..cb6d61f9 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n17.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n18.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n18.xml new file mode 100755 index 00000000..6d6277d6 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n18.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n19.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n19.xml new file mode 100755 index 00000000..96580223 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n19.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n20.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n20.xml new file mode 100755 index 00000000..0257c823 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n20.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n21.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n21.xml new file mode 100755 index 00000000..89a0b1ad --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n21.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n22.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n22.xml new file mode 100755 index 00000000..3bf0e2d1 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n22.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n23.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n23.xml new file mode 100755 index 00000000..7ce8a85f --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n23.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n24.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n24.xml new file mode 100755 index 00000000..5a2ea3ec --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n24.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n25.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n25.xml new file mode 100755 index 00000000..fb6454ea --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n25.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n26.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n26.xml new file mode 100755 index 00000000..004f5e04 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n26.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n27.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n27.xml new file mode 100755 index 00000000..0cab04e7 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n27.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n28.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n28.xml new file mode 100755 index 00000000..34b1e0a2 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n28.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n29.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n29.xml new file mode 100755 index 00000000..70b9f721 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n29.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n30.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n30.xml new file mode 100755 index 00000000..67a849f6 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n30.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n31.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n31.xml new file mode 100755 index 00000000..c39e5008 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n31.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n32.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n32.xml new file mode 100755 index 00000000..37df65c0 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n32.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n33.xml b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n33.xml new file mode 100755 index 00000000..8ff5faf6 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P02/ibm02n33.xml @@ -0,0 +1,6 @@ + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n01.xml b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n01.xml new file mode 100755 index 00000000..e56921aa --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n01.xml @@ -0,0 +1,6 @@ + + +]> + + \ No newline at end of file diff --git a/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n02.xml b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n02.xml new file mode 100755 index 00000000..8a3a4004 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n02.xml @@ -0,0 +1,6 @@ + + +]> + + \ No newline at end of file diff --git a/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n03.xml b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n03.xml new file mode 100755 index 00000000..903a5c3b --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n03.xml @@ -0,0 +1,6 @@ + + +]> + + \ No newline at end of file diff --git a/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n04.xml b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n04.xml new file mode 100755 index 00000000..0c603b93 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n04.xml @@ -0,0 +1,6 @@ + + +]> + + \ No newline at end of file diff --git a/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n05.xml b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n05.xml new file mode 100755 index 00000000..09c191be --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n05.xml @@ -0,0 +1,6 @@ + + +]> + + \ No newline at end of file diff --git a/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n06.xml b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n06.xml new file mode 100755 index 00000000..f2aeef6a --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n06.xml @@ -0,0 +1,6 @@ + + +]> + + \ No newline at end of file diff --git a/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n07.xml b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n07.xml new file mode 100755 index 00000000..7cd34539 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n07.xml @@ -0,0 +1,6 @@ + + +]> + + \ No newline at end of file diff --git a/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n08.xml b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n08.xml new file mode 100755 index 00000000..f162261f --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n08.xml @@ -0,0 +1,6 @@ + + +]> + + \ No newline at end of file diff --git a/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n09.xml b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n09.xml new file mode 100755 index 00000000..886e084a --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P24/ibm24n09.xml @@ -0,0 +1,6 @@ + + +]> + + \ No newline at end of file diff --git a/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n01.xml b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n01.xml new file mode 100755 index 00000000..08746aa1 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n01.xml @@ -0,0 +1,6 @@ + + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n02.xml b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n02.xml new file mode 100755 index 00000000..3a3705e1 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n02.xml @@ -0,0 +1,6 @@ + + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n03.xml b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n03.xml new file mode 100755 index 00000000..8d31eaae --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n03.xml @@ -0,0 +1,6 @@ + + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n04.xml b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n04.xml new file mode 100755 index 00000000..6c80d786 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n04.xml @@ -0,0 +1,6 @@ + + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n05.xml b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n05.xml new file mode 100755 index 00000000..fa9cc064 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n05.xml @@ -0,0 +1,6 @@ + + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n06.dtd b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n06.dtd new file mode 100755 index 00000000..b3dde2f9 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n06.dtd @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n06.xml b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n06.xml new file mode 100755 index 00000000..d9522dc0 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n06.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n07.xml b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n07.xml new file mode 100755 index 00000000..1c906db8 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n07.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n08.xml b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n08.xml new file mode 100755 index 00000000..00903ab0 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n08.xml @@ -0,0 +1,6 @@ + + +]> + + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n09.dtd b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n09.dtd new file mode 100644 index 00000000..e30d2928 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n09.dtd @@ -0,0 +1 @@ + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n09.xml b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n09.xml new file mode 100644 index 00000000..a62bac37 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P32/ibm32n09.xml @@ -0,0 +1,9 @@ + + +]> + +&animal_content; diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n01.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n01.xml new file mode 100755 index 00000000..b90314e2 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n01.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n02.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n02.xml new file mode 100755 index 00000000..da5d293a --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n02.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n03.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n03.xml new file mode 100755 index 00000000..60eb3c90 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n03.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n04.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n04.xml new file mode 100755 index 00000000..d9cd5aa3 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n04.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n05.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n05.xml new file mode 100755 index 00000000..ef5287b8 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n05.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n06.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n06.xml new file mode 100755 index 00000000..ef2b241b --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n06.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n07.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n07.xml new file mode 100755 index 00000000..dc7db07f --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n07.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n08.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n08.xml new file mode 100755 index 00000000..257a2b15 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n08.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n09.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n09.xml new file mode 100755 index 00000000..d84e557b --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n09.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n10.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n10.xml new file mode 100755 index 00000000..302b4adc --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n10.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n11.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n11.xml new file mode 100755 index 00000000..c1a7735a --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n11.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n12.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n12.xml new file mode 100755 index 00000000..ac45641e --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n12.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n13.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n13.xml new file mode 100755 index 00000000..5fb7e723 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n13.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n14.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n14.xml new file mode 100755 index 00000000..fbac719b --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n14.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n15.xml b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n15.xml new file mode 100755 index 00000000..612e4ae0 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P66/ibm66n15.xml @@ -0,0 +1,7 @@ + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n01.xml b/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n01.xml new file mode 100755 index 00000000..7cc18ce4 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n01.xml @@ -0,0 +1,8 @@ + + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n02.xml b/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n02.xml new file mode 100755 index 00000000..3ee667bc --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n02.xml @@ -0,0 +1,8 @@ + + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n03.xml b/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n03.xml new file mode 100755 index 00000000..9cd9b893 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n03.xml @@ -0,0 +1,8 @@ + + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n04.xml b/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n04.xml new file mode 100755 index 00000000..48fbfa17 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n04.xml @@ -0,0 +1,8 @@ + + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n05.xml b/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n05.xml new file mode 100755 index 00000000..a805fd65 --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n05.xml @@ -0,0 +1,8 @@ + + + + +]> + diff --git a/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n06.xml b/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n06.xml new file mode 100755 index 00000000..f0b36cdd --- /dev/null +++ b/src/test/resources/xmlconf/ibm/not-wf/P80/ibm80n06.xml @@ -0,0 +1,8 @@ + + + + +]> +