jclouds-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds-examples] BlobStore file system api usage in scala (#4)
Date Tue, 04 Jun 2013 21:46:29 GMT
> +object Main {
> +
> +  def main(args: Array[String]) {
> +    require(args.length == 1,"Invalid number of parameters. Syntax is: \"basedirectory\"
")
> +
> +    val baseDir=args(0)
> +
> +    //Base directory property
> +    val properties=new java.util.Properties()
> +    properties.setProperty(FilesystemConstants.PROPERTY_BASEDIR,baseDir)
> +
> +    val context = ContextBuilder.newBuilder("filesystem")
> +      .overrides(properties)
> +      .buildView(classOf[BlobStoreContext])
> +
> +    try {

Can you replace this with a Scala `Try` block to make it less Java-like?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/4/files#r4534151

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message