Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 240326 Details for
Bug 429096
Should be picking up buildpack options in manifest.yml
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Improved patch for review
file_429096.txt (text/plain), 2.89 KB, created by
Szymon Brandys
on 2014-02-26 07:47:55 EST
(
hide
)
Description:
Improved patch for review
Filename:
MIME Type:
Creator:
Szymon Brandys
Created:
2014-02-26 07:47:55 EST
Size:
2.89 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.server.cf/src/org/eclipse/orion/server/cf/commands/CreateApplicationCommand.java b/bundles/org.eclipse.orion.server.cf/src/org/eclipse/orion/server/cf/commands/CreateApplicationCommand.java >index 7663099..8270342 100644 >--- a/bundles/org.eclipse.orion.server.cf/src/org/eclipse/orion/server/cf/commands/CreateApplicationCommand.java >+++ b/bundles/org.eclipse.orion.server.cf/src/org/eclipse/orion/server/cf/commands/CreateApplicationCommand.java >@@ -38,6 +38,7 @@ > private String appCommand; > private int appInstances; > private int appMemory; >+ private String buildPack; > > private boolean force; > >@@ -73,7 +74,7 @@ > createAppRequst.put(CFProtocolConstants.V2_KEY_SPACE_GUID, target.getSpace().getCFJSON().getJSONObject(CFProtocolConstants.V2_KEY_METADATA).getString(CFProtocolConstants.V2_KEY_GUID)); > createAppRequst.put(CFProtocolConstants.V2_KEY_NAME, appName); > createAppRequst.put(CFProtocolConstants.V2_KEY_INSTANCES, appInstances); >- createAppRequst.put(CFProtocolConstants.V2_KEY_BUILDPACK, JSONObject.NULL); >+ createAppRequst.put(CFProtocolConstants.V2_KEY_BUILDPACK, buildPack != null ? buildPack : JSONObject.NULL); > createAppRequst.put(CFProtocolConstants.V2_KEY_COMMAND, appCommand); > createAppRequst.put(CFProtocolConstants.V2_KEY_MEMORY, appMemory); > createAppRequst.put(CFProtocolConstants.V2_KEY_STACK_GUID, JSONObject.NULL); >@@ -113,6 +114,9 @@ > } > appMemory = ManifestUtils.getMemoryLimit(mem); /* optional */ > >+ //buildpack >+ buildPack = appJSON.optString(CFProtocolConstants.V2_KEY_BUILDPACK, null); >+ > return Status.OK_STATUS; > > } catch (ParseException e) { >diff --git a/bundles/org.eclipse.orion.server.cf/src/org/eclipse/orion/server/cf/manifest/ManifestUtils.java b/bundles/org.eclipse.orion.server.cf/src/org/eclipse/orion/server/cf/manifest/ManifestUtils.java >index 1ec2132..f17b934 100644 >--- a/bundles/org.eclipse.orion.server.cf/src/org/eclipse/orion/server/cf/manifest/ManifestUtils.java >+++ b/bundles/org.eclipse.orion.server.cf/src/org/eclipse/orion/server/cf/manifest/ManifestUtils.java >@@ -50,12 +50,25 @@ > * Parses <A>:<B> from the input line. > */ > static String[] splitLabel(String input) { >- String[] sLabel = input.split(":"); //$NON-NLS-1$ >- if (sLabel[0].startsWith("- ")) //$NON-NLS-1$ >- sLabel[0] = sLabel[0].substring(2); >+ int idx = input.indexOf(":"); >+ String head = null; >+ String tail = null; >+ if (idx != -1) { >+ head = input.substring(0, idx); >+ tail = input.substring(idx + 1); >+ tail = tail.trim(); >+ } else { >+ head = input; >+ } > >- if (sLabel.length > 1) >- sLabel[1] = sLabel[1].trim(); >+ if (head.startsWith("- ")) //$NON-NLS-1$ >+ head = head.substring(2); >+ >+ String[] sLabel; >+ if (tail != null && !tail.isEmpty()) >+ sLabel = new String[] {head, tail}; >+ else >+ sLabel = new String[] {head}; > > return sLabel; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 429096
:
240306
| 240326