[JBoss JIRA] (JBIDE-21149) Improve implementation of EGitUtils.getDefaultRemoteRepo()
by Marián Labuda (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21149?page=com.atlassian.jira.plugi... ]
Marián Labuda closed JBIDE-21149.
---------------------------------
> Improve implementation of EGitUtils.getDefaultRemoteRepo()
> ----------------------------------------------------------
>
> Key: JBIDE-21149
> URL: https://issues.jboss.org/browse/JBIDE-21149
> Project: Tools (JBoss Tools)
> Issue Type: Enhancement
> Components: openshift
> Affects Versions: 4.4.0.Alpha1
> Reporter: Viacheslav Kabanovich
> Assignee: Viacheslav Kabanovich
> Labels: code_quality
> Fix For: 4.3.1.Beta1, 4.4.0.Alpha1
>
>
> When a class provides for some collection property methods "get all", "get first", "has some" it is not a good pattern to 'reuse' "get all" to implement the other methods. For large collections that pattern ends up with bad performance. For small collections the performance is not critical, but it is a good idea to keep to right patterns to avoid an accidental applying a wrong one to a critical case.
> Method EGitUtils.getRemoteGitRepos(IProject) uses advanced API of Java 1.8 for handling collections, but EGitUtils.getDefaultRemoteRepo() just reuses it to get the first element of the list. Java 1.8 Stream operations allow preparing query that is processed on applying a consumer operation. So, if "get first" and "get all" may use the same stream query, we can privately prepare it to be reused in "get first" with Stream.findFirst() and in "get all" with Stream.collect(). [~adietish] please take a look at the attached pull request.
> Method getRemoteGitRepos(IProject) is now used just once in TemplateListPageValidator.validate() only to check that the list is not empty. So it could instead call getDefaultRemoteRepo() and check that it is not null. But while getDefaultRemoteRepo() is implemented with a call to getRemoteGitRepos(), it does not matter what method to call at that point. Thus, a wrong pattern in implementing API (EGitUtils) is followed by a wrong pattern in using it.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 4 months
[JBoss JIRA] (JBDS-3489) Publishing existing eclipse project to OpenShift
by Marián Labuda (JIRA)
[ https://issues.jboss.org/browse/JBDS-3489?page=com.atlassian.jira.plugin.... ]
Marián Labuda closed JBDS-3489.
-------------------------------
Verified in nightly build with OpenShift plugin of version v20151208-0343-B110.
> Publishing existing eclipse project to OpenShift
> ------------------------------------------------
>
> Key: JBDS-3489
> URL: https://issues.jboss.org/browse/JBDS-3489
> Project: Developer Studio (JBoss Developer Studio)
> Issue Type: Feature Request
> Components: openshift, requirements
> Reporter: Max Rydahl Andersen
> Assignee: Fred Bricon
> Priority: Critical
> Labels: new_and_noteworthy, openshift_v3
> Fix For: 9.1.0.Beta1
>
> Attachments: project-selection.bmml, project-selection.png
>
>
> As a developer I would like to take an existing eclipse web project and deploy to my existing openshift v3 connection.
> * This is equivalent to 'oc new-app'
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 4 months
[JBoss JIRA] (JBIDE-21023) ctrl+shft+G sometimes give NPE in cdi tooling
by Rastislav Wagner (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21023?page=com.atlassian.jira.plugi... ]
Rastislav Wagner updated JBIDE-21023:
-------------------------------------
Fix Version/s: (was: 4.4.0.Alpha1)
> ctrl+shft+G sometimes give NPE in cdi tooling
> ---------------------------------------------
>
> Key: JBIDE-21023
> URL: https://issues.jboss.org/browse/JBIDE-21023
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: cdi
> Reporter: Max Rydahl Andersen
> Assignee: Daniel Azarov
> Fix For: 4.3.1.Beta1
>
>
> used Ctrl+Shift+G on MemberService.java:@Inject validator from html5 kitchensink
> gave me:
> {code}
> java.lang.NullPointerException
> at org.jboss.tools.cdi.ui.search.InjectionPointQueryParticipant.containsInSearchScope(InjectionPointQueryParticipant.java:69)
> at org.jboss.tools.cdi.ui.search.InjectionPointQueryParticipant.search(InjectionPointQueryParticipant.java:104)
> at org.eclipse.jdt.internal.ui.search.JavaSearchQuery$2.run(JavaSearchQuery.java:164)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:170)
> at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:91)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 4 months