chore: add java sample program#26
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a Maven-based Java sample application demonstrating LexActivator licensing flows (trial, license activation, and optional release update checks). It also removes the previously included C/C++ example project artifacts under examples/, which should be clarified since it isn’t reflected in the PR title.
Changes:
- Added a Java sample (
Sample.java) showcasing license/trial checks and optional callbacks. - Added a Maven
pom.xmlfor building the Java sample with the LexActivator dependency. - Removed legacy C/C++ sample project files previously under
examples/.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| java/sample/src/main/java/com/cryptlex/sample/Sample.java | Adds a Java sample program demonstrating LexActivator usage and callbacks. |
| java/sample/pom.xml | Adds a Maven build file for the Java sample (Java 11 + lexactivator dependency). |
| examples/x86/.gitkeep | Example directory placeholder (no diff shown). |
| examples/x64/.gitkeep | Example directory placeholder (no diff shown). |
| examples/Sample.vcxproj | Removes Visual Studio C++ sample project. |
| examples/Sample.sln | Removes Visual Studio solution for the C++ sample. |
| examples/Sample.cpp | Removes C++ sample source. |
| examples/Makefile | Removes Makefile for building the sample on non-Windows platforms. |
| examples/LexTypes.h | Removes sample header/types previously included with the example. |
| examples/LexStatusCodes.h | Removes sample status codes header previously included with the example. |
| examples/LexActivator.h | Removes bundled LexActivator C header previously included with the example. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import com.cryptlex.lexactivator.LexActivator; | ||
| import com.cryptlex.lexactivator.LicenseCallbackEvent; | ||
| import com.cryptlex.lexactivator.ReleaseCallbackEvent; | ||
| import com.cryptlex.lexactivator.ReleaseUpdateCallbackEvent; | ||
| import com.cryptlex.lexactivator.Release; | ||
| import com.cryptlex.lexactivator.LexActivatorException; | ||
| import java.io.File; | ||
| import java.time.Instant; | ||
| import java.io.UnsupportedEncodingException; |
| System.out.println("Release notes: " + release.notes); | ||
| break; | ||
| case LexActivator.LA_RELEASE_NO_UPDATE_AVAILABLE: | ||
| System.out.println("Current version is already latest....!\n"); |
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> |
No description provided.