Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#140 fix ssl problems #153

Merged

Conversation

malaskowski
Copy link
Contributor

Ignore certificates when collecting source from the page.


I hereby agree to the terms of the AET Contributor License Agreement.

* 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.
*/
package com.cognifide.aet.job.common.collectors.source;

import com.cognifide.aet.communication.api.metadata.CollectorStepResult;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new imports order is good according to the Google styleguide:
https://google.github.io/styleguide/javaguide.html#s3.3-import-statements
however we have it different order in other files...

maybe we could use current convention and discuss what to do with not so google order of imports in future?
I mean: it might be better to have it consistent through all of files. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should finally have all imports consistent with formatter we recommend. The problem here is that Google changed formatting approach in one of previous formatters version.
I revert the change in imports order in files of this pull request and let's discuss what to to with it.
Thanks for noticing that :)

content = (byte[]) future.get(timeoutValue, TimeUnit.MILLISECONDS);
} catch (TimeoutException | InterruptedException | ExecutionException e) {
return httpRequestExecutor.executeGetRequest(properties.getUrl(), timeoutValue).getContent();
} catch (IOException e) {
throw new ProcessingException(e.getMessage(), e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could add error LOG with exception message and requested URL?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already logged in CollectorDispatcherImpl in the catch block.

@@ -71,7 +71,7 @@
@Before
public void setUp() throws Exception {
when(wrapper.getWebDriver()).thenReturn(webDriver);
when(wrapper.getHttpRequestBuilder()).thenReturn(builder);
when(wrapper.getHttpRequestBuilder()).thenReturn(requestExecutor);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about also changing the method name from getHttpRequestBuilder() to getHttpRequestExecutor() ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I missed that.

*/
package com.cognifide.aet.worker.drivers;

import com.cognifide.aet.job.api.collector.HttpRequestExecutor;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could stay with current, not so correct convention for imports order for now? (see another comment about imports order)

@@ -54,9 +54,9 @@ public JsErrorLog apply(JavaScriptError input) {

private final ProxyServerWrapper proxyServer;

private final HttpRequestBuilder builder;
private final HttpRequestExecutor builder;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we rename the field from builder to executor ?

@wiiitek
Copy link
Contributor

wiiitek commented Oct 26, 2017

Thank you for the work @Skejven! I am still working on the support for new Karaf version, but the work goes slow..

@malaskowski malaskowski merged commit 11f88d1 into master Oct 31, 2017
@malaskowski malaskowski deleted the bugfix/#140-fix-ssl-problems-with-source-collector branch October 31, 2017 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants