Skip to content

Commit ef4392d

Browse files
committed
normalize warning - make it clear where its from
1 parent 9b15845 commit ef4392d

File tree

7 files changed

+29
-29
lines changed

7 files changed

+29
-29
lines changed

src/main/java/org/jruby/ext/openssl/ASN1.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ public static IRubyObject decode_all(final ThreadContext context,
12421242

12431243
@JRubyMethod(meta = true, required = 1)
12441244
public static IRubyObject traverse(final ThreadContext context, final IRubyObject self, IRubyObject arg) {
1245-
warn(context, "WARNING: unimplemented method called: ASN1#traverse");
1245+
warn(context, "WARNING: unimplemented method called: OpenSSL::ASN1#traverse");
12461246
return context.runtime.getNil();
12471247
}
12481248

@@ -1742,7 +1742,7 @@ ASN1Encodable toASN1(final ThreadContext context) {
17421742
if ( isDebug(context.runtime) ) {
17431743
debug(this + " toASN1() could not handle class " + getMetaClass() + " and value " + val.inspect() + " (" + val.getClass().getName() + ")");
17441744
}
1745-
warn(context, "WARNING: unimplemented method called: ASN1Data#toASN1 (" + type + ")");
1745+
warn(context, "WARNING: unimplemented method called: OpenSSL::ASN1Data#toASN1 (" + type + ")");
17461746
return null;
17471747
}
17481748

src/main/java/org/jruby/ext/openssl/PKCS7.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ public IRubyObject initialize(final ThreadContext context, IRubyObject[] args) {
335335
@Override
336336
@JRubyMethod(visibility = Visibility.PRIVATE)
337337
public IRubyObject initialize_copy(IRubyObject obj) {
338-
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: PKCS7#initialize_copy");
338+
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: OpenSSL::PKCS7#initialize_copy");
339339
return this;
340340
}
341341

@@ -387,25 +387,25 @@ public IRubyObject get_type() {
387387

388388
@JRubyMethod(name = "detached")
389389
public IRubyObject detached() {
390-
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: PKCS7#detached");
390+
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: OpenSSL::PKCS7#detached");
391391
return getRuntime().getNil();
392392
}
393393

394394
@JRubyMethod(name = "detached=")
395395
public IRubyObject set_detached(IRubyObject obj) {
396-
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: PKCS7#detached=");
396+
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: OpenSSL::PKCS7#detached=");
397397
return getRuntime().getNil();
398398
}
399399

400400
@JRubyMethod(name = "detached?")
401401
public IRubyObject detached_p() {
402-
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: PKCS7#detached?");
402+
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: OpenSSL::PKCS7#detached?");
403403
return getRuntime().getNil();
404404
}
405405

406406
@JRubyMethod(name="cipher=")
407407
public IRubyObject set_cipher(IRubyObject obj) {
408-
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: PKCS7#cipher=");
408+
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: OpenSSL::PKCS7#cipher=");
409409
return getRuntime().getNil();
410410
}
411411

@@ -446,7 +446,7 @@ public IRubyObject signers() {
446446

447447
@JRubyMethod
448448
public IRubyObject add_recipient(IRubyObject obj) {
449-
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: PKCS7#add_recipient");
449+
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: OpenSSL::PKCS7#add_recipient");
450450
return getRuntime().getNil();
451451
}
452452

@@ -484,7 +484,7 @@ public IRubyObject add_certificate(IRubyObject obj) {
484484

485485
@JRubyMethod(name="certificates=")
486486
public IRubyObject set_certificates(IRubyObject obj) {
487-
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: PKCS7#certificates=");
487+
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: OpenSSL::PKCS7#certificates=");
488488
return getRuntime().getNil();
489489
}
490490

@@ -524,19 +524,19 @@ public IRubyObject certificates() {
524524

525525
@JRubyMethod
526526
public IRubyObject add_crl(IRubyObject obj) {
527-
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: PKCS7#add_crl");
527+
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: OpenSSL::PKCS7#add_crl");
528528
return getRuntime().getNil();
529529
}
530530

531531
@JRubyMethod(name="crls=")
532532
public IRubyObject set_crls(IRubyObject obj) {
533-
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: PKCS7#crls=");
533+
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: OpenSSL::PKCS7#crls=");
534534
return getRuntime().getNil();
535535
}
536536

537537
@JRubyMethod
538538
public IRubyObject crls() {
539-
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: PKCS7#crls");
539+
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: OpenSSL::PKCS7#crls");
540540
return getRuntime().getNil();
541541
}
542542

@@ -721,7 +721,7 @@ SignerInfoWithPkey getSignerInfo() {
721721
@JRubyMethod(visibility = Visibility.PRIVATE)
722722
public IRubyObject initialize(final ThreadContext context,
723723
IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) {
724-
warn(context, "WARNING: unimplemented method called: signerInfo#initialize");
724+
warn(context, "WARNING: unimplemented method called: OpenSSL::PKCS7::SignerInfo#initialize");
725725
return this;
726726
}
727727

@@ -738,7 +738,7 @@ public IRubyObject serial() {
738738

739739
@JRubyMethod
740740
public IRubyObject signed_time(final ThreadContext context) {
741-
warn(context, "WARNING: unimplemented method called: signerInfo#signed_time");
741+
warn(context, "WARNING: unimplemented method called: OpenSSL::PKCS7::SignerInfo#signed_time");
742742
return context.runtime.getNil();
743743
}
744744
}
@@ -777,7 +777,7 @@ public static RecipientInfo create(Ruby runtime, RecipInfo info) {
777777

778778
@JRubyMethod(visibility = Visibility.PRIVATE)
779779
public IRubyObject initialize(final ThreadContext context, IRubyObject arg) {
780-
warn(context, "WARNING: unimplemented method called: recipientInfo#initialize");
780+
warn(context, "WARNING: unimplemented method called: OpenSSL::PKCS7::RecipientInfo#initialize");
781781
return this;
782782
}
783783

@@ -793,7 +793,7 @@ public IRubyObject serial() {
793793

794794
@JRubyMethod
795795
public IRubyObject enc_key(final ThreadContext context) {
796-
warn(context, "WARNING: unimplemented method called: recipientInfo#enc_key");
796+
warn(context, "WARNING: unimplemented method called: OpenSSL::PKCS7::RecipientInfo#enc_key");
797797
return context.runtime.getNil();
798798
}
799799
}

src/main/java/org/jruby/ext/openssl/SSLContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ public IRubyObject session_cache_mode() {
540540
public IRubyObject set_session_cache_mode(IRubyObject mode) {
541541
//this.sessionCacheMode = RubyInteger.fix2int(mode);
542542
//return mode;
543-
warn(getRuntime().getCurrentContext(), "SSLContext#session_cache_mode= has no effect under JRuby");
543+
warn(getRuntime().getCurrentContext(), "OpenSSL::SSL::SSLContext#session_cache_mode= has no effect under JRuby");
544544
return session_cache_mode();
545545
}
546546

@@ -574,7 +574,7 @@ public IRubyObject security_level(ThreadContext context) {
574574

575575
@JRubyMethod(name = "security_level=")
576576
public IRubyObject set_security_level(ThreadContext context, IRubyObject level) {
577-
warn(context, "WARNING: SSLContext#security_level= has no effect under JRuby");
577+
warn(context, "OpenSSL::SSL::SSLContext#security_level= has no effect under JRuby");
578578
return context.nil;
579579
}
580580

src/main/java/org/jruby/ext/openssl/SSLSession.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public RubyString id(final ThreadContext context) {
130130

131131
@JRubyMethod(name = "id=")
132132
public IRubyObject set_id(final ThreadContext context, IRubyObject id) {
133-
warn(context, "WARNING: Session#id= is not supported (read-only)");
133+
warn(context, "OpenSSL::SSL::Session#id= is not supported (read-only)");
134134
return context.nil;
135135
}
136136

@@ -142,7 +142,7 @@ public RubyTime time(final ThreadContext context) {
142142

143143
@JRubyMethod(name = "time=")
144144
public IRubyObject set_time(final ThreadContext context, IRubyObject time) {
145-
warn(context, "WARNING: Session#time= is not supported (read-only)");
145+
warn(context, "OpenSSL::SSL::Session#time= is not supported (read-only)");
146146
return context.nil;
147147
}
148148

@@ -158,7 +158,7 @@ public IRubyObject timeout(final ThreadContext context) {
158158
public IRubyObject set_timeout(final ThreadContext context, IRubyObject timeout) {
159159
final SSLSessionContext sessionContext = sslSession().getSessionContext();
160160
if ( sessionContext == null ) {
161-
warn(context, "WARNING: can not set Session#timeout=("+ timeout +") no session context");
161+
warn(context, "WARNING: can not set OpenSSL::SSL::Session#timeout=("+ timeout +") no session context");
162162
return context.nil;
163163
}
164164
sessionContext.setSessionTimeout(RubyNumeric.fix2int(timeout)); // in seconds as well

src/main/java/org/jruby/ext/openssl/SSLSocket.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,19 +1095,19 @@ public IRubyObject cipher() {
10951095
public IRubyObject npn_protocol() {
10961096
if ( engine == null ) return getRuntime().getNil();
10971097
// NOTE: maybe a time to use https://github.com/benmmurphy/ssl_npn
1098-
warn(getRuntime().getCurrentContext(), "WARNING: SSLSocket#npn_protocol is not supported");
1098+
warn(getRuntime().getCurrentContext(), "OpenSSL::SSL::SSLSocket#npn_protocol is not supported");
10991099
return getRuntime().getNil(); // throw new UnsupportedOperationException();
11001100
}
11011101

11021102
@JRubyMethod
11031103
public IRubyObject state() {
1104-
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: SSLSocket#state");
1104+
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: OpenSSL::SSL::SSLSocket#state");
11051105
return getRuntime().getNil();
11061106
}
11071107

11081108
@JRubyMethod
11091109
public IRubyObject pending() {
1110-
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: SSLSocket#pending");
1110+
warn(getRuntime().getCurrentContext(), "WARNING: unimplemented method called: OpenSSL::SSL::SSLSocket#pending");
11111111
return getRuntime().getNil();
11121112
}
11131113

src/main/java/org/jruby/ext/openssl/X509Request.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ private static IRubyObject newName(final ThreadContext context, X500Name name) {
173173
@JRubyMethod(visibility = Visibility.PRIVATE)
174174
public IRubyObject initialize_copy(IRubyObject obj) {
175175
final Ruby runtime = getRuntime();
176-
warn(runtime.getCurrentContext(), "WARNING: unimplemented method called: request#initialize_copy");
176+
warn(runtime.getCurrentContext(), "WARNING: unimplemented method called: OpenSSL::X509::Request#initialize_copy");
177177

178178
if ( this == obj ) return this;
179179

@@ -253,7 +253,7 @@ public IRubyObject eql_p(IRubyObject obj) {
253253

254254
@JRubyMethod
255255
public IRubyObject to_text(final ThreadContext context) {
256-
warn(context, "WARNING: unimplemented method called: X509::Request#to_text");
256+
warn(context, "WARNING: unimplemented method called: OpenSSL::X509::Request#to_text");
257257
return context.nil;
258258
}
259259

@@ -271,7 +271,7 @@ public IRubyObject version() {
271271

272272
@JRubyMethod(name="version=")
273273
public IRubyObject set_version(final ThreadContext context, IRubyObject version) {
274-
warn(context, "X509::Request#version= has no effect on certification request");
274+
warn(context, "OpenSSL::X509::Request#version= has no effect on certification request");
275275
return this.version = version;
276276
}
277277

@@ -293,7 +293,7 @@ public IRubyObject set_subject(final IRubyObject val) {
293293

294294
@JRubyMethod
295295
public IRubyObject signature_algorithm(final ThreadContext context) {
296-
warn(context, "WARNING: unimplemented method called: request#signature_algorithm");
296+
warn(context, "WARNING: unimplemented method called: OpenSSL::X509::Request#signature_algorithm");
297297
return context.runtime.getNil();
298298
}
299299

src/main/java/org/jruby/ext/openssl/X509Store.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public IRubyObject set_time(final IRubyObject arg) {
156156

157157
@JRubyMethod
158158
public IRubyObject add_path(final ThreadContext context, final IRubyObject arg) {
159-
warn(context, "WARNING: unimplemented method called: Store#add_path");
159+
warn(context, "WARNING: unimplemented method called: OpenSSL::X509::Store#add_path");
160160
return context.nil;
161161
}
162162

0 commit comments

Comments
 (0)