id stringlengths 7 14 | text stringlengths 1 106k |
|---|---|
1768307_7 | @Deprecated
public Query createQuery(String query, boolean returnGeneratedKeys) {
return new Connection(this, true).createQuery(query, returnGeneratedKeys);
} |
1768307_8 | @Deprecated
public Query createQuery(String query, boolean returnGeneratedKeys) {
return new Connection(this, true).createQuery(query, returnGeneratedKeys);
} |
1768307_9 | @Deprecated
public Query createQuery(String query, boolean returnGeneratedKeys) {
return new Connection(this, true).createQuery(query, returnGeneratedKeys);
} |
1768380_0 | @SuppressWarnings("unchecked")
public Map<String, ?> decodeSignedRequest(String signedRequest) throws SignedRequestException {
return decodeSignedRequest(signedRequest, Map.class);
} |
1768380_1 | @SuppressWarnings("unchecked")
public Map<String, ?> decodeSignedRequest(String signedRequest) throws SignedRequestException {
return decodeSignedRequest(signedRequest, Map.class);
} |
1768380_2 | @SuppressWarnings("unchecked")
public Map<String, ?> decodeSignedRequest(String signedRequest) throws SignedRequestException {
return decodeSignedRequest(signedRequest, Map.class);
} |
1768380_3 | @SuppressWarnings("unchecked")
public Map<String, ?> decodeSignedRequest(String signedRequest) throws SignedRequestException {
return decodeSignedRequest(signedRequest, Map.class);
} |
1768380_4 | @SuppressWarnings("unchecked")
public Map<String, ?> decodeSignedRequest(String signedRequest) throws SignedRequestException {
return decodeSignedRequest(signedRequest, Map.class);
} |
1768380_5 | @SuppressWarnings("unchecked")
public Map<String, ?> decodeSignedRequest(String signedRequest) throws SignedRequestException {
return decodeSignedRequest(signedRequest, Map.class);
} |
1768380_6 | @RequestMapping(method=RequestMethod.POST)
public ResponseEntity<String> disconnect(@RequestParam("signed_request") String signedRequest) {
try {
String userId = getUserId(signedRequest);
logger.info("Deauthorization request received for Facebook User ID: " + userId + "; Removing connections.");
Set<String> prov... |
1768380_7 | @SuppressWarnings({ "unchecked", "rawtypes" })
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest request, WebDataBinderFactory binderFactory) throws Exception {
SignedRequest annotation = parameter.getParameterAnnotation(SignedRequest.class);
if (annotation ... |
1768380_8 | @SuppressWarnings({ "unchecked", "rawtypes" })
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest request, WebDataBinderFactory binderFactory) throws Exception {
SignedRequest annotation = parameter.getParameterAnnotation(SignedRequest.class);
if (annotation ... |
1768380_9 | @SuppressWarnings({ "unchecked", "rawtypes" })
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest request, WebDataBinderFactory binderFactory) throws Exception {
SignedRequest annotation = parameter.getParameterAnnotation(SignedRequest.class);
if (annotation ... |
1772396_0 | public static Date parse(String str) {
return parse(str, true);
} |
1772628_0 | public BusinessServiceLevel computeServiceLevel(long responseTime,Date timeStamp){
//assume that the service is at it best shape
BusinessServiceLevel sl=BusinessServiceLevel.GOLD;
//check if its gold
if(goldPeriod.inPeriod(timeStamp)&&responseTime>maxGold){
//it s not so its silver
sl=BusinessServiceLevel.SIL... |
1772628_1 | public BusinessServiceLevel computeServiceLevel(long responseTime,Date timeStamp){
//assume that the service is at it best shape
BusinessServiceLevel sl=BusinessServiceLevel.GOLD;
//check if its gold
if(goldPeriod.inPeriod(timeStamp)&&responseTime>maxGold){
//it s not so its silver
sl=BusinessServiceLevel.SIL... |
1772628_2 | public BusinessServiceLevel computeServiceLevel(long responseTime,Date timeStamp){
//assume that the service is at it best shape
BusinessServiceLevel sl=BusinessServiceLevel.GOLD;
//check if its gold
if(goldPeriod.inPeriod(timeStamp)&&responseTime>maxGold){
//it s not so its silver
sl=BusinessServiceLevel.SIL... |
1772628_3 | public BusinessServiceLevel computeServiceLevel(long responseTime,Date timeStamp){
//assume that the service is at it best shape
BusinessServiceLevel sl=BusinessServiceLevel.GOLD;
//check if its gold
if(goldPeriod.inPeriod(timeStamp)&&responseTime>maxGold){
//it s not so its silver
sl=BusinessServiceLevel.SIL... |
1772628_4 | public boolean equals(Object p){
if(p instanceof HoursPeriod)
return ((HoursPeriod)p).begining==begining&&((HoursPeriod)p).ending==ending;
return false;
} |
1772628_5 | public boolean inPeriod(Date date){
Calendar cal = Calendar.getInstance();
cal.setTime(date);
int nbMinutes=cal.get(Calendar.HOUR_OF_DAY)*60+cal.get(Calendar.MINUTE);
return nbMinutes>begining&& nbMinutes<ending ;
} |
1772628_6 | public String toString(){
return "begining:"+begining+" ending:"+ending;
} |
1772628_7 | public String calculIndicators(JasmineEventEB[] events) {
// if no events return nothing
if (events == null)
return "";
// a hashmap to store the result
Hashtable<String, BusinessServiceLevel> serviceLevels = new Hashtable<String, BusinessServiceLevel>();
// for each events
for (JasmineEventEB ev : events) ... |
1772628_8 | public JasmineEventEB[] getQoSEvents(final Date from, final Date to,
final int nbrecords) throws NamingException, ParseException,
IOException {
if (!configdone) {
setConfig();
}
// The classloader thing is here to solve a osgi problem
ClassLoader saved = Thread.currentThread().getContextClassLoader();
Thr... |
1772795_0 | @Override
public void saveMetricSnapshot(long timeSnapshot, Collection<MetricValueAggregator> snapshotCollection) throws ServiceException {
delegate.saveMetricSnapshot(timeSnapshot, snapshotCollection);
} |
1772795_1 | @Override
public void saveMetricSnapshot(long timeSnapshot, Collection<MetricValueAggregator> snapshotCollection) throws ServiceException {
delegate.saveMetricSnapshot(timeSnapshot, snapshotCollection);
} |
1772795_2 | @Override
public void saveMetricSnapshot(long timeSnapshot, Collection<MetricValueAggregator> snapshotCollection) throws ServiceException {
delegate.saveMetricSnapshot(timeSnapshot, snapshotCollection);
} |
1772795_3 | @Override
public void saveMetricSnapshot(long timeSnapshot, Collection<MetricValueAggregator> snapshotCollection) throws ServiceException {
delegate.saveMetricSnapshot(timeSnapshot, snapshotCollection);
} |
1772795_4 | public static List<String> generateErrorValuesKeys(final boolean serverSide,
final Map<String, List<String>> filters, final String param1) {
final List<String> errorKeys = new ArrayList<String>();
final List<String> serverNames = (filters.get("Server")!= null ? new ArrayList<String>(filters.get("Server")): new Arra... |
1772795_5 | public static List<String> generateErrorValuesKeys(final boolean serverSide,
final Map<String, List<String>> filters, final String param1) {
final List<String> errorKeys = new ArrayList<String>();
final List<String> serverNames = (filters.get("Server")!= null ? new ArrayList<String>(filters.get("Server")): new Arra... |
1772795_6 | public static List<String> generateErrorValuesKeys(final boolean serverSide,
final Map<String, List<String>> filters, final String param1) {
final List<String> errorKeys = new ArrayList<String>();
final List<String> serverNames = (filters.get("Server")!= null ? new ArrayList<String>(filters.get("Server")): new Arra... |
1772795_7 | public static List<String> generateErrorValuesKeys(final boolean serverSide,
final Map<String, List<String>> filters, final String param1) {
final List<String> errorKeys = new ArrayList<String>();
final List<String> serverNames = (filters.get("Server")!= null ? new ArrayList<String>(filters.get("Server")): new Arra... |
1772795_8 | public static List<String> generateErrorValuesKeys(final boolean serverSide,
final Map<String, List<String>> filters, final String param1) {
final List<String> errorKeys = new ArrayList<String>();
final List<String> serverNames = (filters.get("Server")!= null ? new ArrayList<String>(filters.get("Server")): new Arra... |
1772795_9 | public static List<String> generateErrorValuesKeys(final boolean serverSide,
final Map<String, List<String>> filters, final String param1) {
final List<String> errorKeys = new ArrayList<String>();
final List<String> serverNames = (filters.get("Server")!= null ? new ArrayList<String>(filters.get("Server")): new Arra... |
1772863_0 | private void fetchPoliciesByName(String name, String type, String effect) {
PolicyKey key = new PolicyKey();
key.setName(name);
key.setType(type);
QueryCondition condition = new QueryCondition();
if ("RL".equals(type) && effect != null) {
condition.addQuery(new QueryCondition.Query(QueryCond... |
1772863_1 | public static List<PolicyKey> getAllPolicyKeyList() {
return poKeys;
} |
1772863_2 | public static List<ResourceKey> getAllResourceKeyList() {
return rsKeys;
} |
1772863_3 | public static List<SubjectKey> getAllSubjectKeyList() {
return sKeys;
} |
1772863_4 | public static List<OperationKey> getAllOperationKeyList() {
return opKeys;
} |
1772863_5 | public Throwable getErrorAsThrowable (String responseName, Response response) {
if (response == null)
return null;
//try parsing the json as an errorMessage
ErrorResponse errorResponse = ErrorResponse.fromJSON(response.getText());
JsArray<RemoteError> errors = errorResponse.getErrors();
... |
1772863_6 | public Throwable getErrorAsThrowable (String responseName, Response response) {
if (response == null)
return null;
//try parsing the json as an errorMessage
ErrorResponse errorResponse = ErrorResponse.fromJSON(response.getText());
JsArray<RemoteError> errors = errorResponse.getErrors();
... |
1772863_7 | @Override
protected String getPolicyType() {
return "WHITELIST";
} |
1772863_8 | @Override
public GetAuthenticationPolicyResponse getAuthenticationPolicy(
GetAuthenticationPolicyRequest request) throws PolicyProviderException {
if (request == null ||
request.getResourceName() == null ||
request.getResourceType() == null ||
request.getOperationName() == null ||
request.getRe... |
1772863_9 | @Override
public GetAuthenticationPolicyResponse getAuthenticationPolicy(
GetAuthenticationPolicyRequest request) throws PolicyProviderException {
if (request == null ||
request.getResourceName() == null ||
request.getResourceType() == null ||
request.getOperationName() == null ||
request.getRe... |
1772983_0 | @Override
public AuthenticationResponse authenticate(AuthenticationRequest authnRequest)
throws AuthenticationException {
return impl.authenticate(authnRequest);
} |
1772983_1 | @Override
public IsRateLimitedResponse isRateLimited(
IsRateLimitedRequest isRateLimitedRequest) {
IsRateLimitedResponse response = new IsRateLimitedResponse();
response.setStatus(RateLimiterStatus.SERVE_OK);
if (!"SERVICE".equalsIgnoreCase(isRateLimitedRequest.getResourceType())) {
response.setStatus(RateLimite... |
1772983_2 | @Override
public IsRateLimitedResponse isRateLimited(
IsRateLimitedRequest isRateLimitedRequest) {
IsRateLimitedResponse response = new IsRateLimitedResponse();
response.setStatus(RateLimiterStatus.SERVE_OK);
if (!"SERVICE".equalsIgnoreCase(isRateLimitedRequest.getResourceType())) {
response.setStatus(RateLimite... |
1772983_3 | @Override
public IsRateLimitedResponse isRateLimited(
IsRateLimitedRequest isRateLimitedRequest) {
IsRateLimitedResponse response = new IsRateLimitedResponse();
response.setStatus(RateLimiterStatus.SERVE_OK);
if (!"SERVICE".equalsIgnoreCase(isRateLimitedRequest.getResourceType())) {
response.setStatus(RateLimite... |
1772983_4 | @Override
public IsRateLimitedResponse isRateLimited(
IsRateLimitedRequest isRateLimitedRequest) {
IsRateLimitedResponse response = new IsRateLimitedResponse();
response.setStatus(RateLimiterStatus.SERVE_OK);
if (!"SERVICE".equalsIgnoreCase(isRateLimitedRequest.getResourceType())) {
response.setStatus(RateLimite... |
1772983_5 | @Override
public IsRateLimitedResponse isRateLimited(
IsRateLimitedRequest isRateLimitedRequest) {
IsRateLimitedResponse response = new IsRateLimitedResponse();
response.setStatus(RateLimiterStatus.SERVE_OK);
if (!"SERVICE".equalsIgnoreCase(isRateLimitedRequest.getResourceType())) {
response.setStatus(RateLimite... |
1772983_6 | @Override
public IsRateLimitedResponse isRateLimited(
IsRateLimitedRequest isRateLimitedRequest) {
IsRateLimitedResponse response = new IsRateLimitedResponse();
response.setStatus(RateLimiterStatus.SERVE_OK);
if (!"SERVICE".equalsIgnoreCase(isRateLimitedRequest.getResourceType())) {
response.setStatus(RateLimite... |
1772983_7 | @Override
public IsRateLimitedResponse isRateLimited(
IsRateLimitedRequest isRateLimitedRequest) {
IsRateLimitedResponse response = new IsRateLimitedResponse();
response.setStatus(RateLimiterStatus.SERVE_OK);
if (!"SERVICE".equalsIgnoreCase(isRateLimitedRequest.getResourceType())) {
response.setStatus(RateLimite... |
1772983_8 | @Override
public IsRateLimitedResponse isRateLimited(
IsRateLimitedRequest isRateLimitedRequest) {
IsRateLimitedResponse response = new IsRateLimitedResponse();
response.setStatus(RateLimiterStatus.SERVE_OK);
if (!"SERVICE".equalsIgnoreCase(isRateLimitedRequest.getResourceType())) {
response.setStatus(RateLimite... |
1772983_9 | @Override
public IsRateLimitedResponse isRateLimited(
IsRateLimitedRequest isRateLimitedRequest) {
IsRateLimitedResponse response = new IsRateLimitedResponse();
response.setStatus(RateLimiterStatus.SERVE_OK);
if (!"SERVICE".equalsIgnoreCase(isRateLimitedRequest.getResourceType())) {
response.setStatus(RateLimite... |
1782556_0 | void afterRender(final MarkupWriter writer)
{
writer.end();
writer.element("span", "id", getWrapperClientId(), "style", "display:inline-block");
writer.end();
} |
1782556_1 | void onRemoveUpload(int serverIndex)
{
// We use index of an uploadedFile in 'value' as a key at
// the client side and if the uploaded file is removed we cleanup and set
// the element at that index to null. As the 'value' may contain null, we
// need to remove those entries in processSubmission()
if (v... |
1782556_2 | @Override
public boolean isAjaxUploadRequest(HttpServletRequest request)
{
return request.getHeader(AJAX_UPLOAD_HEADER) != null;
} |
1782556_3 | @Override
public boolean isAjaxUploadRequest(HttpServletRequest request)
{
return request.getHeader(AJAX_UPLOAD_HEADER) != null;
} |
1782556_4 | @Override
public boolean isAjaxUploadRequest(HttpServletRequest request)
{
return request.getHeader(AJAX_UPLOAD_HEADER) != null;
} |
1782556_5 | @Override
public boolean isAjaxUploadRequest(HttpServletRequest request)
{
return request.getHeader(AJAX_UPLOAD_HEADER) != null;
} |
1782556_6 | @Override
public boolean isAjaxUploadRequest(HttpServletRequest request)
{
return request.getHeader(AJAX_UPLOAD_HEADER) != null;
} |
1782556_7 | @Override
public void setupUploadedFile(HttpServletRequest request)
{
String fieldName = request.getHeader(AJAX_UPLOAD_HEADER);
FileItem item = fileItemFactory.createItem(fieldName, request.getContentType(), false,
request.getParameter(AjaxUploadConstants.FILE_PARAMETER));
try
{
TapestryInter... |
1782556_8 | @Override
public boolean service(HttpServletRequest request, HttpServletResponse response, HttpServletRequestHandler handler)
throws IOException
{
if (decoder.isAjaxUploadRequest(request))
{
decoder.setupUploadedFile(request);
}
return handler.service(request, response);
} |
1782556_9 | @Override
public boolean service(HttpServletRequest request, HttpServletResponse response, HttpServletRequestHandler handler)
throws IOException
{
if (decoder.isAjaxUploadRequest(request))
{
decoder.setupUploadedFile(request);
}
return handler.service(request, response);
} |
1783046_0 | Config createConfig() {
return new ConfigBuilder()
.withMasterUrl(kubernetesMaster)
.withApiVersion(kubernetesApiVersion)
.withTrustCerts(kubernetesTrustCertificates)
.withDisableHostnameVerification(kubernetesDisableHostnameVerification)
.withCaCertFile(k... |
1783046_1 | @Override
public Set<String> discoverMembers() {
LOGGER.debug("CELLAR KUBERNETES: query pods with labeled with [{}={}]", kubernetesPodLabelKey, kubernetesPodLabelValue);
Set<String> members = new HashSet<String>();
try {
PodList podList = kubernetesClient.pods().list();
for (Pod pod : podLis... |
1783046_2 | @Override
public Set<String> discoverMembers() {
LOGGER.debug("CELLAR KUBERNETES: query pods with labeled with [{}={}]", kubernetesPodLabelKey, kubernetesPodLabelValue);
Set<String> members = new HashSet<String>();
try {
PodList podList = kubernetesClient.pods().list();
for (Pod pod : podLis... |
1783046_3 | public boolean matches(String filter) {
Filter f;
try {
f = FrameworkUtil.createFilter(filter);
} catch (InvalidSyntaxException e) {
IllegalArgumentException iae = new IllegalArgumentException(e.getMessage());
iae.initCause(e);
throw iae;
}
Dictionary dictionary = new... |
1783046_4 | public Set<String> getServiceInterfaces(Object service, String[] services) {
Set<String> interfaceList = new LinkedHashSet<String>();
if (service != null && services != null && services.length > 0) {
for (String s : services) {
if (Constants.ALL_INTERFACES.equals(s)) {
Class[... |
1783046_5 | public boolean isUpdated(Map properties) {
Boolean updated = Boolean.FALSE;
if (properties != null) {
if (properties.containsKey(Discovery.DISCOVERED_MEMBERS_PROPERTY_NAME)) {
Set<String> newDiscoveredMemberSet = CellarUtils.createSetFromString((String) properties.get(Discovery.DISCOVERED_ME... |
1783046_6 | public boolean isUpdated(Map properties) {
Boolean updated = Boolean.FALSE;
if (properties != null) {
if (properties.containsKey(Discovery.DISCOVERED_MEMBERS_PROPERTY_NAME)) {
Set<String> newDiscoveredMemberSet = CellarUtils.createSetFromString((String) properties.get(Discovery.DISCOVERED_ME... |
1783046_7 | public static boolean collectionEquals(Collection col1, Collection col2) {
return collectionSubset(col1, col2) && collectionSubset(col2, col1);
} |
1783046_8 | public static String createStringFromSet(Set<String> items, boolean mergeable) {
StringBuilder builder = new StringBuilder();
Iterator<String> iterator = items.iterator();
while (iterator.hasNext()) {
builder.append(iterator.next());
if (iterator.hasNext()) {
builder.append(",");... |
1783046_9 | public Boolean isAllowed(Group group, String category, String event, EventType type) {
Set<String> whiteList = getListEntries(Configurations.WHITELIST, group, category, type);
Set<String> blackList = getListEntries(Configurations.BLACKLIST, group, category, type);
if (blackList == null || whiteList == null)... |
1783083_0 | public static String formatSize(String size) {
if (size != null) {
String incomingSize = size.trim();
if (incomingSize.length() > 0) {
char lastChar = incomingSize.charAt(incomingSize.length() - 1);
if (Character.isDigit(lastChar)) {
return incomingSize + "px"... |
1783083_1 | public ResourceBundle getBundle(Enum<?> messageKey, Locale locale) throws MissingResourceException,
IllegalArgumentException {
MessageBundle bundleAnnotation = asMessageBundle(messageKey);
return ResourceBundle.getBundle(bundleAnnotation.baseName(), locale, getClassLoader());
} |
1783083_2 | public ResourceBundle getApplicationBundle(FacesContext facesContext, Enum<?> messageKey, Locale locale)
throws MissingResourceException {
if (facesContext == null) {
throw new MissingResourceException("FacesContext is null", getClass().getName(), messageKey.toString());
}
Application applicatio... |
1783083_3 | public static String escapeCSSMetachars(String s) {
if (s == null || s.length() == 0) {
return s;
}
StringBuilder builder = new StringBuilder();
int start = 0;
int idx = 0;
int length = s.length();
for (; idx < length; idx++) {
char c = s.charAt(idx);
int searchIdx = ... |
1783083_4 | public static String toScript(Object obj) {
StringBuilder sb = new StringBuilder();
if ((obj != null) && (obj instanceof String))
sb.ensureCapacity((int)(((String) obj).length() * 1.66));
try {
appendScript(sb, obj, new IdentityHashMap<Object, Boolean>());
} catch (IOException e) {
... |
1783083_5 | public static String getMD5scriptHash(String script) {
byte[] bytesOfScript = new byte[0];
try {
bytesOfScript = script.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("UTF-8 appears to be an unsupported character set on this platform", e);
}
... |
1783083_6 | static String getLocation() {
if (getStaticResourceLocation() != null) {
return getStaticResourceLocation();
}
return getConfiguration(CoreConfiguration.Items.resourceMappingLocation);
} |
1783083_7 | static String getLocation() {
if (getStaticResourceLocation() != null) {
return getStaticResourceLocation();
}
return getConfiguration(CoreConfiguration.Items.resourceMappingLocation);
} |
1783083_8 | static String getLocation() {
if (getStaticResourceLocation() != null) {
return getStaticResourceLocation();
}
return getConfiguration(CoreConfiguration.Items.resourceMappingLocation);
} |
1783083_9 | static String getLocation() {
if (getStaticResourceLocation() != null) {
return getStaticResourceLocation();
}
return getConfiguration(CoreConfiguration.Items.resourceMappingLocation);
} |
1784308_0 | @Override
public List<Rule> getRules() {
return Collections.unmodifiableList(rules);
} |
1784308_1 | public void addRule(Rule rule) {
rules.add(rule);
} |
1784308_2 | public BasicRuleSet withRule(Rule rule) {
addRule(rule);
return this;
} |
1784308_3 | @Override
public String toString() {
return getClass().getSimpleName() + "[" + (rules.isEmpty() ? "<Empty RuleSet>" : StringUtils.join(collectRuleNames(), ", ")) + "]";
} |
1784308_4 | public static void notNull(Object object) {
notNull("Parameter may not be null.", object);
} |
1784308_5 | public static void notNull(Object object) {
notNull("Parameter may not be null.", object);
} |
1784308_6 | public static void notNull(Object object) {
notNull("Parameter may not be null.", object);
} |
1784308_7 | public static void notNull(Object object) {
notNull("Parameter may not be null.", object);
} |
1784308_8 | public static void notNull(Object object) {
notNull("Parameter may not be null.", object);
} |
1784308_9 | public static void notEmpty(String string) {
notEmpty("Parameter may not be null or empty.", string);
} |
1784501_0 | @Override
public boolean equals(Object t) {
if (t == null || getClass() != t.getClass()) {
return false;
} else {
ColumnType other = (ColumnType) t;
return m_type == other.getType() && Objects.equals(m_typeCode, other.getTypeCode());
}
} |
1795594_0 | public StreamingHttpRequest append(HttpChunk httpChunk) {
if (currentRequest.append(httpChunk)) {
HttpChunk incompleteHttpChunk = currentRequest.httpChunks.remove(currentRequest.httpChunks.size() - 1);
Map<Boolean, List<AwsChunk>> awsChunkPartition = currentRequest.awsChunks.stream().collect(partitioningBy(Aw... |
1795594_1 | public StreamingHttpRequest append(HttpChunk httpChunk) {
if (currentRequest.append(httpChunk)) {
HttpChunk incompleteHttpChunk = currentRequest.httpChunks.remove(currentRequest.httpChunks.size() - 1);
Map<Boolean, List<AwsChunk>> awsChunkPartition = currentRequest.awsChunks.stream().collect(partitioningBy(Aw... |
1795594_2 | static String buildCanonicalResourcePath(String path) {
if (path == null || path.isEmpty())
return "/";
if (path.startsWith("/"))
return path;
else
return "/".concat(path);
} |
1795594_3 | static String buildCanonicalResourcePath(String path) {
if (path == null || path.isEmpty())
return "/";
if (path.startsWith("/"))
return path;
else
return "/".concat(path);
} |
1795594_4 | static String getUnverifiedPayloadHash( final MappingHttpRequest request) throws AccessDeniedException {
final String contentShaHeader = request.getHeader(S3V4Authentication.AWS_CONTENT_SHA_HEADER);
if ( !Strings.isNullOrEmpty(contentShaHeader) ) {
if ( !STREAMING_PAYLOAD.equals(contentShaHeader) && !UNSIGNED_P... |
1795594_5 | static void buildCanonicalHeaders(MappingHttpRequest request, String signedHeaders, StringBuilder sb) {
for (String header : signedHeaders.split(";")) {
List<String> values = Lists.transform(request.getHeaders(header), text -> text != null ? text.trim() : null);
sb.append(header.toLowerCase());
sb.append(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.