Git Product home page Git Product logo

lambdaj's People

Watchers

 avatar

lambdaj's Issues

descoping extract and convert

i think that extract and convert are not in scope of lambdaj. Can we remove
those function?

Original issue reported on code.google.com by luca.marrocco on 9 Jan 2009 at 10:40

map

can we make map function with follow abstract signature:
{{{
map(unaryFunction, list) -> list, apply unaryFunction to each item
}}}

Original issue reported on code.google.com by luca.marrocco on 9 Jan 2009 at 10:42

Typo in Invocation

In 
http://code.google.com/p/lambdaj/source/browse/trunk/src/main/java/ch/lambdaj
/function/argument/Invocation.java#21

I see:

    private String in[k]vokedPropertyName;

While I think it should be:

    private String invokedPropertyName;


Original issue reported on code.google.com by [email protected] on 15 Mar 2010 at 2:09

lambdaj-1.9-with-dependencies.jar contains 240kb of unnecessary files and classes

lambdaj-1.9-with-dependencies.jar contains many unnecessary files and
classes.  The following files and classes are included in the jar and
should be removed:


C:/              (looks to be a copy of ch/lambdaj class files)
junit/           (copy of junit class files)
org/apache       (apache commons logging class files)
org/junit/       (junit class files)

None of the files and classes seem to be needed for lambdaj runtime, 
as best as I can tell, the only files required are:

ch/*
net/*
org/hamcrest/*




Original issue reported on code.google.com by [email protected] on 23 Jun 2009 at 5:49

Exception: Unable to convert the placeholder -2147483638 in a valid argument in multi-threading environment

What steps will reproduce the problem?
1. Run the App.main(String[] args) in the project attached
2. If exception is not reproduced - play around with INNER_LOOP_NUMBER and 
TASK_NUMBER consts

What is the expected output? What do you see instead?
Expected output - lots of string with some statistic numbers. Instead 
application exits with multiple Exception messages:
ch.lambdaj.function.argument.ArgumentConversionException: Unable to convert the 
placeholder -2147483646 in a valid argument
    at ch.lambdaj.function.argument.ArgumentsFactory.actualArgument(ArgumentsFactory.java:78)
    at ch.lambdaj.function.convert.ArgumentConverter.<init>(ArgumentConverter.java:23)
    at ch.lambdaj.Lambda.extract(Lambda.java:930)
    at com.test.App$1.call(App.java:66)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

What version of the product are you using? On what operating system?
2.3 JDK 1.6.0_16 under Windows XP SP3

Please provide any additional information below.
System.gc() allows to reproduce the issue faster, but even without that I 
managed to reproduce the same issue

Original issue reported on code.google.com by [email protected] on 8 Aug 2010 at 2:05

Attachments:

having() hides InvocationExceptions

What steps will reproduce the problem?

    // the following code is free to modify and copy
    private static class PrivateBean2 {
        public String getFoo() {
            return "foo";
        }
    }

    @Test(expected=InvocationException.class)
    public void testThatHavingHideAccessViolationProblems(){
        PrivateBean2 bean = new PrivateBean2();

        Matcher matcher = having(on(PrivateBean2.class).getFoo(), equalTo("foo"));
        matcher.matches(bean); // this will cause access to a private class from
                               // the caller (which is HasArgumentWithValue).
    }


What is the expected output? What do you see instead?
As stated in the test I expected an InvocationException.

What version of the product are you using? On what operating system?
sources from the trunk.

Please provide any additional information below.

I think that the problem is in HasArgumentWithValue#matches() which ignores any 
exception returning false.

        // from HasArgumentWithValue.java
    public boolean matches(Object item) {
        if (argument == null) return false;
        try {
            return value.matches(argument.evaluate(item));
        } catch (Exception e) {
            return false;
        } 
    }

Original issue reported on code.google.com by [email protected] on 27 Aug 2009 at 4:23

sum(..) functions will break is there's a numeric overflow for the type in question.

Add this one to SumTest.java :

    @Test
    public void testSumMaxInteger() {
        assertThatSum(Integer.MAX_VALUE, Integer.MAX_VALUE-1, is(equalTo(????)));
    }

It is possible that where overflows are detected, the following promotions 
should happen:-

   short -> int -> long -> BigInteger
   float -> double -> BigDecimal

And if the topmost value overflows, then some failure is communicated to the 
developer at runtime.

Original issue reported on code.google.com by [email protected] on 2 Sep 2010 at 1:42

Lambda.sum does not work with empty list.

What steps will reproduce the problem?

1. Put any empty list to sum and a ClassCastException is thrown.
2. Lambda.sum(Collections.emptyList(), Lambda.on(Person.class).getAge());
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
2.3.1. Windows XP.

Please provide any additional information below.

I think that class cast exception comes from returning 0.0 (Double) from this 
method that is tried to cast to Integer.

----  Lambdaj.sum

public static Number sum(Object iterable) {
  if (iterable instanceof Number) return (Number)iterable;
  Iterator<?> iterator = asIterator(iterable);
  return iterator.hasNext() ? aggregate(iterator, getSumAggregator(iterator.next())) : 0.0;
}

----------

Original issue reported on code.google.com by [email protected] on 26 Aug 2010 at 11:55

filter

can we implemenent filter function with follow abstract signature:
{{{
filter(matcher, list) -> filtered list
}}}


Original issue reported on code.google.com by luca.marrocco on 9 Jan 2009 at 10:41

lambdaj can't work fine on the Google Apps Engine

What steps will reproduce the problem?
I found lots function like select(..), selectFirst(..) can't work fine on the 
GAE

What is the expected output? What do you see instead?

We got following exception message:

java.lang.NoClassDefFoundError: sun.reflect.ReflectionFactory is a restricted 
class. 
Please see the Google  App Engine developer's guide for more details.

at 
com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java
:51)
at 
org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.<init>(SunReflec
tionFactoryInstantiator.java:40)
at 
org.objenesis.strategy.StdInstantiatorStrategy.newInstantiatorOf(StdInstantiator
Strategy.java:85)
at org.objenesis.ObjenesisBase.getInstantiatorOf(ObjenesisBase.java:90)
at org.objenesis.ObjenesisBase.newInstance(ObjenesisBase.java:73)
at ch.lambdaj.proxy.ClassImposterizer.createProxy(ClassImposterizer.java:134)
at ch.lambdaj.proxy.ClassImposterizer.imposterise(ClassImposterizer.java:101)
at ch.lambdaj.proxy.ProxyUtil.createArgumentProxy(ProxyUtil.java:60)
at 
ch.lambdaj.function.argument.ArgumentsFactory.createPlaceholder(ArgumentsFactory
.java:52)
at 
ch.lambdaj.function.argument.ArgumentsFactory.registerNewArgument(ArgumentsFacto
ry.java:45)
at 
ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.ja
va:39)
at 
ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.ja
va:31)
at ch.lambdaj.Lambda.on(Lambda.java:43)
...

What version of the product are you using? On what operating system?

Google Apps Engine for Java 1.3.4

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 2 Sep 2010 at 8:06

Change groupid for maven artifact

Maybe we should change the groupid of the artifact to something different
than "exm" since this a maven practice to name it like the hostname of the
project.

I think "org.lambdaj" is best.

Original issue reported on code.google.com by [email protected] on 1 Jul 2009 at 3:03

StringIndexOutOfBoundsException for expression with get(index) over list

What steps will reproduce the problem?

Collection<IntervalsContainer> intervalsCollections = ...;
Date min = min(intervalsCollections, 
on(IntervalsContainer.class).getIntervals().get(0).getStart())

interface IntervalsContainer {  

        /** 
    * ordered by start date
    */
        List<Interval> getIntervals();

}


interface Interval{

    Date getStart();
    Date getEnd();

}

What is the expected output? What do you see instead?
expected output: some date
actual: 
java.lang.StringIndexOutOfBoundsException: String index out of range: 1
    at java.lang.String.substring(Unknown Source)
    at ch.lambdaj.util.IntrospectionUtil.getPropertyName(IntrospectionUtil.java:24)
    at ch.lambdaj.function.argument.Invocation.getInkvokedPropertyName(Invocation.java:54)
    at ch.lambdaj.function.argument.InvocationSequence.<init>(InvocationSequence.java:33)
    at ch.lambdaj.function.argument.ProxyArgument.invoke(ProxyArgument.java:37)
    at $Proxy500.get(Unknown Source)


What version of the product are you using? On what operating system?
2.1


Original issue reported on code.google.com by [email protected] on 23 Jun 2010 at 10:09

Current pom does not integrate dependencies

What steps will reproduce the problem?
1. run: mvn clean package

What is the expected output? What do you see instead?
Should build lambdaj with all dependencies included (optionally).
Currently, does only build lambdaj with external dependencies. We need both.


Conceptual: How can we support both in a maven'esce way?


Original issue reported on code.google.com by [email protected] on 20 Jul 2009 at 10:18

Add size() from GroupImpl to Group please

Following on from http://code.google.com/p/lambdaj/issues/detail?id=36,  I'm 
100% sure I want size() rather than getSize() for my case.

I initially coded for getSize() but saw unexpected results for the scenario I 
was following.  In the debugger, I saw that size() was giving the correct 
results (and different to getSize()). 

I'm thinking you won't believe me until I upload a failing tests case right ?



Original issue reported on code.google.com by [email protected] on 30 Aug 2010 at 8:31

Closure println = closure();{ of(system.out).println(var(string.class)); } not working with IBM JVM

This example is not working with IBM JVM (throws NullPointerException), 
but works with the Sun version -->
Due to the fact that
IBM System.out.getClass()=com.ibm.jvm.io.ConsolePrintStream
and
Sun System.out.getClass()=java.io.PrintStream

the IBM impl. is a final class, not the case with the Sun one.

I have found that the LambdaJ class ProxyUtil checks if the closed object 
is of final class. I am not sure why is this the case???

It works though if I wrap it with a PrintStream (PrintStream(System.out))

Regards

Georgios

Original issue reported on code.google.com by [email protected] on 26 Aug 2009 at 11:14

2.3.1 missing from Maven repositories.

The upload regime changed.

I had to do a lot of trial and error to get a different Maven project published 
into the ecosystem :- 
http://github.com/paul-hammant/mockpico/blob/master/pom.xml

Original issue reported on code.google.com by [email protected] on 2 Sep 2010 at 9:08

documentation suggestions for the features pages

greaterThan(n) .... it would be nice to see the the code for this, just before 
or after the first reference to it.

Variable oldFriends should be renamed to thoseWithBestFriendsOverThirty

You've given real Lambda expressions inline, which will confuse Java folks who 
are not as well read.  Perhaps explain them more 


Original issue reported on code.google.com by [email protected] on 2 Sep 2010 at 2:11

Lambda.select() methods vurnelable to null

When iterable passed to select is null it causes NullPointerException. In v2.0 
it returned empty list which is a way nicer as does not require all those 
if(iterable != null) checks outside the select call.

Original issue reported on code.google.com by [email protected] on 12 Nov 2010 at 5:18

append() method of LambdaCollection fails to update innerIterator causing forEach to fail

The append method uses the addAll of the inner collection, but the addAll 
implementation does not update the innerIterator initially created in 
AbstractLambdaCollection.

This will cause the iterator to be out of sync in all subsequent calls using 
this iterator after the initial collection is modified causing a 
ConcurrentModificationException.

See attached patch with test and fix.

Original issue reported on code.google.com by [email protected] on 25 Aug 2010 at 1:32

Attachments:

Where are the release 2.0 sources?

Hello,

How can I get a source jar for the latest 2.0 release?

I looked in the svn repository, but didn't find a tag for 2.0. 

