Created
April 13, 2015 21:01
-
-
Save cvrebert/5f4a2a943299720ac26c to your computer and use it in GitHub Desktop.
jcabi MkGithub example code no longer compiles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[error] /Users/chris/code/no-carrier/src/main/java/qux/Main.java:16: method create in interface com.jcabi.github.Repos cannot be applied to given types; | |
[error] required: javax.json.JsonObject | |
[error] found: java.lang.String | |
[error] reason: argument mismatch; java.lang.String cannot be converted to javax.json.JsonObject | |
[error] github.repos().create | |
[error] /Users/chris/code/no-carrier/src/main/java/qux/Main.java:17: method get in interface com.jcabi.github.Repos cannot be applied to given types; | |
[error] required: com.jcabi.github.Coordinates | |
[error] found: java.lang.String | |
[error] reason: argument mismatch; java.lang.String cannot be converted to com.jcabi.github.Coordinates | |
[error] github.repos().get | |
[error] /Users/chris/code/no-carrier/src/main/java/qux/Main.java:19: cannot find symbol | |
[error] symbol: method post(java.lang.String,java.lang.String) | |
[error] location: variable issues of type com.jcabi.github.Issues | |
[error] issues.post | |
[error] (compile:compileIncremental) javac returned nonzero exit code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package qux; | |
import java.io.IOException; | |
import com.jcabi.github.*; | |
import com.jcabi.github.mock.*; | |
public class Main { | |
public static void main(String[] args) { | |
Github github = null; | |
try { | |
github = new MkGithub("jeff"); | |
} | |
catch (IOException exc) { | |
return; | |
} | |
github.repos().create("jcabi/jcabi-github"); | |
Repo repo = github.repos().get("jcabi/jcabi-github"); | |
Issues issues = repo.issues(); | |
Issue issue = issues.post("issue title", "issue body"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment