Giter VIP home page Giter VIP logo

scalabeans's People

Contributors

advorkovyy avatar rditerwich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

scalabeans's Issues

ScalaTypeCompiler.classInfoCache never gets GC'd

The weak key is an instance of ScalaType and the strong value is an instance of ClassInfo that refers to the same ScalaType instance so the keys are always strongly reachable via the value.

arrays do not work as constructor parameters

This example gives IllegalArgumentException:

case class FixtureWithArray(key:UUID, content:Array[Byte]) 

val descriptor = descriptorOf[FixtureWithArray]
val builder = descriptor.newBuilder()
builder.set(descriptor("key"),UUID.randomUUID())
builder.set(descriptor("content"),Array.empty[Byte])
val instance = builder.result().asInstanceOf[FixtureWithArray] 

The problem is that constructor signature has Scala Array[Byte] type, while compile code has Java type byte[] and paranamer cannot find it. Only workaround at the moment is to get rid of all arrays in the constructor.

Compatibility with scala 2.11.0

Hi,
I can see that it's using scala 2.9 and PickleFormat for instance, that is no longer supported in latest scala versions.

Is there any plan to update the project or is it staled?

Null pointer exception from descriptorOf(Type)

This REPL transcript uses the source cloned from Github (at the time of writing).

scala> import org.scalastuff.scalabeans.Preamble._
import org.scalastuff.scalabeans.Preamble._

scala> import scala.collection._
import scala.collection._

scala> classOf[SortedMap[String,String]]
res0: java.lang.Class[scala.collection.SortedMap[String,String]] = interface scala.collection.SortedMap

scala> descriptorOf(res0)
java.lang.NullPointerException
    at org.scalastuff.scalabeans.BeanIntrospector$.classExtent$1(BeanIntrospector.scala:40)
    at org.scalastuff.scalabeans.BeanIntrospector$.classExtent$1(BeanIntrospector.scala:40)
    at org.scalastuff.scalabeans.BeanIntrospector$.apply(BeanIntrospector.scala:101)
    at org.scalastuff.scalabeans.Preamble$.descriptorOf(Preamble.scala:31)
    at .<init>(<console>:15)
    at .<clinit>(<console>)
    at .<init>(<console>:11)
    at .<clinit>(<console>)
    at $export(<console>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:592)
    at scala.tools.nsc.interpreter.IMain$Request$$anonfun$10.apply(IMain.scala:828)
    at scala.tools.nsc.interpreter.Line$$anonfun$1.apply$mcV$sp(Line.scala:43)
    at scala.tools.nsc.io.package$$anon$2.run(package.scala:31)
    at java.lang.Thread.run(Thread.java:680)

Problem getting proper types

I have a class as ..

case class ContactWithOptionalAddr(name: String, addresses: Option[Map[String, Address]])

When I do a

import org.scalastuff.scalabeans.Preamble._
val descriptor = descriptorOf[ContactWithOptionalAddr]
for (property <- descriptor.properties)
println(property.name + ": " + property.scalaType)

I get ..

name: String
addresses: Option[Map[Tuple2[String,Address]]]

which is not correct .. the Tuple2 I mean .. help ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.