Skip to content

Add java/OlaClient.getUniverseList() - #1231

Merged
peternewman merged 12 commits into
OpenLightingProject:masterfrom
hepiyellow:add_java_get_universe_list
Jun 10, 2017
Merged

peternewman merged 12 commits into
OpenLightingProject:masterfrom
hepiyellow:add_java_get_universe_list

Conversation

@hepiyellow

@hepiyellow hepiyellow commented Apr 22, 2017 •

Copy link
Copy Markdown
Contributor

Add missing Java OlaClient method for fetching all universes.
The RPC already existed, just added the Java method, which is similar to the existing java/OlaClient.getUniverseInfo(int universe), just without the universe argument.

BTW: I have an issue running ola's top-level make on my machine so i didn't do it. I only run the `java/make ola.jar'.

@peternewman peternewman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for this, a few small changes please.

Comment thread java/.gitignore Outdated
@@ -0,0 +1,4 @@
src/main/java/ola/proto/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you put this all in our central .gitignore in root please.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

}


/**

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This would probably be better written as "Get a list of info about all universes"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@peternewman

Copy link
Copy Markdown
Member

What's the error you get running the top level Make command?

@peternewman peternewman added this to the 0.11.0 milestone Apr 22, 2017
Comment thread java/ChangeLog
@@ -0,0 +1,2 @@
04/22/2017 Erez Makavy <hepi.yellow@gmail.com>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we're going to have a ChangeLog (and I'm personally undecided), can you add some info about v0.0.1 too please.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@hepiyellow

Copy link
Copy Markdown
Contributor Author

I am getting an error when doing sudo make install (after make and make check worked).
This is the error:

$ sudo make install
Password:
/Applications/Xcode.app/Contents/Developer/usr/bin/make  install-recursive
Making install in java
mvn package
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
	at org.codehaus.plexus.classworlds.launcher.Launcher.getMainClass(Launcher.java:144)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:266)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
make[2]: *** [ola.jar] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2

I don't think it is related to my change?
Anyways, any idea how to solve it?

@peternewman

Copy link
Copy Markdown
Member

Can you resync and resolve conflicts please @hepiyellow , I've just merged some changes so we can test the Java stuff via Travis.

@peternewman

Copy link
Copy Markdown
Member

I'm not sure about the error @hepiyellow . Do you want to try a checkout of the previous code just to confirm it's not you (I suspect it isn't too).

@peternewman peternewman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@peternewman

Copy link
Copy Markdown
Member

General discussion point, should Java API versions track the OLA versions, or stay independent?

@peternewman

Copy link
Copy Markdown
Member

Hi @hepiyellow . Can you fix the build issue please, then we can look at merging this. Thanks

@hepiyellow

Copy link
Copy Markdown
Contributor Author

I updated my branch to fix the cleanup of any version of ola-java-client.
Excuse me for the newbie question, should I do anything after updating the PR brand on my fork? like requesting a PR merge or something? or it is automatic whenever I update the branch?

@peternewman

Copy link
Copy Markdown
Member

Your changes have appeared fine thanks @hepiyellow . I'll try and take a look soon.

@peternewman peternewman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just one minor fix please.

Comment thread java/Makefile.am
surefire-reports/ola.*.txt \
surefire-reports/TEST-*.xml \
ola-java-client-0.0.1.jar
surefire-reports/ola.*.txt \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you fix the whitespace on these three lines, it should all be spaces, not tabs, so they're aligned equally with the lines above and below.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Done.

@peternewman
peternewman requested a review from nomis52 May 30, 2017 23:05

@peternewman peternewman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM now.

@peternewman

Copy link
Copy Markdown
Member

@nomis52 have you got some time to review this before we merge it?

@peternewman
peternewman merged commit 582b375 into OpenLightingProject:master Jun 10, 2017
@peternewman peternewman mentioned this pull request Jul 12, 2026
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.

3 participants