Of course the best would be if you could put the ready-made source jar in
the maven repository (I saw that in issue 7
http://code.google.com/p/lambdaj/issues/detail?id=7 there was a mention
about it already for future releases).

Thanks for the great software!
Timo

Original issue reported on code.google.com by [email protected] on 2 Oct 2009 at 11:04

group() blows up

What steps will reproduce the problem?
1. Unpack the attached eclipse project
2. Run the test inside of Eclipse

What is the expected output? What do you see instead?
I expect the test to complete.
Instead I get a failure:

java.lang.RuntimeException: java.lang.NoSuchMethodException:
FeldError.-2147483646()
    at
ch.lambdaj.util.IntrospectionUtil.getPlainPropertyValue(IntrospectionUtil.java:5
2)
    at
ch.lambdaj.util.IntrospectionUtil.getBooleanPropertyValue(IntrospectionUtil.java
:44)
    at
ch.lambdaj.util.IntrospectionUtil.getPropertyValue(IntrospectionUtil.java:36)
    at
ch.lambdaj.group.StringGroupCondition.getGroupValue(StringGroupCondition.java:41
)
    at ch.lambdaj.group.GroupImpl.addItem(GroupImpl.java:30)
    at ch.lambdaj.group.Groups.group(Groups.java:58)
    at ch.lambdaj.group.Groups.group(Groups.java:46)
    at LambdajBarfsTest.lambdajBarf(LambdajBarfsTest.java:24)

What version of the product are you using? On what operating system?
2.1 - lambdaj
Linux - SUSE 10.x
Java 1.6

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 8 Mar 2010 at 11:59

Exception thrown if using forEach on a collection with an Interface generic

To reproduce:

public interface Animal {
 public String getNoise();
}

public class Dog {
 public String getNoise() {
  return "Woof!";
 }
}

public class Cat {
 public String getNoise() {
  return "Meeow!";
 }
}

public static void main(String[] args) throws Exception {
 Collection<Animal> animals = new ArrayList<Animal>();
 animals.add(new Dog());
 animals.add(new Cat());
 StringBuilder sb = new StringBuilder();
 sb.append(forEach(animals).getNoise());
 System.out.println(sb.toString());
}

Result:

