Skip to content

Commit

Permalink
Fix typos in method names
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Apr 14, 2017
1 parent b3982d5 commit 145f3ee
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,36 +174,56 @@ private void doLoad() {

/* Try extracting the library from the jar */
if( classLoader!=null ) {
if( exractAndLoad(errors, version, customPath, getArchSpecifcResourcePath()) )
if( extractAndLoad(errors, version, customPath, getArchSpecificResourcePath()) )
return;
if( exractAndLoad(errors, version, customPath, getPlatformSpecifcResourcePath()) )
if( extractAndLoad(errors, version, customPath, getPlatformSpecificResourcePath()) )
return;
if( exractAndLoad(errors, version, customPath, getOperatingSystemSpecifcResourcePath()) )
if( extractAndLoad(errors, version, customPath, getOperatingSystemSpecificResourcePath()) )
return;
// For the simpler case where only 1 platform lib is getting packed into the jar
if( exractAndLoad(errors, version, customPath, getResorucePath()) )
if( extractAndLoad(errors, version, customPath, getResourcePath()) )
return;
}

/* Failed to find the library */
throw new UnsatisfiedLinkError("Could not load library. Reasons: " + errors.toString());
}

@Deprecated
final public String getArchSpecifcResourcePath() {
return getArchSpecificResourcePath();
}
final public String getArchSpecificResourcePath() {
return "META-INF/native/"+ getPlatform() + "/" + System.getProperty("os.arch") + "/" +map(name);
}

@Deprecated
final public String getOperatingSystemSpecifcResourcePath() {
return getPlatformSpecifcResourcePath(getOperatingSystem());
return getOperatingSystemSpecificResourcePath();
}
final public String getOperatingSystemSpecificResourcePath() {
return getPlatformSpecificResourcePath(getOperatingSystem());
}
@Deprecated
final public String getPlatformSpecifcResourcePath() {
return getPlatformSpecifcResourcePath(getPlatform());
return getPlatformSpecificResourcePath();
}
final public String getPlatformSpecificResourcePath() {
return getPlatformSpecificResourcePath(getPlatform());
}
@Deprecated
final public String getPlatformSpecifcResourcePath(String platform) {
return getPlatformSpecificResourcePath(platform);
}
final public String getPlatformSpecificResourcePath(String platform) {
return "META-INF/native/"+platform+"/"+map(name);
}

@Deprecated
final public String getResorucePath() {
return getResourcePath();
}
final public String getResourcePath() {
return "META-INF/native/"+map(name);
}

Expand All @@ -212,7 +232,7 @@ final public String getLibraryFileName() {
}


private boolean exractAndLoad(ArrayList<String> errors, String version, String customPath, String resourcePath) {
private boolean extractAndLoad(ArrayList<String> errors, String version, String customPath, String resourcePath) {
URL resource = classLoader.getResource(resourcePath);
if( resource !=null ) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ private void vsBasedBuild(File buildDir) throws CommandLineException, MojoExecut
throw new MojoExecutionException("vcbuild did not generate: "+libFile);
}

File target=FileUtils.resolveFile(libDirectory, library.getPlatformSpecifcResourcePath());
File target=FileUtils.resolveFile(libDirectory, library.getPlatformSpecificResourcePath());
FileUtils.copyFile(libFile, target);

}
Expand Down Expand Up @@ -388,7 +388,7 @@ private void configureBasedBuild(File buildDir) throws IOException, MojoExecutio
platform = library.getPlatform();
}

File target=FileUtils.resolveFile(libDirectory, library.getPlatformSpecifcResourcePath(platform));
File target=FileUtils.resolveFile(libDirectory, library.getPlatformSpecificResourcePath(platform));
FileUtils.copyFile(libFile, target);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void execute() throws MojoExecutionException {

public String getNativeCodeValue(Library library) {
if (osgiPlatforms == null || osgiPlatforms.isEmpty() ) {
return library.getPlatformSpecifcResourcePath(platform) + ";" +"osname=" + getOsgiOSName() + ";processor=" + getOsgiProcessor()+ ",*";
return library.getPlatformSpecificResourcePath(platform) + ";" +"osname=" + getOsgiOSName() + ";processor=" + getOsgiProcessor()+ ",*";
}
boolean first=true;
String rc = "";
Expand All @@ -169,7 +169,7 @@ public String getNativeCodeValue(Library library) {
if( "*".equals(s) ) {
rc += s;
} else {
rc += library.getPlatformSpecifcResourcePath(platform) + ";"+s;
rc += library.getPlatformSpecificResourcePath(platform) + ";"+s;
}
}
return rc;
Expand Down

0 comments on commit 145f3ee

Please sign in to comment.