@@ -71,12 +71,6 @@ public static void load() {
71
71
log ("frameworkResourceName: " + frameworkResourceName );
72
72
final InputStream frameworkResource =
73
73
NativeLibrary .class .getClassLoader ().getResourceAsStream (frameworkResourceName );
74
- if ("libtensorflow_framework.so" .equals (frameworkLibName )) {
75
- frameworkLibName = "libtensorflow_framework.so.1" ;
76
- }
77
- if ("libtensorflow_framework.dylib" .equals (frameworkLibName )) {
78
- frameworkLibName = "libtensorflow_framework.1.dylib" ;
79
- }
80
74
// Do not complain if the framework resource wasn't found. This may just mean that we're
81
75
// building with --config=monolithic (in which case it's not needed and not included).
82
76
if (jniResource == null ) {
@@ -139,9 +133,9 @@ private static boolean resourceExists(String baseName) {
139
133
140
134
private static String getVersionedLibraryName (String libFilename ) {
141
135
// If the resource exists as an unversioned file, return that.
142
- if (resourceExists (libFilename )) {
143
- return libFilename ;
144
- }
136
+ // if (resourceExists(libFilename)) {
137
+ // return libFilename;
138
+ // }
145
139
146
140
final String versionName = getMajorVersionNumber ();
147
141
@@ -180,11 +174,13 @@ private static String getVersionedLibraryName(String libFilename) {
180
174
* determined.
181
175
*/
182
176
private static String getMajorVersionNumber () {
177
+ // getImplementationVersion() retrun null.
183
178
String version = NativeLibrary .class .getPackage ().getImplementationVersion ();
184
179
// expecting a string like 1.14.0, we want to get the first '1'.
185
180
int dotIndex ;
186
181
if (version == null || (dotIndex = version .indexOf ('.' )) == -1 ) {
187
- return null ;
182
+ // we want to get the version 1.
183
+ return "1" ;
188
184
}
189
185
String majorVersion = version .substring (0 , dotIndex );
190
186
try {
0 commit comments