ch.lambdaj.proxy.UnproxyableClassException: Unable to proxy the final class
[Ljava.lang.Object;

Expected:

"Woof!Meeow!"

If this is not possible, it should be documented.

Original issue reported on code.google.com by [email protected] on 10 Dec 2009 at 6:15

split lambda

lambda class appear to be too large. i think that is better split in some
classes with sigle responsability.

i want create a package lang inside lambdaj with one class per responsability:
 * ch.lambdaj.lang.Join
 * ch.lambdaj.lang.Select
 * ch.lambdaj.lang.Filter
 ...

Original issue reported on code.google.com by luca.marrocco on 9 Jan 2009 at 10:44

ClassCastException when using generics

What steps will reproduce the problem?
1. create a class a generic property (e.g. BaseEntity with property id which 
takes a generic type T)
2. create a subclass of BaseEntity (e.g. Person<Long>) --> thus id is of type 
Long 
3. do a on(Person.class).getId()

--> classCastException java.lang.ClassCastException: 
net.sf.cglib.empty.Object$$EnhancerByCGLIB$$3565501f


I'm using version 2.2. 
It seems that ProxyArgument does not 'see' the type is Long instead of Object...

It is behaving very weird, since 'inspecting on(Person.class).getId() during a 
debugging session does workd, but assigning it to a variable, does give the 
classcast...
I know: very weird, but I hope you can help..

Thanks

Original issue reported on code.google.com by [email protected] on 12 Jul 2010 at 1:37

Cannot use Iterable<Double> because Double is a final class

What steps will reproduce the problem?
1. Use this code:

//just create any abitrary list of jdk final types:
List<Double> numbers = com.google.common.collect.Lists.newArrayList(1.0, 2.0);

Double minimum = minFrom(numbers);

What is the expected output? What do you see instead?
minimum = 1.0.
I get an exception "Double is a final class and cannot be proxied".


Before version 1.10, we had some code inside to proxy a final class.
However it has been removed by Mario during the merge with my changes to
proxy classes without relying on a default constructor. 

What was the reason to remove it?

-Sebastian

Original issue reported on code.google.com by [email protected] on 13 Jul 2009 at 3:04

new variance and noVariance functions.

// you choose between variance(..) and hasVariance(..) 
// and  noVariance(..) and hasNoVariance(..) 

public class GroupsVarianceTest {

    private Person mario1 = new Person("Mario", "Fusco", true, "01/01/1999" );
    private Person peter = new Person("Peter", "Pan", true, "02/02/1999" );
    private Person mario2 = new Person("Mario", "Two", true, "04/04/1999");

    @Test
    public void oneGroupsRecognizedSuggestingNoVariance() {
        assertTrue(hasNoVariance(asList(mario1, mario2), by(on(Person.class).getFirstName())));
    }

    private boolean hasNoVariance(Iterable<?> iterable, GroupCondition<?>... conditions) {
        return variance(iterable, conditions) == 1;
    }

    private int variance(Iterable<?> iterable, GroupCondition<?>... conditions) {
        return group(iterable, conditions).subgroups().size();
    }

}

Original issue reported on code.google.com by [email protected] on 2 Sep 2010 at 1:15

Eliminate duplicate methods

Eliminate duplicate methods in class Lambda:

- collect(iterable, argument) is a duplicate of extract(iterable, argument)
- filter is a duplicate of select

Original issue reported on code.google.com by [email protected] on 30 Aug 2009 at 5:49

sum() should support BigDecimal


right now it's throwing:

Exception in thread "main" java.lang.RuntimeException: unable to aggregate
0.0 and 1
    at ch.lambdaj.function.aggregate.Sum.aggregate(Sum.java:27)
    at ch.lambdaj.function.aggregate.Sum.aggregate(Sum.java:11)
    at
ch.lambdaj.function.aggregate.PairAggregator.aggregate(PairAggregator.java:22)
    at ch.lambdaj.Lambda.aggregate(Lambda.java:373)
    at ch.lambdaj.Lambda.aggregate(Lambda.java:388)
    at ch.lambdaj.Lambda.sum(Lambda.java:454)

As I can see only Integer, Long, Float and Double are supported. 


Original issue reported on code.google.com by [email protected] on 3 Nov 2009 at 9:56

Does not call methods on Mockito mocks

I have just been trying out LambdaJ 2.0, checked out from
http://lambdaj.googlecode.com/svn/trunk/ on Mac OS X 10.6.1 (Snow Leopard).


Reproducing the problem.
1. Create a few Mockito mocks of a class. Add them to some collection.
2. Call Lambdaj.forEach(..) with the collection as argument. Call some
method on the returned proxy. I.e: forEach(mocks).someMethod();
3. Use Mockito.verify(..) to check that the method was called once on each
mock.

Expects Mockito.verify(..) to succeed. Instead Mockito fails telling that
there were no interactions with the mocks.

The attached file contains a small Maven project with a testcase showing
the scenario above.

I suspect that there may be some mismatching since both Mockito and LambdaJ
uses CGLIB proxies? Maybe lambdaj is seeing a proxy and thinks it is its
own and thus uses the proxied object instead of the CGLIB proxy coming from
an external source, in this case Mockito.

Thanks for what seems to be a very nice library!

Original issue reported on code.google.com by flobakk on 15 Sep 2009 at 11:11

Attachments:

Lambda.of() doesn't handle list arguments properly

If I use Lambda.of() on a two-arg method where the first arg is a List, and if 
I 
supply a literal, non-empty list as the first arg and an unbound var as the 
second arg, things are fine. If I submit an empty list, there is an exception. 
If I 
use a one-arg method call and supply it either an empty or a non-empty list, 
there is an exception, but a different one in each case.

See attached JUnit test. Tested against rev number 775.

Original issue reported on code.google.com by [email protected] on 24 Nov 2009 at 3:19

Attachments:

sumFrom Enhancement

Hi,

this is not really an Issue. It's  maybe an suggestion for the sumFrom
function. I am not really sure that is yet already possible.

For example i have the following person class:

class Person{
   int age;
   int iq;
   int count1;
   int count2;
}

So now i want to sum all of the variables from a list of persons.

Person personSum = sumFrom(persons);
personSum.getAge();
personSum.getIq();
personSum.getCount1();
personSum.getCount2();

The problem is that for each variables i whant to sum, the hole list is
iterated. Or did i get it wrong?

Wouldn't it be better so sum all variables with the sumFrom(persons); call,
and then cache it in the proxy object?


PS: I did'nt find a better place to post this...sorry
Excelent library! Keep it up!

Original issue reported on code.google.com by [email protected] on 30 Aug 2009 at 6:08

Group.subgroups() throws

What steps will reproduce the problem?
1. Instantiate new hierarchical 2-level Group with 
     Group<SomeClass> groupedObjects = Groups.group(someList,
       by(on(SomeClass.class).getString1()),
       by(on(SomeClass.class).getString2()));
2. Iterate over all subgroups
     for (Group<SomeClass> subgroup1 : groupedObjects.subgroups()) {
       //...
     }

What is the expected output? What do you see instead?
I expected to be able to iterate over all subgroups of groupedObjects;
instead, I got a ClassCastException: SomeClass cannot be cast to Group. 

What version of the product are you using? On what operating system?
Version 2.2, Microsoft Windows 7 Professional

Please provide any additional information below.
Apparently, the returned list does not contain objects of type Group, but
already of type SomeClass.

Original issue reported on code.google.com by [email protected] on 21 Apr 2010 at 6:52

ClosureTest fails in "testAs()" with IllegalAccessException for Object.finalize during garbage-collection

What steps will reproduce the problem?
1. Run ch.lambdja.ClosureTest
2.  testAs fails
3.

What is the expected output? What do you see instead?
should run. I'm seeing:

ch.lambdaj.function.closure.WrongClosureInvocationException: Error invoking
protected void java.lang.Object.finalize() throws java.lang.Throwable on 12
    at
ch.lambdaj.function.closure.AbstractClosure.closeOne(AbstractClosure.java:51)
    at
ch.lambdaj.function.closure.AbstractClosure$1.invoke(AbstractClosure.java:164)
    at $Proxy5.nonCommutativeDoOnInt(Unknown Source)
    at ch.lambdaj.ClosureTest.testAs(ClosureTest.java:172)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
    at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
    at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
    at
org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadi
e.java:87)
    at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
    at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
    at
