Skip to content

Commit

Permalink
Merge pull request #3 from AlanRoth/master
Browse files Browse the repository at this point in the history
update PAYARA-3709 branch
  • Loading branch information
Alan authored Apr 11, 2019
2 parents 52f8b7d + 90e92dc commit 4fc88dd
Show file tree
Hide file tree
Showing 264 changed files with 11,252 additions and 5,024 deletions.
7 changes: 5 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Payara is an open source project, with the code owned by Payara Foundation a Uni
As we must also comply with the upstream Oracle Common Development and Distribution license the following line should be added to any changed file:

```
Portions Copyright [2017] Payara Foundation and/or its affiliates
Portions Copyright [2019] Payara Foundation and/or its affiliates
```

## Getting Payara
Expand Down Expand Up @@ -160,11 +160,14 @@ If you feel there is a security vulnerability in Payara Server or Payara Micro p

If you find a bug within Payara, please post it as a github issue. Github is our main repository for community found issues with Payara and our support team frequently monitor it for new issues. As with submitting issues, a concise title which clearly explains the issue combined with a comment explaining what the found issue is and either how it arose and a stacktrace of the issue, or a test case which is able to reproduce the issue will help us deliver a patch.

### Executable Test Case
For a bug report to be actioned quickly an executable test case is required. Ideally the test case will be hosted in your GitHub account as a buildable maven project which creates a deployable artifact that demonstrates the issue clearly. I'm afraid we can't get into the details of debugging your specific business application so the test case should be stripped to the minimum required to demonstrate the issue. If additional server resources need creating e.g. Connection Pools or Queues please provide the asadmin commands required to create these in a document or as a script. The reality is the easier it is for an engineer to quickly reproduce your issue the more likely it will be fixed.

## Responses

We continually check the github posted issues for bugs, feature requests, and assorted issues. If you have posted an issue, chances are it has been read by a member of staff. Requests for further information and labels are often posted in order to make it easier for the dev team to see issues. However if your issue has not received a comment or label, don't take this as it having not been read or acted upon!

If you do post an issue and we request further information from you please respond quickly. We review all issues periodically and if an issue has been waiting for a response since last review we will add the "requestor unresponsive" label. If on the second periodic review there has still been no response to our request we will add a second "requestor unresponsive" label. Finally if on the third review there is still no response we will close the issue. This ensures our GitHub issues stay up to date and relevant and don't get full of old issues. If you still have the same problem you can still comment on the closed issue and we will still see it and if necessary reopen the issue to pick up where we left off.
If you do post an issue and we request further information from you please respond quickly. We review all issues periodically and if an issue has been waiting for a response since last review we will add the "requestor unresponsive" label. If on the second periodic review there has still been no response to our request we will add a second "requestor unresponsive" label. Finally if on the third review there is still no response we will close the issue. This ensures our GitHub issues stay up to date and relevant and doesn't get full of old issues. If you still have the same problem you can still comment on the closed issue and we will still see it and if necessary reopen the issue to pick up where we left off.

## Questions, advice and guidance

Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

<!--
Describe the test to reproduce the bug in a series of steps. Make each step simple to follow by describing configuration changes, commands to run or simple instructions; for example:
If possible it is always preferred if you host a test case as a maven project on Github that simply demonstrates the issue.
If this is not appropriate then describe the test to reproduce the bug in a series of steps. Make each step simple to follow by describing configuration changes, commands to run or simple instructions; for example:
1 -** Start the domain
Expand Down
26 changes: 15 additions & 11 deletions Jenkinsfile-Nightly
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ pipeline {
stage('Run MicroProfile Config TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Running Config TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean install -f MicroProfile-Config/tck-runner/pom.xml -Ppayara-micro-managed \
sh "mvn -B -V -ff -e clean verify -f MicroProfile-Config/tck-runner/pom.xml -Ppayara-micro-managed \
-Dsurefire.rerunFailingTestsCount=2 -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran Config TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
Expand All @@ -200,7 +200,7 @@ pipeline {
stage('Run MicroProfile Fault Tolerance TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Running Fault Tolerance TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean install -f MicroProfile-Fault-Tolerance/tck-runner/pom.xml \
sh "mvn -B -V -ff -e clean verify -f MicroProfile-Fault-Tolerance/tck-runner/pom.xml \
-Dsurefire.rerunFailingTestsCount=2 -Ppayara-micro-managed -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran Fault Tolerance TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
Expand All @@ -213,12 +213,14 @@ pipeline {
stage('Run MicroProfile Health TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Installing MP Health TCK Arquillian Extension *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean install -f MicroProfile-Health/payara-health-arquillian-extension/pom.xml \
-Dpayara.version=${pom.version}"
sh "mvn -B -V -ff -e clean install -f pom.xml -Dpayara.version=${pom.version} -N"
sh "mvn -B -V -ff -e clean install -f MicroProfile-Health/pom.xml -Dpayara.version=${pom.version} -N"
sh "mvn -B -V -ff -e clean install -f MicroProfile-Health/tck-arquillian-extension/pom.xml \
-Dpayara.version=${pom.version} -N"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Installed MP Health TCK Arquillian Extension *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'

echo '*#*#*#*#*#*#*#*#*#*#*#*# Running Health TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean install -f MicroProfile-Health/tck-runner/pom.xml -Ppayara-micro-managed \
sh "mvn -B -V -ff -e clean verify -f MicroProfile-Health/tck-runner/pom.xml -Ppayara-micro-managed \
-Dsurefire.rerunFailingTestsCount=2 -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran Health TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
Expand All @@ -231,12 +233,14 @@ pipeline {
stage('Run MicroProfile JWT-Auth TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Installing MP JWT-Auth TCK Arquillian Extension *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean install -f MicroProfile-JWT-Auth/payara-jwt-auth-arquillian-extension/pom.xml \
sh "mvn -B -V -ff -e clean install -f pom.xml -Dpayara.version=${pom.version} -N"
sh "mvn -B -V -ff -e clean install -f MicroProfile-JWT-Auth/pom.xml -Dpayara.version=${pom.version} -N"
sh "mvn -B -V -ff -e clean install -f MicroProfile-JWT-Auth/payara-jwt-auth-arquillian-extension/pom.xml \
-Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Installed MP JWT-Auth TCK Arquillian Extension *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'

echo '*#*#*#*#*#*#*#*#*#*#*#*# Running JWT-Auth TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean install -f MicroProfile-JWT-Auth/tck-runner/pom.xml \
sh "mvn -B -V -ff -e clean verify -f MicroProfile-JWT-Auth/tck-runner/pom.xml \
-Ppayara-micro-managed,full -Dsurefire.rerunFailingTestsCount=2 -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran JWT-Auth TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
Expand All @@ -249,7 +253,7 @@ pipeline {
stage('Run MicroProfile Metrics TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Running Metrics TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean install -f MicroProfile-Metrics/tck-runner/pom.xml -Ppayara-micro-managed \
sh "mvn -B -V -ff -e clean verify -f MicroProfile-Metrics/tck-runner/pom.xml -Ppayara-micro-managed \
-Dsurefire.rerunFailingTestsCount=2 -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran Metrics TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
Expand All @@ -262,7 +266,7 @@ pipeline {
stage('Run MicroProfile OpenAPI TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Running OpenAPI TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean install -f MicroProfile-OpenAPI/tck-runner/pom.xml -Ppayara-micro-managed \
sh "mvn -B -V -ff -e clean verify -f MicroProfile-OpenAPI/tck-runner/pom.xml -Ppayara-micro-managed \
-Dsurefire.rerunFailingTestsCount=2 -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran OpenAPI TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
Expand All @@ -275,7 +279,7 @@ pipeline {
stage('Run MicroProfile OpenTracing TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Running OpenTracing TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean install -f MicroProfile-OpenTracing/tck-runner/pom.xml -Ppayara-micro-managed \
sh "mvn -B -V -ff -e clean verify -f MicroProfile-OpenTracing/tck-runner/pom.xml -Ppayara-micro-managed \
-Dsurefire.rerunFailingTestsCount=2 -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran OpenTracing TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
Expand All @@ -288,7 +292,7 @@ pipeline {
stage('Run MicroProfile Rest Client TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Running Rest Client TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean install -f MicroProfile-Rest-Client/tck-runner/pom.xml -Ppayara-micro-managed \
sh "mvn -B -V -ff -e clean verify -f MicroProfile-Rest-Client/tck-runner/pom.xml -Ppayara-micro-managed \
-Dsurefire.rerunFailingTestsCount=2 -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran Rest Client TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
* Copyright (c) [2019] Payara Foundation and/or its affiliates. All rights reserved.
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://github.com/payara/Payara/blob/master/LICENSE.txt
* See the License for the specific
* language governing permissions and limitations under the License.
* When distributing the software, include this License Header Notice in each
* file and include the License file at glassfish/legal/LICENSE.txt.
* GPL Classpath Exception:
* The Payara Foundation designates this particular file as subject to the "Classpath"
* exception as provided by the Payara Foundation in the GPL Version 2 section of the License
* file that accompanied this code.
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
**/

package org.glassfish.admingui.common.handlers;

import org.glassfish.admingui.common.util.GuiUtil;

import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
* Type representing properties as List of Maps.
*/
class PropertyList implements Iterable<Map.Entry<String, String>> {
private Map<String, String> properties = new LinkedHashMap<>();

private PropertyList() {

}

void put(String key, String value) {
if (GuiUtil.isEmpty(key)) {
return;
}
if (!GuiUtil.isEmpty(value)) {
properties.put(key, value);
}
}

void put(String key, Map<String, String> sourceMap, String sourceKey) {
if (sourceMap != null) {
put(key, sourceMap.get(sourceKey));
}
}

public int size() {
return properties.size();
}

public boolean isEmpty() {
return properties.isEmpty();
}

public boolean containsKey(Object key) {
return properties.containsKey(key);
}

public String get(Object key) {
return properties.get(key);
}

@Override
public Iterator<Map.Entry<String, String>> iterator() {
return properties.entrySet().iterator();
}

public List<Map<String, String>> toList() {
return properties.entrySet().stream()
.map(e -> toPropertyEntry(e.getKey(), e.getValue()))
.collect(Collectors.toList());
}

public String toParamValue() {
StringBuilder paramValue = new StringBuilder();
for (Map.Entry<String, String> oneProp : this) {
paramValue.append(oneProp.getKey()).append("=");
String value = oneProp.getValue().replaceAll("\\\\", "\\\\\\\\");
value = UtilHandlers.escapePropertyValue(value);
paramValue.append(value).append(":");
}
return paramValue.toString();
}

static Map<String, String> toPropertyEntry(String name, String value) {
Map<String, String> result = new HashMap<>();
result.put("name", name);
result.put("value", value);
return result;
}

static PropertyList fromList(List<Map<String, String>> propertyList) {
PropertyList result = new PropertyList();
for (Map<String, String> entry : propertyList) {
result.put(entry.get("name"), entry.get("value"));
}
return result;
}

static PropertyList fromMap(Map<String, String> map) {
PropertyList result = new PropertyList();
result.properties.putAll(map);
return result;
}
}
Loading

0 comments on commit 4fc88dd

Please sign in to comment.