Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am Wajihulhassan on github.
* I am wajih (https://keybase.io/wajih) on keybase.
* I have a public key whose fingerprint is D7CF D1FB 3766 3681 4141 DC3B 385E DA46 621E F896
To claim this, I am signing this object:
sudo apt-get update -qq
sudo apt-get install git
git clone https://github.com/IntelLabs/HPAT.jl.git
if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
sudo apt-get install -qq gcc g++ gfortran cmake openmpi-bin openmpi-common libopenmpi-dev libhdf5-openmpi-dev libblas-dev libopenblas-dev gettext libmagickwand5 libcairo2 libpango1.0-0 tcl8.5 tk8.5
wget https://julialang.s3.amazonaws.com/bin/linux/x64/0.4/julia-0.4.5-linux-x86_64.tar.gz
tar -xvf julia-0.4.5-linux-x86_64.tar.gz
mv julia-2ac304dfba julia
export PATH=/home/wajih_lums/julia/bin/:$PATH
@Nicholas do you think the following code should not be a reference equality.I believe it should be a value equality using "isequals"
As both of them are different strings. You can open the file and check it yourself. Let me know what do you think.
/home/wajih/cs498/wajih-fork/che/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/internal/core/ClasspathEntry.java:1007: warning: [StringEquality] String comparison using reference equality instead of value equality
if (e.getStatus().getMessage() == Messages.status_IOException) {
^
(see http://errorprone.info/bugpattern/StringEquality)
Did you mean 'if (Objects.equals(e.getStatus().getMessage(), Messages.status_IOException)) {'?
che/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryService.java,http://docs.codenvy.com/user/creating-factories/factory-parameter-reference/,161
che/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/javadoc/JavadocContentAccess2.java,http://download.oracle.com/javase/1.4.2/docs/tooldocs/solaris/javadoc.html,1694
che/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnectorConfiguration.java,https://docs.docker.com/articles/networking/,156
@Wajihulhassan
Wajihulhassan / gist:eca620a5d0199ad9f3534a7d57576392
Created April 10, 2016 00:49
Closing OutputStream before calling toByteArray on the underlying ByteArrayOutputStream
When a `DataOutputStream` or an `ObjectOutputStream` instance wraps an underlying ByteArrayOutputStream instance,
it is recommended to flush or close the DataOutputStream and ObjectOutputStream before invoking the
underlying instances's toByteArray(). Also, it is a good practice to call flush/close explicitly
as mentioned for example [here] (http://stackoverflow.com/questions/2984538/how-to-use-bytearrayoutputstream-and-dataoutputstream-simultaneously-java).
This pull request adds a `flush` method before calling toByteArray().