org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.
java:88)
    at
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:5
1)
    at
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
    at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
    at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
    at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
    at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReferen
ce.java:46)
    at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner
.java:467)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner
.java:683)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java
:390)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.jav
a:197)
Caused by: java.lang.IllegalAccessException: Class
ch.lambdaj.function.closure.AbstractClosure can not access a member of
class java.lang.Object with modifiers "protected"
    at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at
ch.lambdaj.function.closure.AbstractClosure.closeOne(AbstractClosure.java:49)
    ... 25 more



When running testAs in isolation, it does not fail! This looks like a
threading/gc issue as the error is when finalize should be invoked.



Original issue reported on code.google.com by [email protected] on 20 Jul 2009 at 4:06

ch.lambdaj.proxy.ClassImposterizer.createProxyClass NoClassDefFoundError

What steps will reproduce the problem?
1. add into the project classpath lambdaj-2.3.1-with-dependencies.jar
2. generate a runnable jar with required libraries into the generated Jar
3. if I run my jar from console I get the below stacktrace. If I run from 
eclipse it works (I'm using other dependencies such Hibernate but the error is 
when Lambdaj doesn't finds a class). If I comment my code that uses lambdaj it 
works.

Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/Type
        at net.sf.cglib.core.TypeUtils.parseType(TypeUtils.java:180)
        at net.sf.cglib.core.KeyFactory.<clinit>(KeyFactory.java:66)
        at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
        at ch.lambdaj.proxy.ClassImposterizer.createProxyClass(ClassImposterizer
.java:113)
        at ch.lambdaj.proxy.ClassImposterizer.imposterise(ClassImposterizer.java
:100)
        at ch.lambdaj.proxy.ProxyUtil.createArgumentProxy(ProxyUtil.java:60)
        at ch.lambdaj.function.argument.ArgumentsFactory.createPlaceholder(Argum
entsFactory.java:52)
        at ch.lambdaj.function.argument.ArgumentsFactory.registerNewArgument(Arg
umentsFactory.java:45)
        at ch.lambdaj.function.argument.ArgumentsFactory.createArgument(Argument
sFactory.java:39)
        at ch.lambdaj.function.argument.ArgumentsFactory.createArgument(Argument
sFactory.java:31)
        at ch.lambdaj.Lambda.on(Lambda.java:43)
        at aggrPack.Transformation.compareQuantitySum(Transformation.java:66)
        at aggrPack.Transformation.convert(Transformation.java:42)
        at aggrPack.Transformation.inspectDir(Transformation.java:91)
        at aggrPack.Transformation.main(Transformation.java:117)
        ... 5 more
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.Type
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 20 more

Original issue reported on code.google.com by [email protected] on 25 Oct 2010 at 6:19

Performance analysis report is wrong

What steps will reproduce the problem?
1. I get svn/  trunk/ src/ test/ java/ ch/ lambdaj/ demo/ *
2. And download jar file set the class path in eclipse
3. When I run this program I got worst performance report 

mysystem configuration 1 GB RAM, 3.0 dual core processer, and lenovo PC.

out put like 
-------------------------------------------------
*** testPrintAllBrands
iterative: 526 msecs
lambdaj: 4346 msecs
*** testFindAllSalesOfAFerrari
iterative: 371 msecs
lambdaj: 3914 msecs
*** testFindAllBuysOfYoungestPerson
iterative: 13396 msecs
lambdaj: 17139 msecs
*** testFindMostCostlySaleValue
iterative: 310 msecs
lambdaj: 2954 msecs
*** testSumSalesCostWhereBothActorsAreAMale
iterative: 542 msecs
lambdaj: 7394 msecs
*** testFindYoungestAgeOfWhoBoughtACarForMoreThan50000
iterative: 10395 msecs
lambdaj: 22245 msecs
*** testSortSalesByCost
iterative: 4362 msecs
lambdaj: 17372 msecs
*** testExtractCarsOriginalCost
iterative: 247 msecs
lambdaj: 1036 msecs
*** testIndexCarsByBrand
iterative: 511 msecs
lambdaj: 1284 msecs
*** testGroupSalesByBuyersAndSellers
iterative: 24735 msecs
lambdaj: 38626 msecs
*** testFindMostBoughtCar
iterative: 7549 msecs
lambdaj: 30136 msecs
526;526;526;4346;4346;4346
371;371;371;3914;3914;3914
13396;13396;13396;17139;17139;17139
310;310;310;2954;2954;2954
542;542;542;7394;7394;7394
10395;10395;10395;22245;22245;22245
4362;4362;4362;17372;17372;17372
247;247;247;1036;1036;1036
511;511;511;1284;1284;1284
24735;24735;24735;38626;38626;38626
7549;7549;7549;30136;30136;30136


Original issue reported on code.google.com by sasimsit on 8 Sep 2009 at 1:45

ClassCastException when type does not have an empty constructor

when issuing forEach, for example on a collection of a type that does not
have a default constructor, a ClassCastException is thrown

I  would expect a better exception, like "target type %s does not have a
default constructor"

probably a better solution is to allow ProxyUtil to
createProxyForClassWithoutDefaultConstructor...

keep up the good work

Original issue reported on code.google.com by [email protected] on 25 Jun 2009 at 9:22

org.lambdaj

using ch as package root is not commond in open source environment.
normally opensource project use a domain that end with .org and project are
tagged using this convention.

i think that is better to use .org instead of .ch


Original issue reported on code.google.com by luca.marrocco on 21 Jan 2009 at 7:06

Make lambdaj available in a maven repository

Hi,

Nice project of yours!
It would be nice if lamdaj would be available in a maven repository. You
can create a repository using the googlecode svn server because it is
accessible via HTTP (http://lambdaj.googlecode.com/svn/). You can use the
wagon-svn (https://wagon-svn.dev.java.net/) to deploy the artifacts with maven.

Original issue reported on code.google.com by [email protected] on 23 May 2009 at 2:07

join() does not support array iterable

What steps will reproduce the problem?

Lambda.join(new String[] { "a", "b", "c" });

What is the expected output? What do you see instead?

returns "[Ljava.lang.String;@..." instead of "a, b, c" as expected. This should 
work the same as the other methods that work on collections, maps and arrays.

What version of the product are you using? On what operating system?

lambdaj 2.2 on Mac OS X 10.6

Please provide any additional information below.

I don't have enough knowledge of the inner workings of lambdaj to provide a 
patch, but this shouldn't be too hard to fix if the patterns from other methods 
are followed.

Original issue reported on code.google.com by [email protected] on 21 Jun 2010 at 7:16

first class function?

hi,
i have see that we use some class such as Converter to implemente a sort of
"first class function" that isn't present in java. The proble is that
Converter is not a public interface and can force user to extend this non
common interface.. sincerly i prefer decreasing the granularity of lambdaj
using reflection for instance in first release and add some specific
behaivor in next release whenever we have some other users interesting it that.


Original issue reported on code.google.com by luca.marrocco on 21 Jan 2009 at 7:10

Unable to convert the placeholder false

What steps will reproduce the problem?
run:
System.out.println(
select(
  Arrays.asList("Test", "this", "bug"),
  having(Boolean.valueOf(on(String.class).startsWith("Te")))));

What is the expected output? What do you see instead?
("Test")

Exception in thread "main" java.lang.RuntimeException: Unable to convert
the placeholder false in a valid argument
    at
ch.lambdaj.function.argument.ArgumentsFactory.actualArgument(ArgumentsFactory.ja
va:78)


What version of the product are you using? On what operating system?
lambdaj-2.1

Please provide any additional information below.

ArgumentsFactory$LimitedValuesArgumentHolder:
        private final Argument<?>[] booleanArguments = new Argument[2];

both array entries are null at runtime

Original issue reported on code.google.com by [email protected] on 20 Feb 2010 at 3:49

Unable to convert the placeholder <some value> in a valid argument - NOT FIXED in 2.3.1

What steps will reproduce the problem?
1. Run the Unit test in Intellij

What is the expected output? What do you see instead?
1. I upgraded to 2.3.1 as I was getting "Unable to convert the placeholder" 
issue randomly in 2.2 version. Now I am getting this issue consistently even on 
Unit test.

What version of the product are you using? On what operating system?
1. Version 2.3.1 of Lambdaj in Windows 7.

Please provide any additional information below.
We are already using Lambdaj extensively in our project and we need a fix for 
this at the earliest.

Thanks,
Venkatesh Nannan
ThoughtWorks.

Original issue reported on code.google.com by nvenky on 1 Oct 2010 at 1:35

Attachments:

Unable to convert the placeholder (due to garbage collection)

What steps will reproduce the problem?
1.create a memory consuming application so the garbage collector jumps in
quite often. 
2. do a lot (thousends) on(<someclass>.class).<someGetter>())
3. You get sometimes the error Unable to convert the placeholder <value of
the getter> in a valid argument

Debugging took me to the ArgumentsFactory.placeholderByInvocation. This is
a WeakHashMap, so things get GarbageCollected...
I'll try to debug further, but there is definately something wrong...

What version of the product are you using? On what operating system?
2.1


Original issue reported on code.google.com by [email protected] on 10 Nov 2009 at 11:37

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.